Closed Bug 39731 Opened 25 years ago Closed 25 years ago

PR_GetInheritedFD doesn't support pipes

Categories

(NSPR :: NSPR, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wtc, Assigned: wtc)

Details

Attachments

(1 file)

This bug is reported by Gordon Sheridan <gordon@netscape.com>. 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.
Status: NEW → ASSIGNED
Target Milestone: --- → 4.1
Attached patch proposed fix.Splinter Review
I've submitted a proposed fix for this. It works on my machine... I have only tested the pthreads version.
r=wtc@netscape.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: 25 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.

Attachment

General

Creator:
Created:
Updated:
Size: