e_termination should be set to the value of WTERMSIG not WEXITSTATUS
This commit is contained in:
@@ -219,8 +219,8 @@ utmp_logout(const char *line, int status)
|
|||||||
ut->ut_type = DEAD_PROCESS;
|
ut->ut_type = DEAD_PROCESS;
|
||||||
# endif
|
# endif
|
||||||
# if defined(HAVE_STRUCT_UTMPX_UT_EXIT) || defined(HAVE_STRUCT_UTMP_UT_EXIT)
|
# if defined(HAVE_STRUCT_UTMPX_UT_EXIT) || defined(HAVE_STRUCT_UTMP_UT_EXIT)
|
||||||
ut->ut_exit.__e_exit = WEXITSTATUS(status);
|
ut->ut_exit.__e_termination = WIFSIGNALED(status) ? WTERMSIG(status) : 0;
|
||||||
ut->ut_exit.__e_termination = WIFEXITED(status) ? WEXITSTATUS(status) : 0;
|
ut->ut_exit.__e_exit = WIFEXITED(status) ? WEXITSTATUS(status) : 0;
|
||||||
# endif
|
# endif
|
||||||
utmp_settime(ut);
|
utmp_settime(ut);
|
||||||
if (pututxline(ut) != NULL)
|
if (pututxline(ut) != NULL)
|
||||||
|
Reference in New Issue
Block a user