James Youngman wrote: > > This is a security (mis)feature of HP-UX. > > I noticed it with closeout-related tests a few years ago. > > I believe this anticipates an upcoming POSIX change: > http://austingroupbugs.net/view.php?id=173
Thanks for this info. I'm updating the comments: 2011-06-12 Bruno Haible <[email protected]> spawn-pipe tests: Comments. * tests/test-spawn-pipe-child.c (main): Update comment. Reported by James Youngman <[email protected]>. --- tests/test-spawn-pipe-child.c.orig Sun Jun 12 14:45:16 2011 +++ tests/test-spawn-pipe-child.c Sat Jun 11 11:38:12 2011 @@ -97,7 +97,8 @@ case 1: /* Expect fd 2 is closed. But on HP-UX 11, fd 2 gets automatically re-opened to /dev/null if it - was closed. */ + was closed. Future POSIX will allow this, see + <http://austingroupbugs.net/view.php?id=173>. */ #if !defined __hpux ASSERT (! is_open (STDERR_FILENO)); #endif -- In memoriam Medgar Evers <http://en.wikipedia.org/wiki/Medgar_Evers>
