$NetBSD: patch-af,v 1.3 2002/07/24 18:37:35 fredb Exp $ --- mgetty.c.orig Mon Dec 17 16:31:52 2001 +++ mgetty.c @@ -190,6 +190,14 @@ lprintf( L_MESG, "stealing lock file from pid=%d", pid ); if ( steal_lock( Device, pid ) == ERROR ) return St_dialout; + /* write a note to utmp/wtmp about dialout, including process args + * (don't do this on two-user-license systems!) + */ +#ifndef USER_LIMIT + pid = checklock( Device ); /* !! FIXME, ugly */ + make_utmp_wtmp( Device, UT_USER, "dialout", get_ps_args(pid) ); +#endif + /* signal user */ printf( "...ok\r\n" ); @@ -217,14 +225,6 @@ /* the line is locked, a parallel dialout is in process */ virtual_ring = FALSE; /* used to signal callback */ - - /* write a note to utmp/wtmp about dialout, including process args - * (don't do this on two-user-license systems!) - */ -#ifndef USER_LIMIT - pid = checklock( Device ); /* !! FIXME, ugly */ - make_utmp_wtmp( Device, UT_USER, "dialout", get_ps_args(pid) ); -#endif /* close all file descriptors -> other processes can read port */ close(0);