<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Aptos;
        panose-1:2 11 0 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Aptos",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-CA" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="WordSection1">
<div id="mail-editor-reference-message-container">
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">> I suspect that your process has a controlling tty based on this comment<br>
> in the killall() function at src/shared/killall.c:<br>
> <br>
>    if (send_sighup) {<br>
>            /* Optionally, also send a SIGHUP signal, but only if the process has a controlling<br>
>             * tty. This is useful to allow handling of shells which ignore SIGTERM but react to<br>
>             * SIGHUP. We do not send this to processes that have no controlling TTY since we<br>
>             * don't want to trigger reloads of daemon processes. Also we make sure to only send<br>
>             * this after SIGTERM so that SIGTERM is always first in the queue. */<br>
>             ...<br>
>    }<br>
><br>
> Also systemd >= v255 (Fedora 41 has v256) has the directive<br>
> SurviveFinalKillSignal=yes that can be used instead of setting<br>
> argv[0][0] = '@'.<br>
<br>
Hi Brian.  Thanks very much for your reply.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">When I grepped for sighup in the systemd source, I did find the function killall().<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">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()).<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">Also, my process does not have a controlling tty (it is being invoked using the “init” kernel param).<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">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”.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">Any other suggestions?<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">Maybe I should open a github issue for this.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">-James M<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>