On Mo, 19.04.21 14:29, Pengpeng Sun (pengpe...@vmware.com) wrote:

> Hi there,
>
> Our program executes 'systemctl reboot' in a child process to reboot
> Linux right after its booted, Sometimes there is no error, but
> sometimes the child process terminated due to received uncaught
> signal 15, then no reboot happened. WIFSIGNALED evaluated a non-zero
> value, WTERMSIG evaluated 15. Don't understand why the uncaught
> signal 15 happened here, could you please shed light on this,
> Thanks.

15 is SIGTERM, i.e. the signal sent when a process is politely asked
to shut down. Something is terminating your process.

It could be systemd, could be something else.

To track down what it is, maybe turn on debug logging in systemd, maybe
you find the explanation there. i.e. "systemd-analyze log-level debug"
and then reproduce the issue.

ALternatively, install a signal handler for SIGTERM via sigaction, and
look into the .si_pid field of the siginfo_t you can receive in the
handler. It tells you which processes sent the SIGTERM.

Lennart

--
Lennart Poettering, Berlin
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to