public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
To: cygwin@cygwin.com
Subject: Re: [ANNOUNCEMENT] TEST: Cygwin 3.0.0-0.7
Date: Mon, 11 Feb 2019 11:50:00 -0000	[thread overview]
Message-ID: <54a5ff3e-4d6a-de39-cc02-f2533072552e@ssi-schaefer.com> (raw)
In-Reply-To: <20190208170032.GV13951@calimero.vinschen.de>


[-- Attachment #1.1.1: Type: text/plain, Size: 793 bytes --]



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.
> 
> OTOH, if you want to extend the documentation, feel free...

Another try, with polish to already available doc around the forkables.

/haubi/

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: 0001-Cygwin-forkables-update-doc-add-release-notes.patch --]
[-- Type: text/x-patch; name="0001-Cygwin-forkables-update-doc-add-release-notes.patch", Size: 4818 bytes --]

From fc9911a188ba2ab8cb0e78c2820c56a5be1d16b8 Mon Sep 17 00:00:00 2001
From: Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
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.
 
+- 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
+
 
 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 use from the file
 system, they still can be renamed or moved into the recycle bin, as
 outlined for unlink(2) in <xref linkend="ov-new1.7-file"></xref>.
 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 <ulink
+available via their original file names, but they may reside in a
+different directory when using the <ulink
 url="https://social.msdn.microsoft.com/search/en-US?query=dotlocal%20dll%20redirection"
 >DotLocal (.local) Dll Redirection</ulink> 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 sure
-your exe- and dll- replacing operations operate on the same single NTFS file
-system as your Cygwin instance and the /var/run/cygfork/ directory.</para>
-
-<para>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 <literal>.local</literal> file now.  The base directory for the
+private hardlink directory is <literal>/var/run/cygfork/</literal>, 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 file
+system as your Cygwin instance and the <literal>/var/run/cygfork/</literal>
+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 installation:
+<literallayout>$ mkdir --mode=a=rwxt /var/run/cygfork</literallayout></para>
+
+<para>We create one hardlink directory per user, application and application
+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 processes are mapped
 into the range beyond 65535.
 </para></listitem>
 
+<listitem><para>
+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
+<xref linkend="ov-hi-process"></xref>.
+</para></listitem>
 </itemizedlist>
 
 </sect2>
-- 
2.17.0


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 981 bytes --]

  reply	other threads:[~2019-02-11 11:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-05 15:24 Corinna Vinschen
2019-02-07 16:14 ` Michael Haubenwallner
2019-02-07 18:27   ` Corinna Vinschen
2019-02-08  6:46     ` Michael Haubenwallner
2019-02-08 11:32       ` Corinna Vinschen
2019-02-08 11:51         ` Michael Haubenwallner
2019-02-08 12:21           ` Corinna Vinschen
2019-02-08 12:23             ` Corinna Vinschen
2019-02-08 12:52               ` Michael Haubenwallner
2019-02-08 13:06                 ` Corinna Vinschen
2019-02-08 13:28                   ` Corinna Vinschen
2019-02-08 14:43                     ` Michael Haubenwallner
2019-02-08 14:49                       ` Corinna Vinschen
2019-02-08 16:18                         ` Michael Haubenwallner
2019-02-08 16:50                           ` Corinna Vinschen
2019-02-08 16:35                     ` Michael Haubenwallner
2019-02-08 16:58                       ` Corinna Vinschen
2019-02-08 17:00                         ` Corinna Vinschen
2019-02-11 11:50                           ` Michael Haubenwallner [this message]
2019-02-11 13:33                             ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54a5ff3e-4d6a-de39-cc02-f2533072552e@ssi-schaefer.com \
    --to=michael.haubenwallner@ssi-schaefer.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).