Lines Matching refs:up
67 struct utmpx *up = &utmpx; /* and a pointer to it */
69 (void) memset(up, '\0', sizeof (utmpx));
70 up->ut_user[0] = '.';
71 (void) strncpy(&up->ut_user[1], Tag, sizeof (up->ut_user)-1);
72 (void) strncpy(up->ut_line, lastname(line), sizeof (up->ut_line));
73 up->ut_pid = getpid();
74 up->ut_type = USER_PROCESS;
75 up->ut_id[0] = 't';
76 up->ut_id[1] = 'm';
77 up->ut_id[2] = SC_WILDC;
78 up->ut_id[3] = SC_WILDC;
79 up->ut_exit.e_termination = 0;
80 up->ut_exit.e_exit = 0;
81 (void) time(&up->ut_tv.tv_sec);
82 if (makeutx(up) == NULL) {
83 log("makeutx for pid %d failed", up->ut_pid);
128 struct utmpx *up;
133 while (up = getutxent()) {
134 if (up->ut_pid == pid) {
135 if (up->ut_type == DEAD_PROCESS) {
136 /* Cleaned up elsewhere. */
140 strncpy(user, up->ut_user, sizeof (up->ut_user));
141 user[sizeof (up->ut_user)] = '\0';
142 strncpy(ttyn, up->ut_line, sizeof (up->ut_line));
143 ttyn[sizeof (up->ut_line)] = '\0';
144 strncpy(rhost, up->ut_host, sizeof (up->ut_host));
145 rhost[sizeof (up->ut_host)] = '\0';
156 up->ut_type = DEAD_PROCESS;
157 up->ut_exit.e_termination = WTERMSIG(status);
158 up->ut_exit.e_exit = WEXITSTATUS(status);
159 (void) time(&up->ut_tv.tv_sec);
161 if (modutx(up) == NULL) {
167 (void) pututxline(up);
168 updwtmpx("wtmpx", up);