Re: cygwin-2 process handling (about SIGHUP)

2015-06-08 Thread Corinna Vinschen
On Jun 8 15:50, Marco Atzeri wrote: > On 6/8/2015 2:09 PM, Corinna Vinschen wrote: > >Hi Takashi, > > > > >You convinced me. I applied your patch. I'll generate a developer > >snapshot later today. It would be nice if it could get a thorough > >testing. > > > > > >Thanks, > >Corinna > > I am

Re: cygwin-2 process handling (about SIGHUP)

2015-06-08 Thread Marco Atzeri
On 6/8/2015 2:09 PM, Corinna Vinschen wrote: Hi Takashi, You convinced me. I applied your patch. I'll generate a developer snapshot later today. It would be nice if it could get a thorough testing. Thanks, Corinna I am testing both 32bit and 64 bit version from yesterday and the long t

Re: cygwin-2 process handling (about SIGHUP)

2015-06-08 Thread Corinna Vinschen
Hi Takashi, On Jun 7 09:03, Takashi Yano wrote: > Hi Corinna, > > On Thu, 28 May 2015 16:16:12 +0200 Corinna Vinschen wrote: > > > I applied this patch. I'm not comfortable with removing the SIGHUP > > handling from slave::read in favor of just setting errno to EIO. > > EIO seems wrong here.

Re: cygwin-2 process handling (about SIGHUP)

2015-06-06 Thread Takashi Yano
Hi Corinna, On Thu, 28 May 2015 16:16:12 +0200 Corinna Vinschen wrote: > I applied this patch. I'm not comfortable with removing the SIGHUP > handling from slave::read in favor of just setting errno to EIO. > EIO seems wrong here. Not being able to access the pipe anymore > should be equivalent

Re: cygwin-2 process handling

2015-05-28 Thread Corinna Vinschen
Hi Takashi, On May 28 21:44, Takashi Yano wrote: > Hi Corinna, > > On Thu, 28 May 2015 21:09:32 +0900 > Takashi Yano wrote: > > > On Thu, 28 May 2015 13:47:28 +0200 > > Corinna Vinschen wrote: > > > > > I created another version of your patch which avoids duplicating the > > > tested handle and

Re: cygwin-2 process handling

2015-05-28 Thread Takashi Yano
Hi Corinna, On Thu, 28 May 2015 21:09:32 +0900 Takashi Yano wrote: > On Thu, 28 May 2015 13:47:28 +0200 > Corinna Vinschen wrote: > > > I created another version of your patch which avoids duplicating the > > tested handle and makes the test-and-close-handle operation atomic: > > > Does that lo

Re: cygwin-2 process handling

2015-05-28 Thread Takashi Yano
On Thu, 28 May 2015 13:47:28 +0200 Corinna Vinschen wrote: > I created another version of your patch which avoids duplicating the > tested handle and makes the test-and-close-handle operation atomic: > Does that look ok? It fixes the reported problem for me. Oops! I have just sent another patch

Re: cygwin-2 process handling

2015-05-28 Thread Takashi Yano
Hi Corinna, On Wed, 27 May 2015 14:23:12 +0200 Corinna Vinschen wrote: > Isn't that racy? Consider two processes doing that at the same time. > Both calls to NtQueryObject could come up with hdl_cnt == 2 and the > problem persists. Yes, indeed. I didn't consider enough. > Wouldn't it be safer

Re: cygwin-2 process handling

2015-05-28 Thread Corinna Vinschen
On May 27 17:17, Corinna Vinschen wrote: > On May 27 14:23, Corinna Vinschen wrote: > > Hi Takashi, > > > > On May 21 20:53, Takashi Yano wrote: > > > [...] > > > + if (output_handle_local) > > > +{ > > > + OBJECT_BASIC_INFORMATION obi; > > > + NTSTATUS status; > > > + ULONG hd

Re: cygwin-2 process handling

2015-05-27 Thread Corinna Vinschen
On May 27 14:23, Corinna Vinschen wrote: > Hi Takashi, > > On May 21 20:53, Takashi Yano wrote: > > [...] > > + if (output_handle_local) > > +{ > > + OBJECT_BASIC_INFORMATION obi; > > + NTSTATUS status; > > + ULONG hdl_cnt = 0; > > + > > + status = NtQueryObject (output_ha

Re: cygwin-2 process handling

2015-05-27 Thread Corinna Vinschen
Hi Takashi, On May 21 20:53, Takashi Yano wrote: > [...] > I was looking into this problem, and found the PeekNamedPipe() > call is blocked in fhandler_pty_master::close() when the problem > occurs. > > I had not noticed that, > > https://msdn.microsoft.com/en-us/library/windows/desktop/aa36577

Re: cygwin-2 process handling

2015-05-22 Thread Michael Mauger
Ken Brown said: > Takashi Yano wrote: >> >> I have made a patch attached to resolve this problem. Please have >> a look. >> > > Thanks! That fixes it for me. Michael (OP), are you able to build cygwin1.dll > and test it? > > > Ken Unfortunately, I don't have the ability to build a new cygwi

Re: cygwin-2 process handling

2015-05-21 Thread Ken Brown
Hi Takashi, On 5/21/2015 7:53 AM, Takashi Yano wrote: I was looking into this problem, and found the PeekNamedPipe() call is blocked in fhandler_pty_master::close() when the problem occurs. I had not noticed that, https://msdn.microsoft.com/en-us/library/windows/desktop/aa365779(v=vs.85).aspx

Re: cygwin-2 process handling

2015-05-21 Thread Takashi Yano
Hi Ken, On Tue, 19 May 2015 14:16:35 -0400 Ken Brown wrote: > OK, I got the bisection to work: > > 32fd5b0fe1548cff79b9868e4e259853c59a44db is the first bad commit > commit 32fd5b0fe1548cff79b9868e4e259853c59a44db > Author: Takashi Yano > Date: Thu Mar 12 15:48:10 2015 +0100 > > Let pty

Re: cygwin-2 process handling

2015-05-19 Thread Ken Brown
On 5/19/2015 1:14 PM, Ken Brown wrote: On 5/18/2015 1:15 PM, Michael Mauger wrote: Since the upgrade to cygwin-2 I've been having consistent problems using emacs. My emacs config has not changed and the most recent update to cygwin-2 has helped. I'm using the emacs-w32 executable and have nume

Re: cygwin-2 process handling

2015-05-19 Thread Ken Brown
On 5/18/2015 1:15 PM, Michael Mauger wrote: Since the upgrade to cygwin-2 I've been having consistent problems using emacs. My emacs config has not changed and the most recent update to cygwin-2 has helped. I'm using the emacs-w32 executable and have numerous remote cygwin ssh sessions runni

cygwin-2 process handling

2015-05-18 Thread Michael Mauger
Since the upgrade to cygwin-2 I've been having consistent problems using emacs. My emacs config has not changed and the most recent update to cygwin-2 has helped. I'm using the emacs-w32 executable and have numerous remote cygwin ssh sessions running underneath emacs so that I can edit remote