diff options
Diffstat (limited to 'man3/getutent.3')
-rw-r--r-- | man3/getutent.3 | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/man3/getutent.3 b/man3/getutent.3 index f79479715..88d323990 100644 --- a/man3/getutent.3 +++ b/man3/getutent.3 @@ -304,14 +304,14 @@ and #include <time.h> #include <unistd.h> #include <utmp.h> - +\& int main(void) { struct utmp entry; - +\& system("echo before adding entry:;who"); - +\& entry.ut_type = USER_PROCESS; entry.ut_pid = getpid(); strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen("/dev/")); @@ -323,18 +323,18 @@ main(void) entry.ut_addr = 0; setutent(); pututline(&entry); - +\& system("echo after adding entry:;who"); - +\& entry.ut_type = DEAD_PROCESS; memset(entry.ut_line, 0, UT_LINESIZE); entry.ut_time = 0; memset(entry.ut_user, 0, UT_NAMESIZE); setutent(); pututline(&entry); - +\& system("echo after removing entry:;who"); - +\& endutent(); exit(EXIT_SUCCESS); } |