<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: C process zombies managment in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/c-process-zombies-managment/m-p/4193211#M91385</link>
    <description>&amp;gt;Does signal function have problems in multithread environment?&lt;BR /&gt;&lt;BR /&gt;That may explain why sigaction and blocking will fix it.</description>
    <pubDate>Thu, 08 May 2008 16:39:36 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2008-05-08T16:39:36Z</dc:date>
    <item>
      <title>C process zombies managment</title>
      <link>https://community.hpe.com/t5/operating-system-linux/c-process-zombies-managment/m-p/4193208#M91382</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have the following problem on hp-ux 11i platform.&lt;BR /&gt;&lt;BR /&gt;In a C process I trap the SIGCHLD signals and manage them in a dedicaded routine through waitpid function:&lt;BR /&gt;&lt;BR /&gt;signal(SIGCHLD, SigExit);&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;void SigExit(int sig)&lt;BR /&gt;{&lt;BR /&gt;int status;&lt;BR /&gt;int local_pid;&lt;BR /&gt;&lt;BR /&gt;....&lt;BR /&gt;&lt;BR /&gt;switch(sig)&lt;BR /&gt;{&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;case SIGCHLD:&lt;BR /&gt;while ((local_pid = waitpid(-1, &amp;amp;status, WNOHANG)) &amp;gt; 0)&lt;BR /&gt;{&lt;BR /&gt;...&lt;BR /&gt;}&lt;BR /&gt;signal(sig, SigExit);&lt;BR /&gt;return;&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;The children processes terminations are correclty trapped, but randomically some zombies processes are generated.&lt;BR /&gt;&lt;BR /&gt;Could someone help me?&lt;BR /&gt;&lt;BR /&gt;Many thanks.&lt;BR /&gt;&lt;BR /&gt;Giuseppe Fedele</description>
      <pubDate>Wed, 07 May 2008 09:41:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/c-process-zombies-managment/m-p/4193208#M91382</guid>
      <dc:creator>Fedele Giuseppe</dc:creator>
      <dc:date>2008-05-07T09:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: C process zombies managment</title>
      <link>https://community.hpe.com/t5/operating-system-linux/c-process-zombies-managment/m-p/4193209#M91383</link>
      <description>You may have to use sigaction(2) instead of signal(2).  sigaction allows you to block the signal so you don't have multiple signals coming at the same time.&lt;BR /&gt;&lt;BR /&gt;Also, the waitpid(2) says that waitpid(...,, WNOHANG) sometimes returns 0.&lt;BR /&gt;If it returns -1, you might want to check errno is ECHILD.</description>
      <pubDate>Thu, 08 May 2008 04:29:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/c-process-zombies-managment/m-p/4193209#M91383</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-05-08T04:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: C process zombies managment</title>
      <link>https://community.hpe.com/t5/operating-system-linux/c-process-zombies-managment/m-p/4193210#M91384</link>
      <description>Ok, thanks.&lt;BR /&gt;&lt;BR /&gt;A further question: does signal function have problems in multithread environment?&lt;BR /&gt;Because this is my case.&lt;BR /&gt;&lt;BR /&gt;Giuseppe</description>
      <pubDate>Thu, 08 May 2008 09:30:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/c-process-zombies-managment/m-p/4193210#M91384</guid>
      <dc:creator>Fedele Giuseppe</dc:creator>
      <dc:date>2008-05-08T09:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: C process zombies managment</title>
      <link>https://community.hpe.com/t5/operating-system-linux/c-process-zombies-managment/m-p/4193211#M91385</link>
      <description>&amp;gt;Does signal function have problems in multithread environment?&lt;BR /&gt;&lt;BR /&gt;That may explain why sigaction and blocking will fix it.</description>
      <pubDate>Thu, 08 May 2008 16:39:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/c-process-zombies-managment/m-p/4193211#M91385</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-05-08T16:39:36Z</dc:date>
    </item>
  </channel>
</rss>

