s6

Mirror/fork of https://skarnet.org/software/s6/
git clone https://ccx.te2000.cz/git/s6
Log | Files | Refs | README | LICENSE

commit 3c933c332b037f427c123f2cf958b717c5f1605a
parent 0e23f8f864a795214506918de4f7f5897f5e0730
Author: Laurent Bercot <ska-skaware@skarnet.org>
Date:   Sun,  1 Mar 2015 18:09:52 +0000

 - 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

Diffstat:
MAUTHORS | 2+-
Mdoc/s6-supervise.html | 7-------
Msrc/supervision/s6-supervise.c | 10----------
3 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/AUTHORS b/AUTHORS @@ -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 @@ -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 @@ -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)