This bug is reported by Gordon Sheridan <firstname.lastname@example.org>. The current implementation fo PR_GetInheritedFD doesn't support pipes. The only fileTypes it supports are PR_DESC_FILE, PR_DESC_SOCKET_TCP, and PR_DESC_SOCKET_UDP, and not PR_DESC_PIPE.
I've submitted a proposed fix for this. It works on my machine... I have only tested the pthreads version.
email@example.com. Gordon, would it be possible for you to use the "redirect stdio" process attribute instead? Then I only need to check this in for NSPR 4.1. I can help you make that change when your unix async dns code is ready.
Checked in the patch on the main trunk. /cvsroot/mozilla/nsprpub/pr/include/private/pprio.h, revision 3.12 /cvsroot/mozilla/nsprpub/pr/src/io/prfile.c, revision 3.26 /cvsroot/mozilla/nsprpub/pr/src/misc/prinit.c, revision 3.21 /cvsroot/mozilla/nsprpub/pr/src/pthreads/ptio.c, revision 3.52
Added test cases pipeping2.c and pipepong2.c. To run this pair of tests, just invoke "pipeping2". Marked the bug fixed.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
On NT, PR_ImportPipe needs to set the secret->md.sync_file_io field of the imported pipe to PR_TRUE because unnamed pipes on NT don't support async io. /cvsroot/mozilla/nsprpub/pr/src/io/prfile.c, revision 3.33 This fixed the 'pipeping2' test failure on NT.
You need to log in before you can comment on or make changes to this bug.