=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/last/last.c,v retrieving revision 1.24 retrieving revision 1.25 diff -c -r1.24 -r1.25 *** src/usr.bin/last/last.c 2003/04/25 07:13:55 1.24 --- src/usr.bin/last/last.c 2003/05/29 17:21:39 1.25 *************** *** 1,4 **** ! /* $OpenBSD: last.c,v 1.24 2003/04/25 07:13:55 tedu Exp $ */ /* $NetBSD: last.c,v 1.6 1994/12/24 16:49:02 cgd Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: last.c,v 1.25 2003/05/29 17:21:39 deraadt Exp $ */ /* $NetBSD: last.c,v 1.6 1994/12/24 16:49:02 cgd Exp $ */ /* *************** *** 44,50 **** #if 0 static char sccsid[] = "@(#)last.c 8.2 (Berkeley) 4/2/94"; #endif ! static char rcsid[] = "$OpenBSD: last.c,v 1.24 2003/04/25 07:13:55 tedu Exp $"; #endif /* not lint */ #include --- 44,50 ---- #if 0 static char sccsid[] = "@(#)last.c 8.2 (Berkeley) 4/2/94"; #endif ! static char rcsid[] = "$OpenBSD: last.c,v 1.25 2003/05/29 17:21:39 deraadt Exp $"; #endif /* not lint */ #include *************** *** 646,659 **** onintr(signo) int signo; { ! char *ct; ! /* XXX signal race */ ! ct = ctime(&buf[0].ut_time); ! printf("\ninterrupted %10.10s %8.8s \n", ct, ct + 11); if (signo == SIGINT) ! exit(1); ! (void)fflush(stdout); /* fix required for rsh */ } void --- 646,659 ---- onintr(signo) int signo; { ! char str[1024], *ct; ! ct = ctime(&buf[0].ut_time); /* XXX signal race */ ! snprintf(str, sizeof str, "\ninterrupted %10.10s %8.8s \n", ! ct, ct + 11); ! write(STDOUT_FILENO, str, strlen(str)); if (signo == SIGINT) ! _exit(1); } void