libbb: code shrink by factoring out common update_utmp_DEAD_PROCESS
function old new delta update_utmp_DEAD_PROCESS - 17 +17 telnetd_main 1685 1674 -11 mark_terminated 56 45 -11 handle_sigchld 74 63 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -538,11 +538,7 @@ static struct init_action *mark_terminated(pid_t pid)
|
||||
struct init_action *a;
|
||||
|
||||
if (pid > 0) {
|
||||
update_utmp(pid, DEAD_PROCESS,
|
||||
/*tty_name:*/ NULL,
|
||||
/*username:*/ NULL,
|
||||
/*hostname:*/ NULL
|
||||
);
|
||||
update_utmp_DEAD_PROCESS(pid);
|
||||
for (a = init_action_list; a; a = a->next) {
|
||||
if (a->pid == pid) {
|
||||
a->pid = 0;
|
||||
|
Reference in New Issue
Block a user