Hello
So I'm on a solaris box and am writing a program that uses fork and is causing defunct processes to spawn.
The program has to spawn a SAS process which does funny things to the terminal and so SAS is initiated in the parent process as opposed to the child ( which I think is what most people would expect. ) Anyways the child waits for the parent process to end and then does some logging of its own, while it's waiting it is just sleep(10). When the whole process, both child & parent, are finished the defunct process goes away. I know having the parent process wait for the child is a way to prevent defunct processes, would that make sense in this context however? Is there another way to make the child process non-defunct, at least so that it looks better on the ps - ptree table?
Thanks!