On Wed, Jan 13, 2021, 20:17 Belisko Marek <[email protected]> wrote:

> Hi,
>
> I'm facing a strange issue. I have gsm modem and when modem is
> restarted (removed from usb bus and plugged back) one of services is
> restarted (with enabled systemd debug level):
>
> Jan 07 09:07:00 device systemd[1]: Received SIGCHLD from PID 166
> (systemtest).
> Jan 07 09:07:00 device kernel[174]: option1 ttyUSB4: GSM modem
> (1-port) converter now disconnected from ttyUSB4
> Jan 07 09:07:00 device systemd[1]: Child 166 (systemtest) died
> (code=killed, status=1/HUP)
>

Sounds like your process had opened /dev/ttyUSB4 at some point, and this
became its "controlling tty" (because services start without one).

The kernel always sends SIGHUP to processes when their controlling tty
disappears or loses carrier (same happens when an xterm is closed). The
signal literally means "hang up".

If your service is accessing the modem, use the O_NOCTTY flag to avoid this.
_______________________________________________
systemd-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to