From: sos AT buggy DOT prospect DOT com DOT ru (Sergey Okhapkin) Subject: gcc -pipe. Once again :-) 22 Apr 1998 11:21:12 -0700 Message-ID: <01BD6E39.A622ED60.cygnus.cygwin32.developers@sos> To: "'cygwin32-developers AT cygnus DOT com'" Cc: "'sos AT cardcenter DOT post DOT ru'" I modified egsc's pexecute.c to use common code for both cygwin and mingw versions. Also I made a change to avoid read end of pipe inheritance problem we discussed some time ago. pexecute.c Cygwin-specific code removed; (pexecute): create a pipe with non-inheritable handles, call spawn functions without underscores for cygwin32; (pwait): just return wait(status) for cygwin32. To support this changes I had to modify winsup sources :-) New MSVC-compatible _pipe() call is implemented. cygwin.din _pipe export is no longer an alias for pipe. fhandler.cc (fhandler_make_pipe): new parameters psize and mode - pipe's buffer size and open mode; create pipe's handles noninherittable if O_NOINHERIT mode is set, use psize argument in CreatePipe() call, set pipe's mode to text if O_TEXT flag is set. pipe.cc (pipe): call fhandler_make_pipe with a default buffer size and _fmode. (_pipe): new. winsup.h prototype for fhandler_make_pipe changed. include/fcntl.h O_NOINHERIT define added. -- Sergey Okhapkin, http://www.lexa.ru/sos Moscow, Russia begin 600 _pipe.diff M26YD97 AT Z(&-Y9W=I;BYD:6X*/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T] M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/0I20U,@ M9FEL93H@+W5SF4I*0H@"2 @("!["B )(" @(" @;7ES96QF+3YH;6%P M+F)U:6QD7V9H86YD;&5R("@B<&EP97(B+"!F9'(L('(I.PH@"2 @(" @(&UY MF4L(&EN M="!M;V1E*0HK>PHK("!R971U#H@=VEN#H@:6YC;'5D92]F8VYT;"YH"CT]/3T]/3T]/3T]/3T] M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T] M/3T]/3T]/3T*4D-3(&9I;&4Z("]U#0P,# P"BLC9&5F:6YE($]?3D])3DA%4DE4"5]/7TY/ A24Y(15))5 HK"B C96YD:68@+RH AT 7T9#3E1,7T@@*B\* ` end begin 600 pexecute.diff M+2TM('!E>&5C=71E+F,N;W)I9PE3=6X AT 07!R(#$R(#$R.C0Q.C R(#$Y.3@* M*RLK('!E>&5C=71E+F,)5V5D($%P'1E'1E&5C=71E("APPHM("!I;G0@<&ED.PHM"BT@ M(&EF("@H9FQA9W,@)B!015A%0U5415]/3D4I("$](%!%6$5#551%7T].12D* M+2 @("!A8F]R=" H*3L*+2 @<&ED(#T@*&9L86=S("8 AT 4$5814-55$5?4T5! M4D-((#\@7W-P87=N=G @.B!?%]APHM(" O*B _/S\@2&5R92=S(&%N M(&]P<&]R='5N:71Y('1O(&-A;F]N:6-A;&EZ92!T:&4@=F%L=65S(&EN(%-4 M05154RX*+2 @(" @3F5E9&5D/R @*B\*+2 @PH@"2 @*F5R&5C=71E("AP