POpen, opening lots of processes

Hal Daume III hdaume at ISI.EDU
Thu Jan 8 16:40:01 EST 2004

On Thu, 8 Jan 2004, Glynn Clements wrote:

> What does the output from "ps" indicate?

It lists all the processes as defunct:

19981 pts/5    Z      0:00 [suffixtree <defunct>]
19982 pts/5    Z      0:00 [suffixtree <defunct>]
19983 pts/5    Z      0:00 [suffixtree <defunct>]
19984 pts/5    Z      0:00 [suffixtree <defunct>]
19985 pts/5    Z      0:00 [suffixtree <defunct>]

> If you have any "live" processes (S or R state), it's probably because
> the process' output hasn't been consumed, so the program hasn't
> exit()ed yet. OTOH, if you have zombies (Z state), the program has
> terminated but the parent (your program) hasn't called wait/waitpid
> (the Haskell interface is getProcessStatus, getProcessGroupStatus or
> getAnyProcessStatus).

I don't mind evaluating the contents returned strictly, but I can't figure 
out how to force the process into a dead state...I don't see how any of 
these three functions accomplishes that...what am I missing?

 Hal Daume III                                   | hdaume at isi.edu
 "Arrest this man, he talks in maths."           | www.isi.edu/~hdaume

More information about the Glasgow-haskell-users mailing list