Re: Socket inheritance with fork/dup2/exec

2007-06-27 Thread Corinna Vinschen
On Jun 22 11:34, Lev Bishop wrote: > On 6/22/07, Corinna Vinschen wrote: > > >However, the next version of Cygwin will use standard DuplicateHandle > >calls as for normal file handles. Consequentially your > >your test application appears to work with a Cygwin built from CVS: > > But MSDN says:

Re: Socket inheritance with fork/dup2/exec

2007-06-22 Thread Jim Powers
Corinna, I took your suggestion and downloaded the latest sanpshot (cygwin1- 20070616.dll) and that fixed the problem. The Win32 version of the client compiled with VC8 now works fine. Thanks!! Jim Corinna Vinschen <[EMAIL PROTECTED]> said: > On Jun 21 22:45, Jim Powers wrote: > > Hi, > > >

Re: Socket inheritance with fork/dup2/exec

2007-06-22 Thread Lev Bishop
On 6/22/07, Corinna Vinschen wrote: However, the next version of Cygwin will use standard DuplicateHandle calls as for normal file handles. Consequentially your your test application appears to work with a Cygwin built from CVS: But MSDN says: You should not use DuplicateHandle to duplicate h

Re: Socket inheritance with fork/dup2/exec

2007-06-22 Thread Corinna Vinschen
On Jun 21 22:45, Jim Powers wrote: > Hi, > > I am redirecting the stdout of a child process to a socket via the standard > fork/dup2/exec paradigm and then reading and displaying the output. > > This works fine if the exec'd child process is compiled using gcc under > cygwin. However, it fails

Re: Socket inheritance with fork/dup2/exec

2007-06-21 Thread Brian Dessent
Lev Bishop wrote: > Actually, pipe() is implemented in cygwin using win32 named pipes, > not anonymous pipes, as I recall. But, you are right that using pipe() > should solve this particular problem. Hmm, that does appear to be the case. Unless I'm mistaken anonymous pipes are just a degenerate

Re: Socket inheritance with fork/dup2/exec

2007-06-21 Thread Lev Bishop
On 6/21/07, Brian Dessent wrote: Jim Powers wrote: > I am redirecting the stdout of a child process to a socket via the standard > fork/dup2/exec paradigm and then reading and displaying the output. > > This works fine if the exec'd child process is compiled using gcc under > cygwin. However, it

Re: Socket inheritance with fork/dup2/exec

2007-06-21 Thread Brian Dessent
Jim Powers wrote: > I am redirecting the stdout of a child process to a socket via the standard > fork/dup2/exec paradigm and then reading and displaying the output. > > This works fine if the exec'd child process is compiled using gcc under > cygwin. However, it fails with an "Invalid file handl

Socket inheritance with fork/dup2/exec

2007-06-21 Thread Jim Powers
Hi, I am redirecting the stdout of a child process to a socket via the standard fork/dup2/exec paradigm and then reading and displaying the output. This works fine if the exec'd child process is compiled using gcc under cygwin. However, it fails with an "Invalid file handle" error when compiled