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:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=uQkE/Jk9yCJP7WSkbqTQQrMDHZ1qM8jtL6bhQNtWVrIUgf0dQSp/U 65XKKyi5TjdyssiKpz2B7OxKHqdSgGgRkoXmIDa+9sMg47wqnMTPTTdRB9sq2quB CUvrsP9frxArSmDAvz3n54x4pYBIqjQMw7cR2XOpT5w3I00fc8hrGc= 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:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=gjaN+FC1NTwhczYEh/nUS61u9KI=; b=xs2ZfCPvIDJXlRA7GSsnKrs5e/pu 9PN2xG9AW3bt9qZEtItWV+kbli4xTEnfr9gXRJ1nZWLx+24ZtY9kzrxHAKXrILXC Z3L4nshiwQSrKaUmgeAF5DhVU50gSsi4wzDH0RLIZbmFu5Q0QHddZYPBrW9CvAyh Ny4mUCYJht/HxCQ= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-107.0 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_SHORT,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: mout.kundenserver.de Date: Wed, 12 Feb 2020 08:50:43 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: fork: Resource temporarily unavailable errors after upgrading cygwin packages Message-ID: <20200212075043.GK4442@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <810b0c97ee0697c06bdaa4dff4081bb502bc46ab DOT camel AT dontech DOT dk> <9ed4b0776323e4a0f62191121715d52a0429bdb2 DOT camel AT dontech DOT dk> <23d3cd65794886745e2070a1d1b74013418b0bd8 DOT camel AT dontech DOT dk> <20200211112026 DOT 05664f5c68b6282a39da8ac2 AT nifty DOT ne DOT jp> <20200211221606 DOT c82d718ec32a6d0ce3c2ad7b AT nifty DOT ne DOT jp> <03033cd520c633f90e503414f1b678b4a9283d33 DOT camel AT dontech DOT dk> <20200212112458 DOT 291ccf7a64109d23374d2a73 AT nifty DOT ne DOT jp> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tctmm6wHVGT/P6vA" Content-Disposition: inline In-Reply-To: <20200212112458.291ccf7a64109d23374d2a73@nifty.ne.jp> --tctmm6wHVGT/P6vA Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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.=20 > >=20 > > 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? >=20 > 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 >=20 > 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(). >=20 > 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 --=20 Corinna Vinschen Cygwin Maintainer --tctmm6wHVGT/P6vA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl5DrlMACgkQ9TYGna5E T6CeIxAAgMs1NfP6FKweU7W/n6gwqnZrzGw6Sa/wWYfeNOPpk2uDn5iVw4NAfCdf 4Hg/GnT4+UGXIz8CacZ7ZDnW8a8TZ4HE3XFQk1H3UL8xtVvcd1pQhsRf9541NsjN XndKgc7PneZVNYu7/8Y+jXQsijzpT40tUiYX9KThBD2jiX0b2DNRu2MF6o88l+eq UEGSG2Ol86gQKRRX9WYnsFpzhaURR7g82T/+Rs7vg5/BwJFRUifWJBsGXUqtPpjm NNW3mWbSjqa4SdrW0nJbGZJMo6IBCThrmHp+k8sjeclnB90EzSIDB69w+fhruWQL rCiyE7J5a9HDUfGcJRcVPB5JgGXmeVj4C0C3mBZe7350VFlk2ImdIu24tchR0BBz j2VM0QFWjk1+t4gyECwcpRCLbmMmaYRxbvq4U7JYM5bui5dkINWZNxgbipS9NW7z Z0vj69XfwGXqHkq1ivYRvX3YGFZNaCnWBVLZnxHuFhcowqcQMYPl7F/d+j565pvu AaE5l0yF0B+7nK6XN6Pd06jCHYuTYmhOzTxGFrNUAb3lhu7x8gVIjzeVCM8gEUgL 0kXbPFmlnxO1RcpMmrUfE1uTWrWVOSvuf6T+pJAKfE4Vpwwiun5G5gAPod0qoQLq WP2H+NWCowLSSsSX6q8dY8Fl9gGczpoqMaCpJQgF1KZ6KSqHb3U= =SLCB -----END PGP SIGNATURE----- --tctmm6wHVGT/P6vA--