From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54198 invoked by alias); 11 Feb 2019 11:50:14 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 53913 invoked by uid 89); 11 Feb 2019 11:50:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HX-Envelope-From:sk:michael, reside, age, para X-HELO: atfriesa01.ssi-schaefer.com Received: from atfriesa01.ssi-schaefer.com (HELO atfriesa01.ssi-schaefer.com) (193.186.16.100) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 11 Feb 2019 11:50:11 +0000 Received: from samail03.wamas.com (HELO mailhost.salomon.at) ([172.28.33.235]) by atfriesa01.ssi-schaefer.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Feb 2019 12:50:07 +0100 Received: from fril0049.wamas.com ([172.28.42.244]) by mailhost.salomon.at with esmtp (Exim 4.77) (envelope-from ) id 1gtA6A-0002VI-96; Mon, 11 Feb 2019 12:50:06 +0100 Subject: Re: [ANNOUNCEMENT] TEST: Cygwin 3.0.0-0.7 To: cygwin@cygwin.com References: <8a2f041f-f8f7-6e17-5d97-5a168440009b@ssi-schaefer.com> <20190208113158.GH13951@calimero.vinschen.de> <17e339bb-2115-bf22-7291-04215aab3150@ssi-schaefer.com> <20190208122126.GM13951@calimero.vinschen.de> <20190208122338.GN13951@calimero.vinschen.de> <20190208130635.GO13951@calimero.vinschen.de> <20190208132807.GP13951@calimero.vinschen.de> <20190208165817.GT13951@calimero.vinschen.de> <20190208170032.GV13951@calimero.vinschen.de> From: Michael Haubenwallner Openpgp: preference=signencrypt Message-ID: <54a5ff3e-4d6a-de39-cc02-f2533072552e@ssi-schaefer.com> Date: Mon, 11 Feb 2019 11:50:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190208170032.GV13951@calimero.vinschen.de> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="WyFcSECn4MYHVmvaT8H6eeFP6CYeqSz1i" X-SW-Source: 2019-02/txt/msg00102.txt.bz2 --WyFcSECn4MYHVmvaT8H6eeFP6CYeqSz1i Content-Type: multipart/mixed; boundary="0eibR8j8oD3Knag7Gnf7k2EkgBEh8Do3Y"; protected-headers="v1" From: Michael Haubenwallner To: cygwin@cygwin.com Message-ID: <54a5ff3e-4d6a-de39-cc02-f2533072552e@ssi-schaefer.com> Subject: Re: [ANNOUNCEMENT] TEST: Cygwin 3.0.0-0.7 References: <8a2f041f-f8f7-6e17-5d97-5a168440009b@ssi-schaefer.com> <20190208113158.GH13951@calimero.vinschen.de> <17e339bb-2115-bf22-7291-04215aab3150@ssi-schaefer.com> <20190208122126.GM13951@calimero.vinschen.de> <20190208122338.GN13951@calimero.vinschen.de> <20190208130635.GO13951@calimero.vinschen.de> <20190208132807.GP13951@calimero.vinschen.de> <20190208165817.GT13951@calimero.vinschen.de> <20190208170032.GV13951@calimero.vinschen.de> In-Reply-To: <20190208170032.GV13951@calimero.vinschen.de> --0eibR8j8oD3Knag7Gnf7k2EkgBEh8Do3Y Content-Type: multipart/mixed; boundary="------------4D1D045F880817F5C2C9C074" Content-Language: en-US This is a multi-part message in MIME format. --------------4D1D045F880817F5C2C9C074 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 773 On 2/8/19 6:00 PM, Corinna Vinschen wrote: > On Feb 8 17:58, Corinna Vinschen wrote: >> On Feb 8 17:35, Michael Haubenwallner wrote: >>> >>> On 2/8/19 2:28 PM, Corinna Vinschen wrote: >>>> >>>> I pushed your forkable branch to master, btw. Would you mind to do the >>>> honors in the ;rease notes at cygwin/release/3.0 and doc/new-features.= xml? >>> >>> Do you mean like this? >> >> It's not bad but for release notes it's rather long. Any chance to get >> a more compact text? Also, please add a "Cygwin: " prefix to the log >> message summary. I'd like to distinguish CYgwin-only changes from >> newlib changes. >=20 > OTOH, if you want to extend the documentation, feel free... Another try, with polish to already available doc around the forkables. /haubi/ --------------4D1D045F880817F5C2C9C074 Content-Type: text/x-patch; name="0001-Cygwin-forkables-update-doc-add-release-notes.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-Cygwin-forkables-update-doc-add-release-notes.patch" Content-length: 4768 =46rom fc9911a188ba2ab8cb0e78c2820c56a5be1d16b8 Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner Date: Fri, 8 Feb 2019 15:38:56 +0100 Subject: [PATCH] Cygwin: forkables: update doc, add release notes --- winsup/cygwin/release/3.0 | 6 ++++++ winsup/doc/highlights.xml | 28 +++++++++++++++++----------- winsup/doc/new-features.xml | 7 +++++++ 3 files changed, 30 insertions(+), 11 deletions(-) diff --git a/winsup/cygwin/release/3.0 b/winsup/cygwin/release/3.0 index da0fe0961..da357558d 100644 --- a/winsup/cygwin/release/3.0 +++ b/winsup/cygwin/release/3.0 @@ -31,6 +31,12 @@ What's new: - New APIs: signalfd, timerfd_create, timerfd_gettime, timerfd_settime, timer_getoverrun. =20 +- fork(2) now is able to recover from when an in-use executable/dll is + removed or replaced during process runtime. This feature is disabled by + default and limited to exes/dlls on the same NTFS partition as the Cygwin + installation. For more information and how to enable, please refer to + https://www.cygwin.com/cygwin-ug-net/highlights.html#ov-hi-process + =20 What changed: ------------- diff --git a/winsup/doc/highlights.xml b/winsup/doc/highlights.xml index 25b227382..67e326cb4 100644 --- a/winsup/doc/highlights.xml +++ b/winsup/doc/highlights.xml @@ -202,21 +202,27 @@ While Windows does not allow to remove binaries in us= e from the file system, they still can be renamed or moved into the recycle bin, as outlined for unlink(2) in . To allow an existing process to fork, the original binary files need to be -available via their original file names, but they may reside in -different directories when using the DotLocal (.local) Dll Redirection feature. Since NTFS does support hardlinks, when the fork fails we try again, but create a private directory containing hardlinks to the original files as -well as the .local file now. The private directory for the hardlinks is -/var/run/cygfork/, which you have to create manually for now if you need to -protect fork against exe- and dll- updates on your Cygwin instance. As -hardlinks cannot be used across multiple NTFS file systems, please make su= re -your exe- and dll- replacing operations operate on the same single NTFS fi= le -system as your Cygwin instance and the /var/run/cygfork/ directory. - -We create one directory per user, application and application age, -and remove it when no more processes use that directory. To indicate +well as the .local file now. The base directory for the +private hardlink directory is /var/run/cygfork/, which +you have to create manually for now if you need to protect fork against +updates to executables and dlls on your Cygwin instance. As hardlinks +cannot be used across multiple NTFS file systems, please make sure your +executable and dll replacing operations operate on the same single NTFS fi= le +system as your Cygwin instance and the /var/run/cygfork/ +directory. Note that this private hardlink directory also does help for +when a wrong dll is found in the parent process' current working directory. +To enable creating the hardlinks, you need to stop all currently running +Cygwin processes after creating this directory, once per Cygwin installati= on: +$ mkdir --mode=3Da=3Drwxt /var/run/cygfork<= /para> + +We create one hardlink directory per user, application and applicati= on +age, and remove it when no more processes use that directory. To indicate whether a directory still is in use, we define a mutex name similar to the directory name. As mutexes are destroyed when no process holds a handle open any more, we can clean up even after power loss or similar: diff --git a/winsup/doc/new-features.xml b/winsup/doc/new-features.xml index 6801e3eeb..8fc0ac6fe 100644 --- a/winsup/doc/new-features.xml +++ b/winsup/doc/new-features.xml @@ -107,6 +107,13 @@ Native Windows processes not started by Cygwin process= es are mapped into the range beyond 65535. =20 + +fork(2) now is able to recover from when an in-use executable/dll is +removed or replaced during process runtime. This feature is disabled by +default and limited to exes/dlls on the same NTFS partition as the Cygwin +installation. For more information and how to enable, please refer to +. + =20 --=20 2.17.0 --------------4D1D045F880817F5C2C9C074-- --0eibR8j8oD3Knag7Gnf7k2EkgBEh8Do3Y-- --WyFcSECn4MYHVmvaT8H6eeFP6CYeqSz1i Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 981 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQKTBAEBCgB9FiEEY4PJ0Y//u+XgtVrKscWEirl385IFAlxhYW5fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDYz ODNDOUQxOEZGRkJCRTVFMEI1NUFDQUIxQzU4NDhBQjk3N0YzOTIACgkQscWEirl3 85K+VBAApFLythoX46vBFarY4559/qdMHNiaoOr/mxR5rX0ZJDov6QoOK6YF0LuI L8q4Nqzx8gfqDRI5ojbh1mrph/P1MRAm6yVJs4OiHgD3JUv3TjDj3tC8YdqvlzOt 0U37HfwEFNN82786R6SPO+I1erwTmuZUR7GhsaYpQqd6PCUI9nyhJTQzN0gt9MHb SlqAS57NCYyEIZEnYeZfqGIiwmyezR4wor2RnCc/DcNw2cs4IJ4rlmbqkkqru3AS X2q9kgIwG3UOKbnrm16CqKFIWKxhrC4ubp6JPDO1pgAswTEaA59CjhllThvHFQ0O 8FXwaRGrkr3ECNP5DwziOeoKrVpAZJr1kCrtFalO+1n0e/ATQMzfE0NeS4t2yfvw Qf9znUO+30BlRmRRPKmuhACaJm20bE/AdCVLyxWlEjNlbFB4rCNdJbsF7poK84Fm JkXwjZLzdxaHldO7RXEgVinRPYEZ2nKiZnMtHetDrGI/wSg2nXN9haoPwyK/MuFU WMaCaAzubOCXRdXeioT/EcbvgFea99InjLKBgpKYLCz4bEkoYvvEJbrPuNZudHZz UwC9X9GcyDkkj1FYj/iADI8cUOdehCRV2Uxvk53lEn0Hp8aaYGe5SieQQqh/QsN2 dBBhh9V7qyAfHtpw7U3pHRpWJ8f2wdBMEZ8ndnzmmvHaftoIflA= =znxs -----END PGP SIGNATURE----- --WyFcSECn4MYHVmvaT8H6eeFP6CYeqSz1i--