In my example the dash process still exists until both sleeps have been
finished. I have written a small testcase in C to check if its an
applications fault if there are zombie processes:

#include <stdio.h>
#include <unistd.h>

int main()
{
        FILE *pipe;

        if((pipe = popen("echo", "r")) == 0)
        {
        }
        /*pclose(pipe);*/
        usleep(100000000);
        return 0;
}

This example will cause sh to get a zombie process if echo has finished
until the main application finishes. But if I'm uncommenting
/*pclose(pipe);*/ the zombie process will successfully clean up. So I'm
assuming its the fault of the parent process if there are zombie
processes because it isn't closing the related file descriptor.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/915158

Title:
  Process is not closing

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/915158/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to