<div dir="ltr"><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large">Hi All,</div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large"><br></div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large"><div class="gmail_default">I'm a newbie and exploring <span class="gmail-il">Systemd</span> init system and I have a doubt regarding how multiple fork() from an application is handled in SystemD environment.</div><div class="gmail_default"><br></div><div class="gmail_default">I have application of process A, which forks process B and B in turn forks another process C like A -> B -> C.</div><div class="gmail_default"><br></div><div class="gmail_default"><b><i>My systemd service file will spawn the application and starts process A and I can see that only process B is forked but not process C.</i></b></div><div><br></div><div>Below given is my unit file.</div><div><br></div><div><i>[Unit]</i></div><div><i>Description=Multiple fork</i></div><div><i><br></i></div><div><i>[Service]</i></div><div><i>ExecStart=/etc/A</i></div></div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large"><i><br></i></div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large"><i>[Install]</i></div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large"><i>WantedBy=multi-user.target</i></div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large"><br></div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large"><br></div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large">Instead of running in a unit file, if I run my application manually all the processes will spawned.</div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large">For Eg :</div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large">======</div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large">cd /etc</div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large">./A & ---> this will cause all the 3 process to be spawned</div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large"><br></div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large">Can anyone let me know how to resolve this issue in SystemD ?</div><div class="gmail_default"><font face="times new roman, serif" size="4">Like </font><font face="times new roman, serif" size="4"><i>"Type=forking", </i>do we have any other option which helps in achieving this problem statement.</font></div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large"><i><br></i></div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large">--<br></div><div><div class="gmail_signature"><div dir="ltr"><div><font face="times new roman,serif"><font size="4">Regards,<br>Raghavendra. H. R<br>(Raghu)</font><br></font></div></div></div></div>
</div>