supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* [PATCH] chpst in/out/err enhancement
@ 2012-09-27 20:58 Mike Pomraning
  2012-09-27 21:22 ` Charlie Brady
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Pomraning @ 2012-09-27 20:58 UTC (permalink / raw)
  To: supervision

[-- 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-28  2:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-27 20:58 [PATCH] chpst in/out/err enhancement Mike Pomraning
2012-09-27 21:22 ` Charlie Brady
2012-09-28  2:32   ` Mike Pomraning

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).