fork: Resource temporarily unavailable errors after upgrading cygwin packages

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Feb 12 07:50:00 GMT 2020


On Feb 12 11:24, Takashi Yano wrote:
> On Tue, 11 Feb 2020 22:31:12 +0100
> Peter Dons Tychsen wrote:
> > On Tue, 2020-02-11 at 22:16 +0900, Takashi Yano wrote:
> > > however, I found the real cause is that errno is accidentally set
> > > by kill() in pty system calls. That is, the problem is not in the
> > > kill() itself but in usage of it. Cygwin older than 3.1.0 does not
> > > have these code in pty. 
> > 
> > OK, is there a fix for that or is that the fix you already pushed? And
> > what is wrong with the usage of kill(). How can kill() be used
> > incorrectly?
> 
> POSIX system calls set global variable errno to appropriate
> value when the system calls fail.
> http://man7.org/linux/man-pages/man3/errno.3.html
> 
> My failure in pty code was that I used kill() in pty system
> calls. kill() can be used check if the process is still alive
> by passing signal number of 0 to the second argument. It returns
> -1 if the process already exited. However, in this case errno
> is set to ESRCH. As a result, the errno value which pty system
> call set is accidentally overwritten by kill().
> 
> The patch was already accepted and pushed to git repository.
> I hope cygwin 3.1.3 which applied this patch will be released
> shortly.

For a first test, please try the latest developer snapshot on
https://cygwin.com/snapshots/


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20200212/6da24a41/attachment.sig>


More information about the Cygwin mailing list