<div dir="ltr"><br clear="all"><div><p style="box-sizing:border-box;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px;margin-top:0px">Hi,<br style="box-sizing:border-box">I have a templated service and socket, for my program.<br style="box-sizing:border-box">thou may not be relevant here , socket is written for inetd (ie FD 0 and 1)<br style="box-sizing:border-box">the service type is put as "simple" in systemd configuration,<br style="box-sizing:border-box">the service spawns many processes in some flows ( fork + execv ) .<br style="box-sizing:border-box">the spawned process opens , IPC connection ( normal socket to another system ), the process is killed by systemd.<br style="box-sizing:border-box">is this expected?</p><p style="box-sizing:border-box;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px;margin-top:0px"><br></p><p style="box-sizing:border-box;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px;margin-top:0px">Strace  of the killed  process shows</p><p style="box-sizing:border-box;margin-top:0px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px;margin-bottom:0px"><i>ioctl(4, FIONBIO, [0]) = 0<br style="box-sizing:border-box">write(0, "[112] [IpcIO_Recv] (2 4 0x1b335a0 4) [CRYPT]\n", 45) = 45<br style="box-sizing:border-box">write(0, "[280] BIO[0x1b32770]:read(4, 5) - socket fd=4\n", 46) = 46<br style="box-sizing:border-box">read(4, 0x1b60533, 5) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)<br style="box-sizing:border-box">--- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=1, si_uid=0} ---<br style="box-sizing:border-box">+++ killed by SIGTERM +++</i></p><p style="box-sizing:border-box;margin-top:0px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px;margin-bottom:0px"><br></p><p style="box-sizing:border-box;margin-top:0px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px;margin-bottom:0px"><br></p><p style="box-sizing:border-box;margin-top:0px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px;margin-bottom:0px">Same issue is not seen for flows where fork+ execv is not there ( ie execv flows and one where we dont load any process)</p><p style="box-sizing:border-box;margin-top:0px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px;margin-bottom:0px"><br></p><p style="box-sizing:border-box;margin-top:0px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px;margin-bottom:0px">Socket file looks like below : </p><p style="box-sizing:border-box;margin-bottom:16px;margin-top:0px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px"><i>[Unit]<br style="box-sizing:border-box">Description=XXXX<br style="box-sizing:border-box">PartOf=my.service</i></p><p style="box-sizing:border-box;margin-bottom:16px;margin-top:0px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px"><i>[Socket]<br style="box-sizing:border-box">ListenStream=7777<br style="box-sizing:border-box">Accept=yes</i></p><p style="box-sizing:border-box;margin-top:0px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px;margin-bottom:0px"><i>[Install]<br style="box-sizing:border-box">WantedBy=sockets.target</i></p></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><br>                                                                                      Stiju Easo<br><br>   <br> The unexamined life is not worth living for man.<br>      Socrates, in Plato, Dialogues, Apology<br>      Greek philosopher in Athens (469 BC - 399 BC)<br><br></div></div>