This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: [BUG] spawnlp(_P_WAIT, ...) confused if spawned processes execs


Chris Faylor wrote:
> The test case below illustrates a problem with spawnlp.  The correct
> sequence of output should be something like:
> 
> first
> second
> exited
> 
> It is instead:
> 
> first
> exited
> second

> I once again, think that this would be difficult to fix, but maybe Sergey
> will prove me wrong.  I love to be proven wrong when the result is better
> software!

:-)

> 
> #include <process.h>
> main()
> {
> spawnlp(_P_WAIT, "sh", "sh", "-c",
> 	"echo first; exec sh -c \"sleep 2; echo second\"", 0);
> printf("exited\n", ret);
> exit(0);
> }

Thank You! Fixed :-)

 

-- 
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia
Looking for a job.


begin 600 spawn.diff
M+2TM('-P87=N+F]R:6<)4W5N($IU;B Q-2 R,#HQ,CHQ,R Q.3DW"BLK*R!S
M<&%W;BYC8PE-;VX@2G5N(#$V(#$V.C P.C0Y(#$Y.3<*0$ @+34W,"PV("LU
M-S L."! 0 H@(" @('L*(" @(" @('!I;F9O("IC:&EL9" ]('!R;V-I;F9O
M*'!I9"D["B @(" @("!C:&EL9"T^9'=0<F]C97-S260@/2!P:2YD=U!R;V-E
M<W-)9#L**R @(" @(&-H:6QD+3YH4')O8V5S<R ]('!I+FA0<F]C97-S.PHK
M(" @(" @8VAI;&0M/FA4:')E860@/2!P:2YH5&AR96%D.PH@(" @(" @+RH@
M4V5T('5P(&-H:6QD)W,@<VEG;F%L(&AA;F1L97)S("HO"B @(" @("!F;W(@
M*&EN="!I(#T@,#L@:2 \($Y324<[(&DK*RD*(" @(" @(" @:68@*'4M/G-E
M;&8M/G-I9W-;:5TN<V%?:&%N9&QE<B A/2!324=?24=.*0I 0" M-3@S+#<@
M*S4X-2PV($! "B *(" @+RH@4W1A<G0@=&AE(&-H:6QD(')U;FYI;F<@*B\*
M(" @4F5S=6UE5&AR96%D("AP:2YH5&AR96%D*3L*+2 @0VQO<V5(86YD;&4@
M*'!I+FA4:')E860I.PH@(" O*B!$96QE=&4@=&AE('-H87)E9"!F9"!T86)L
M92 J+PH@("!#;&]S94AA;F1L92 H<VAA<F5D7V9D7V@I.PH@"D! ("TU.3,L
M-R K-3DT+#<@0$ *(" @(" @(&9I;&Q?<G5S86=E("@F=2T^<V5L9BT^<G5S
M86=E7W-E;&8L($=E=$-U<G)E;G10<F]C97-S*"DI.PH@(" @(" @17AI=%!R
M;V-E<W,@*%)%4$%214Y424Y'*3L*(" @("!]"BT@(&EF("@H;6]D92 ]/2!?
M4%]/5D523$%9*2!\?" H;6]D92 ]/2!?4%]704E4*2D**R @:68@*&UO9&4@
M/3T@7U!?3U9%4DQ!62D*(" @("!["B @(" @("!(04Y$3$4@=V%I=&)U9ELR
M73L*(" @(" @('=A:71B=69;,%T@/2!P:2YH4')O8V5S<SL*0$ @+38Q-BPQ
M-B K-C$W+#$R($! "B @(" @("!#;&]S94AA;F1L92 H<&DN:%!R;V-E<W,I
M.PH@(" @(" @+RH@86YD(')E='5R;B!W:71H(&ET("HO"B *+2 @(" @(&EF
M("AM;V1E(#T](%]07T]615),05DI"BT)>PHM"2 @9FEL;%]R=7-A9V4@*"9U
M+3YS96QF+3YR=7-A9V5?<V5L9BP@1V5T0W5R<F5N=%!R;V-E<W,H*2D["BT@
M(" @(" @(" @17AI=%!R;V-E<W,@*')E<RD["BT)?0HM(" @(" @96QS90HM
M"7L*+0D@(&%D9%]R=7-A9V4@*"9U+3YS96QF+3YR=7-A9V5?8VAI;&1R96XL
M("9P<F]C:6YF;RAP:60I+3YR=7-A9V5?8VAI;&1R96XI.PHM"2 @861D7W)U
M<V%G92 H)G4M/G-E;&8M/G)U<V%G95]C:&EL9')E;BP@)G!R;V-I;F9O*'!I
M9"DM/G)U<V%G95]S96QF*3L*+0E]"BL@(" @("!F:6QL7W)U<V%G92 H)G4M
M/G-E;&8M/G)U<V%G95]S96QF+"!'971#=7)R96YT4')O8V5S<R@I*3L**R @
M(" @($5X:710<F]C97-S("AR97,I.PHK(" @('T**R @96QS92!I9B H;6]D
M92 ]/2!?4%]704E4*0HK(" @('L**R @(" @('=A:71P:60@*'!I9"P@*&EN
M=" J*2 F<F5S+" P*3L*(" @("!]"B @(&5L<V4@:68@*&UO9&4@/3T@7U!?
M1$5404-(*0H@(" @('L*0$ @+38S."PV("LV,S4L-R! 0 H@(" @(" @<F5S
M(#T@*$173U)$*2!P:2YH4')O8V5S<SL*(" @("!]"B **R @0VQO<V5(86YD
K;&4@*'!I+FA4:')E860I.PH@("!R971U<FX@*&EN="D@<F5S.PH@?0H@"FYD
`
end

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]