[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "no duplicate" in `popen.test'
From: |
Neil Jerram |
Subject: |
Re: "no duplicate" in `popen.test' |
Date: |
Mon, 17 Mar 2008 22:55:32 +0000 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
address@hidden (Ludovic Courtès) writes:
> Hello,
>
> That "no duplicate" test in `popen.test' leaves a zombie behind it [0].
> The fix would be to `waitpid' the process created by `open-input-pipe'
> (see attached patch), but that makes it hang, waiting for "sleep 999" to
> complete.
I've attached an alternative possible solution, using feedback from
the parent to the child to avoid needing the long sleep.
Unfortunately, though, I didn't manage to observe the zombie process
with the test as it was before. (How do I do this on GNU/Linux?) So
I don't really know whether this is a significant improvement.
> I'm not sure whether it's an indication that the bug was caught, or
> rather an indication that the test is broken, especially since I don't
> fully understand the bug that it's trying to catch.
If waitpid fixes it, doesn't that point to the test being broken?
> I would appreciate feedback on this since it's tempting to remove it
> altogether for all the harm it's done. ;-)
It seems a worthwhile test to me. I'd rather work on a tricky
test like this, than on a report of a problem in the context of a
whole application (but which eventually boiled down to the same
thing).
I'm also interested in the forking/threads issue (which is now fixed,
if I've understood the cited thread correctly), and wouldn't want to
remove a test that covered that, unless we can devise a more specific
test for just that issue.
Regards,
Neil
popen.diff
Description: Text Data