12 Jun 2006 15:10
Re: Open sockets non-overlapped?
Corinna Vinschen <corinna-cygwin <at> cygwin.com>
2006-06-12 13:10:47 GMT
2006-06-12 13:10:47 GMT
On May 19 16:56, Dave Korn wrote: > On 19 May 2006 16:20, Lev Bishop wrote: > > It makes it so that cygwin sockets can be passed usefully to windows > > processes. Eg: > > $ cmd /c dir > /dev/tcp/localhost/5001 > > However, it's not perfect -- if the windows process just exits, then > > the connection is reset, not shut down gracefully. > > Well, if the windows process just exits, that is exactly what it has done. > A socket should be shut down gracefully if the app calls shutdown(), and if it > just calls close() the socket should be reset. That's what "gracefully" > means. > > > Playing with > > SO_LINGER doesn't seem to help here. Only way I can think of to make > > it work would be to have the cygwin stub that waits for windows > > processes to exit, to keep a handle on the socket, poll for when the > > windows process closes the socket (using NtQuerySystemInformation > > SystemHandleInformation?) and when it does, close down the socket > > gracefully. > > It probably shouldn't be made to "work" because that would be altering the > semantics of sockets. > > > Anyway, this adds new functionality and doesn't seem to break anything > > that worked before. > > What, you've tested /everything/ that worked before? ;) > > http://cygwin.com/ml/cygwin/2005-03/msg01003.html(Continue reading)
RSS Feed