[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
popen2/close leaves defunct process
From: |
Phil Cummins |
Subject: |
popen2/close leaves defunct process |
Date: |
Wed, 16 Aug 2000 18:16:47 +0900 |
Hello,
I'm using octave 2.0.16 on a Redhat Linux 6.2
system. I use popen2 to open a pipe to a subprocess,
much as is described in the help page for open2:
[in, out, pid] = popen2 ("sort", "-nr");
fputs (in, "theseÜn");
fputs (in, "areÜn");
fputs (in, "someÜn");
fputs (in, "stringsÜn");
fclose (in);
while (isstr (s = fgets (out)))
fputs (stdout, s);
endwhile
fclose (out);
(I verified that I do get the following behavior for the
above example)
However, I notice that this leaves a defunct process
in my process table:
% ps x | grep sort
13608 pts/7 Z 0:00 [sort <defunct>]
which remains there until I quit octave. I plan to use
popen2 in this way many times during an octave session.
Is there any way to remove this process from the table
when I'm finished with it? Thanks.
-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.che.wisc.edu/octave/octave.html
How to fund new projects: http://www.che.wisc.edu/octave/funding.html
Subscription information: http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- popen2/close leaves defunct process,
Phil Cummins <=