From 3c933c332b037f427c123f2cf958b717c5f1605a Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 1 Mar 2015 18:09:52 +0000 Subject: - 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 --- AUTHORS | 2 +- doc/s6-supervise.html | 7 ------- src/supervision/s6-supervise.c | 10 ---------- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/AUTHORS b/AUTHORS index 1d6850d..c780893 100644 --- a/AUTHORS +++ b/AUTHORS @@ -8,7 +8,7 @@ Contributors: Stefan Karrman Jean Marot Olivier Brunel - Colin Booth + Colin Booth Thanks to: Dan J. Bernstein 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. subdirectory of servicedir. servicedir itself can be read-only, but both servicedir/supervise and servicedir/event need to be read-write. -
  • The ./finish script is not guaranteed to have stdin and -stdout pointing to the same locations as the ./run script. More -precisely: the stdin and stdout will be preserved for ./finish -until s6-supervise is asked to exit, but the last ./finish -execution will have its stdin and stdout redirected to /dev/null. -(This is to avoid maintaining open descriptors when a service is down, which -would prevent its logger from exiting cleanly.)
  • Implementation notes

    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) -- cgit v1.3.1