From: Mike Pomraning <mjp@pilcrow.madison.wi.us>
To: supervision@list.skarnet.org
Subject: [PATCH] chpst in/out/err enhancement
Date: Thu, 27 Sep 2012 15:58:11 -0500 [thread overview]
Message-ID: <CAPZFfA9C5rCCbLCp4BGG9_5DE6X9qOmP6y3hw9NT7ka1JFHYGA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 857 bytes --]
The attached patch:
1. Preserves complaints to standard error even under '-2'
2. Adds a '-N' ("null device") flag which modifies '-[012]' to
redirect /dev/null with appropriate access modes, rather than merely
closing fds
3. Documents #2
Rationale: #1 above helps me debug otherwise quiet ``chpst -2
/oops/enoent'' typographical errors. #2 guards against some programs'
naive assumptions about the availability and nature of fds 0, 1 and 2.
Implementation notes: The '-N' flag redirects before chroot, and
respects the improved semantics of '-2' (that is, chpst can still
complain of exec failures). Unmodified '-[012]' are now implemented
with close-on-exec rather than close(). Other than the possibility of
new complaints to stderr under '-2', the patch is behaviorally
backward compatible.
Let me know if you think this is wrong-headed.
-Mike
next reply other threads:[~2012-09-27 20:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-27 20:58 Mike Pomraning [this message]
2012-09-27 21:22 ` Charlie Brady
2012-09-28 2:32 ` Mike Pomraning
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=CAPZFfA9C5rCCbLCp4BGG9_5DE6X9qOmP6y3hw9NT7ka1JFHYGA@mail.gmail.com \
--to=mjp@pilcrow.madison.wi.us \
--cc=supervision@list.skarnet.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 NNTP newsgroup(s).