* syscalls.cc (login): Fix comment.
(logout): Ditto.
This commit is contained in:
parent
8304de2e34
commit
856a9750ba
@ -1,3 +1,8 @@
|
||||
2003-03-29 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* syscalls.cc (login): Fix comment.
|
||||
(logout): Ditto.
|
||||
|
||||
2003-03-29 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* syscalls.cc: Slightly cleanup all utmp functions.
|
||||
|
@ -2501,8 +2501,7 @@ login (struct utmp *ut)
|
||||
|
||||
pututline (ut);
|
||||
endutent ();
|
||||
/* Read/write to utmp must be atomic to prevent overriding data
|
||||
by concurrent processes. */
|
||||
/* Writing to wtmp must be atomic to prevent mixed up data. */
|
||||
HANDLE mutex = CreateMutex (NULL, FALSE, shared_name ("wtmp_mutex", 0));
|
||||
if (mutex)
|
||||
while (WaitForSingleObject (mutex, INFINITE) == WAIT_ABANDONED)
|
||||
@ -2540,8 +2539,7 @@ logout (char *line)
|
||||
ut_buf.ut_type = DEAD_PROCESS;
|
||||
memset (ut_buf.ut_user, 0, sizeof ut_buf.ut_user);
|
||||
time (&ut_buf.ut_time);
|
||||
/* Read/write to utmp must be atomic to prevent overriding data
|
||||
by concurrent processes. */
|
||||
/* Writing to wtmp must be atomic to prevent mixed up data. */
|
||||
HANDLE mutex = CreateMutex (NULL, FALSE, shared_name ("wtmp_mutex", 0));
|
||||
if (mutex)
|
||||
while (WaitForSingleObject (mutex, INFINITE) == WAIT_ABANDONED)
|
||||
|
Loading…
Reference in New Issue
Block a user