Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3A352393.4D8645EC@delcomsys.com> Date: Mon, 11 Dec 2000 13:57:23 -0500 From: Patrick Doyle X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en,zh,zh-CN,zh-TW MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Why does scp leave ssh running? -- select() never returns References: <3A22C383 DOT 5C16BBC8 AT delcomsys DOT com> <3A25C7DA DOT 6F76C8DA AT delcomsys DOT com> <20001129224015 DOT B21867 AT redhat DOT com> <3A266130 DOT F5877EB5 AT delcomsys DOT com> <3A271DCD DOT 99BDDBF5 AT delcomsys DOT com> <20001202200832 DOT A18661 AT redhat DOT com> <3A29C260 DOT 1C491A30 AT delcomsys DOT com> <20001202233944 DOT A19867 AT redhat DOT com> <3A2A16B5 DOT E1C3F9F4 AT redhat DOT com> <3A351ADE DOT EF54C845 AT delcomsys DOT com> <20001211133605 DOT B7497 AT redhat DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Christopher Faylor wrote: > > On Mon, Dec 11, 2000 at 01:20:14PM -0500, Patrick Doyle wrote: > >So far, the most elegant solution I have come up with is to reimplement > >'select()' so that it calls 'ReadFileEx()' with a suitable 'OVERLAPPED' > >structure, thus eliminating the separate thread that wakes up every 10 > >ms. Of course, if I read a byte from the pipe, I would have to buffer > >it somewhere and fix 'read()' so that it checks for the "readahead" byte > >first, but that is basically solvable. If the call to 'select()' > >returned for some other reason (i.e. another fd was made ready), then > >call 'CancelIo()' to terminate the asynchronous read. > > I'm pretty sure that overlapped I/O does not work with any flavor of pipe. > It should be possible to make a simple test case, to verify though. > My question is more of a philosophical one. If I try it, and it happens to work on my W98 box, but it is listed as "unsupported" in the official Microsoft documentation, would you still want to incorporate it into cygwin? On the one hand, I can understand the SQA argument that you would not want the behavior of cygwin to depend upon undocumeneted or unsupported features of Windows. On the other hand, I expect that the behavior of Windows 9x is what it is, and it will never change from here, so if we find a loophole, we might as well use it -- for Windows 9x _only_. But, based on your comment, if I try it, and it doesn't work, my first inclination will be that "it doesn't work because it is unsupported", rather than my default inclination of "it doesn't work because I did something wrong". When that happens, I think I will start down the path of implementing the parallel pipe for OOB data. What an ugly mess this has turned out to be! Thanks for your comments. --wpd -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com