> I suspect that your process has a controlling tty based on this comment
> in the killall() function at src/shared/killall.c:
>
>    if (send_sighup) {
>            /* Optionally, also send a SIGHUP signal, but only if the process 
> has a controlling
>             * tty. This is useful to allow handling of shells which ignore 
> SIGTERM but react to
>             * SIGHUP. We do not send this to processes that have no 
> controlling TTY since we
>             * don't want to trigger reloads of daemon processes. Also we make 
> sure to only send
>             * this after SIGTERM so that SIGTERM is always first in the 
> queue. */
>             ...
>    }
>
> Also systemd >= v255 (Fedora 41 has v256) has the directive
> SurviveFinalKillSignal=yes that can be used instead of setting
> argv[0][0] = '@'.

Hi Brian.  Thanks very much for your reply.
When I grepped for sighup in the systemd source, I did find the function 
killall().
The sighup should not be coming from there because my process has argv[0][0] == 
‘@’ and there is a check for that in the killall() for-loop (it is done in the 
static function ignore_proc()).
Also, my process does not have a controlling tty (it is being invoked using the 
“init” kernel param).
There is no tty shown when I view its details using ps, and I also don’t see 
any ttys when I do “ls -l /proc/<pid>/fd”.
Any other suggestions?
Maybe I should open a github issue for this.
-James M

Reply via email to