This is the mail archive of the cygwin-patches 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] |
Other format: | [Raw text] |
Here's a trivial little patch for your consideration (while I wait for my copyright assignment to go through).
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. 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.
Anyway, this adds new functionality and doesn't seem to break anything that worked before.
2006-05-15 Lev Bishop <lev.bishop+cygwin@gmail.com> * net.cc (cygwin_socket): Don't open socket for overlapped IO.
Attachment:
sockpatch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |