diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-03-01 18:09:52 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-03-01 18:09:52 +0000 |
commit | 3c933c332b037f427c123f2cf958b717c5f1605a (patch) | |
tree | d56988efcb2531e1395358598783e33d6357c74e | |
parent | 0e23f8f864a795214506918de4f7f5897f5e0730 (diff) | |
download | s6-3c933c332b037f427c123f2cf958b717c5f1605a.tar.xz |
- Revert LASTFINISH special case (closing stdin/out) in s6-supervise.
(To be watched, but loggers should exit once s6-supervise exits.)
- Change Colin's email address
-rw-r--r-- | AUTHORS | 2 | ||||
-rw-r--r-- | doc/s6-supervise.html | 7 | ||||
-rw-r--r-- | src/supervision/s6-supervise.c | 10 |
3 files changed, 1 insertions, 18 deletions
@@ -8,7 +8,7 @@ Contributors: Stefan Karrman <sk@mathematik.uni-ulm.de> Jean Marot <jean.marot@skarnet.org> Olivier Brunel <jjk@jjacky.com> - Colin Booth <cathexis@gmail.com> + Colin Booth <colin@heliocat.net> Thanks to: Dan J. Bernstein <djb@cr.yp.to> diff --git a/doc/s6-supervise.html b/doc/s6-supervise.html index d0d1e54..511916e 100644 --- a/doc/s6-supervise.html +++ b/doc/s6-supervise.html @@ -94,13 +94,6 @@ service. </li> subdirectory of <em>servicedir</em>. <em>servicedir</em> itself can be read-only, but both <em>servicedir</em><tt>/supervise</tt> and <em>servicedir</em><tt>/event</tt> need to be read-write. </li> - <li> The <tt>./finish</tt> script is not guaranteed to have stdin and -stdout pointing to the same locations as the <tt>./run</tt> script. More -precisely: the stdin and stdout will be preserved for <tt>./finish</tt> -until s6-supervise is asked to exit, but the last <tt>./finish</tt> -execution will have its stdin and stdout redirected to <tt>/dev/null</tt>. -(This is to avoid maintaining open descriptors when a service is down, which -would prevent its logger from exiting cleanly.) </li> </ul> <h2> Implementation notes </h2> diff --git a/src/supervision/s6-supervise.c b/src/supervision/s6-supervise.c index bb4e761..4aaf371 100644 --- a/src/supervision/s6-supervise.c +++ b/src/supervision/s6-supervise.c @@ -304,18 +304,9 @@ static void up_u (void) announce() ; } -static void closethem (void) -{ - fd_close(0) ; - fd_close(1) ; - open_read("/dev/null") ; - open_write("/dev/null") ; -} - static void up_x (void) { state = LASTUP ; - closethem() ; } static void up_term (void) @@ -350,7 +341,6 @@ static void finish_u (void) static void finish_x (void) { state = LASTFINISH ; - closethem() ; } static void lastup_z (void) |