Opened 6 years ago

Closed 6 years ago

#14322 closed bug (fixed)

posix_spawn only dup2() once

Reported by: leorize Owned by: korli
Priority: normal Milestone: Unscheduled
Component: System/POSIX Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

The program pipe.c attempts to redirect pipetest.c stdout and stderr to their respective pipes for inspection

How to run:

$ gcc -o pipetest pipetest.c
$ gcc -o pipe pipe.c
$ ./pipe

Expected: no output

Got:

test err

(hangs)

The hang happens because the child stderr isn't redirected to the pipe.

Tested on hrev52165, x86_64

Attachments (3)

pipe.c (1.6 KB ) - added by leorize 6 years ago.
pipetest.c (130 bytes ) - added by leorize 6 years ago.
test.h (89 bytes ) - added by leorize 6 years ago.

Download all attachments as: .zip

Change History (5)

by leorize, 6 years ago

Attachment: pipe.c added

by leorize, 6 years ago

Attachment: pipetest.c added

by leorize, 6 years ago

Attachment: test.h added

comment:1 by pulkomandy, 6 years ago

Owner: changed from nobody to korli
Status: newassigned

comment:2 by korli, 6 years ago

Resolution: fixed
Status: assignedclosed

Fixed in hrev52177. Thanks for the report!

Note: See TracTickets for help on using tickets.