From: Martin Buchholz <martinrb@google.com>
To: Zack Weinberg <zackw@panix.com>
Cc: adhemerval.zanella@linaro.org, GNU C Library <libc-alpha@sourceware.org>
Subject: Re: system and popen fail in case of big application
Date: Wed, 12 Sep 2018 19:46:00 -0000 [thread overview]
Message-ID: <CA+kOe0-CvUou3Au4y+niES8OnspG==mVE6YKbQXpAZ-wmcPPDw@mail.gmail.com> (raw)
In-Reply-To: <CAKCAbMjssik6MQYtn6_6a0sCDFGsOTSsg_ogbkENTA6Nu-kN5Q@mail.gmail.com>
On Wed, Sep 12, 2018 at 9:29 AM, Zack Weinberg <zackw@panix.com> wrote:
> I don't want to encourage people to use posix_spawn because
> posix_spawn is a badly designed API. It's difficult to use correctly.
> It's *tedious* to use correctly, which means people won't bother. It
> can't do everything you might want to do on the child side (witness
> the discussion of adding an extension to let it do chdir()). Its
> behavior in case of errors is underspecified. And it might be
> implemented in terms of fork, which means it doesn't guarantee to
> solve Sergey's problem.
I seem to be in agreement with Zack's eloquent post. From java's
point of view, we need to avoid the momentary doubling of memory
caused by fork()ing a huge process, and we need to be able to specify
a working directory for the child. One strategy is to use posix_spawn
to start a small helper process which then in turn execs the real
child after necessary set up (including chdir).
next prev parent reply other threads:[~2018-09-12 19:46 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-09 22:16 Sergey Melnikov
2018-09-09 22:44 ` Zack Weinberg
2018-09-09 22:47 ` Zack Weinberg
2018-09-09 23:27 ` Sergey Melnikov
2018-09-09 23:49 ` Zack Weinberg
2018-09-10 2:50 ` Martin Buchholz
2018-09-10 15:38 ` Joseph Myers
2018-09-10 15:42 ` Zack Weinberg
2018-09-10 15:43 ` Joseph Myers
[not found] ` <CA+kOe0_1k_PbJ-pjHznP4AmTJUgziAdT+4vCcCRSb7GGdvbv7Q@mail.gmail.com>
2018-09-10 15:59 ` Zack Weinberg
2018-09-10 16:55 ` Martin Buchholz
2018-09-11 20:16 ` Adhemerval Zanella
2018-09-12 16:30 ` Zack Weinberg
2018-09-12 19:46 ` Martin Buchholz [this message]
2018-09-13 1:27 ` Adhemerval Zanella
2018-09-13 6:31 ` Andreas Schwab
2018-09-13 12:30 ` Adhemerval Zanella
2018-09-18 1:18 ` Martin Buchholz
2018-09-18 1:59 ` Adhemerval Zanella
2018-09-18 2:18 ` Martin Buchholz
2018-09-18 4:31 ` Rich Felker
2018-09-12 23:08 ` Adhemerval Zanella
2018-09-13 12:11 ` Szabolcs Nagy
2018-09-14 18:42 ` Zack Weinberg
2018-09-17 10:32 ` Szabolcs Nagy
2018-09-17 18:27 ` Adhemerval Zanella
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='CA+kOe0-CvUou3Au4y+niES8OnspG==mVE6YKbQXpAZ-wmcPPDw@mail.gmail.com' \
--to=martinrb@google.com \
--cc=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.org \
--cc=zackw@panix.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).