delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/02/11/21:26:00

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:in-reply-to
:references:mime-version:content-type:content-transfer-encoding;
q=dns; s=default; b=I5aWA0U1acMowHuh6bTMdscOHWEanWE4R4Qlb/BhFre
7JOOOSBckgYXqVEmEr/V5YnJ71p41IyNoOPPxQHjJBInT/TOBGzb3QXCFDMt4Cdv
lhxYGdby38pirJksFTQgqCYIzg5dAD+UzVTq5EhFCb555Vm0J5rKEYoTq6MpZ+f0
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:in-reply-to
:references:mime-version:content-type:content-transfer-encoding;
s=default; bh=v968DEh6kQp8kgLlDeJwsih2RF0=; b=o/O6HsNJ/9ChhTg4x
kEA0SA8T0CouAFXZe6/mbiCvJx3oQgXsBFt2cRYLU54HNcA7yXsnJesIDUU7qKnD
5lP0bkHA3K/gKTy1m96xHwxxge+51yNxvfQH/irGsvzj9OZHy6vIiiOmX3f+kjbx
bhQOr5JR23vU3iDp1SNQAaowOA=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00,KAM_SHORT,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=H*f:sk:03033cd, H*MI:sk:03033cd, H*i:sk:03033cd
X-HELO: conssluserg-03.nifty.com
DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 01C2OueH018125
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1581474297; bh=J2B1J8lsWp4cHrDzbnRvR5a9Xc+vB1CizmR2YzWTOTc=; h=Date:From:To:Subject:In-Reply-To:References:From; b=zV+WMOsUYaw1Ie+VyhlMXK02uG7uz6+xv2pN5cRqYY39/LKQU7RLfNAWS2wtHbvO4 kW3QScsoe1TvDT35LmgqCK53x8R4LOCwQ94ZGIxCx+2xfnbhbh6NfplrkOl6Hk+Xnk qQvRSvcDy5CiQ2KGzx01nwP0pxNp++TtMrfIE+lBU3xPwZ3Q4PEu/BTHaPEJagKTPk 83AWXSOam6LQFHUEyrrPyTtLBWeegMHsKLqOP/a3NRw5euBNpYHdgvnKvV+RgLh2a4 EkXSD5Nudk6dcRUh8T9bYSuSynLmLxtYsNrnaPtiY3TYeMnfcMQ1UvKrefKByyofjc aFkKSBag3jRsw==
Date: Wed, 12 Feb 2020 11:24:58 +0900
From: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
To: cygwin AT cygwin DOT com
Subject: Re: fork: Resource temporarily unavailable errors after upgrading cygwin packages
Message-Id: <20200212112458.291ccf7a64109d23374d2a73@nifty.ne.jp>
In-Reply-To: <03033cd520c633f90e503414f1b678b4a9283d33.camel@dontech.dk>
References: <6d43c714-c4ba-4f0c-9913-cb8453129c85 AT gmail DOT com> <d24aa066-ab3d-9ff0-215a-0a1ed1ec2e5d AT cornell DOT edu> <93562f34-3a14-0c10-cb57-1ae861307d82 AT gmail DOT com> <f4a808cf-d129-f6ce-0da8-674cf88a71ad AT gmail DOT com> <810b0c97ee0697c06bdaa4dff4081bb502bc46ab DOT camel AT dontech DOT dk> <CACSsrOzmexPqVeAoZigrkR4Tv6sWa-506Ui8UzsgLcTSBotgLw AT mail DOT gmail DOT com> <9ed4b0776323e4a0f62191121715d52a0429bdb2 DOT camel AT dontech DOT dk> <d5109f77-9d73-fd68-fac6-1119037c8468 AT gmail DOT com> <23d3cd65794886745e2070a1d1b74013418b0bd8 DOT camel AT dontech DOT dk> <20200211112026 DOT 05664f5c68b6282a39da8ac2 AT nifty DOT ne DOT jp> <b3f992f6b2ba69b9f29e2b126e8580e76d98e4a8 DOT camel AT dontech DOT dk> <20200211221606 DOT c82d718ec32a6d0ce3c2ad7b AT nifty DOT ne DOT jp> <03033cd520c633f90e503414f1b678b4a9283d33 DOT camel AT dontech DOT dk>
Mime-Version: 1.0
X-IsSubscribed: yes

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.

-- 
Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019