unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Chris Vine <vine.chris@gmail.com>
To: guile-devel@gnu.org
Subject: Re: Subprocess API.
Date: Mon, 25 Sep 2017 21:34:39 +0100	[thread overview]
Message-ID: <20170925213439.45faab44@dell.homenet> (raw)
In-Reply-To: <20170925195939.01638900@dell.homenet>

On Mon, 25 Sep 2017 19:59:39 +0100
Chris Vine <vine35792468@gmail.com> wrote:
> ... you could consider launching the new process in C code via the
> guile FFI so you can ensure that no non-async-signal-safe code is
> called at the wrong time; but presumably you would still have by some
> means to prevent the garbage collector from being able to start a
> memory reclaiming run in the new process after the fork and before the
> exec, and again I do not know how you would do that.  You would also
> need to block system asyncs before forking (and unblock after the fork
> in the original process) but that is trivial to do.

On reflection I don't think there is an issue with the garbage
collector if you adopted this approach.  After forking there is only
one thread running in the new process - the thread of execution of the
forking thread - and provided that the new process does not attempt to
allocate memory after the fork and before the exec, I doubt the garbage
collector has a way in which it can be provoked to begin trying to
reclaim memory in the new process.



      reply	other threads:[~2017-09-25 20:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-23  9:58 Subprocess API Mathieu Othacehe
2017-09-23 14:19 ` Chris Vine
2017-09-25 17:14   ` Mathieu Othacehe
2017-09-25 18:59     ` Chris Vine
2017-09-25 20:34       ` Chris Vine [this message]

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

  List information: https://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=20170925213439.45faab44@dell.homenet \
    --to=vine.chris@gmail.com \
    --cc=guile-devel@gnu.org \
    /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).