1 |
commit: 5de3798afc55ce147e65926f863ec9c9cef60e79 |
2 |
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Apr 29 14:41:07 2017 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 29 14:41:07 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=5de3798a |
7 |
|
8 |
supervise-daemon: mark the service started when the supervisor is active |
9 |
|
10 |
src/rc/supervise-daemon.c | 8 ++++---- |
11 |
1 file changed, 4 insertions(+), 4 deletions(-) |
12 |
|
13 |
diff --git a/src/rc/supervise-daemon.c b/src/rc/supervise-daemon.c |
14 |
index 57d55194..5636eaab 100644 |
15 |
--- a/src/rc/supervise-daemon.c |
16 |
+++ b/src/rc/supervise-daemon.c |
17 |
@@ -694,6 +694,10 @@ int main(int argc, char **argv) |
18 |
fprintf(fp, "%d\n", getpid()); |
19 |
fclose(fp); |
20 |
|
21 |
+ if (svcname) |
22 |
+ rc_service_daemon_set(svcname, exec, |
23 |
+ (const char * const *) argv, pidfile, true); |
24 |
+ |
25 |
/* |
26 |
* Supervisor main loop |
27 |
*/ |
28 |
@@ -718,10 +722,6 @@ int main(int argc, char **argv) |
29 |
} |
30 |
} |
31 |
|
32 |
- if (svcname) |
33 |
- rc_service_daemon_set(svcname, exec, |
34 |
- (const char * const *) argv, pidfile, true); |
35 |
- |
36 |
exit(EXIT_SUCCESS); |
37 |
} else if (child_pid == 0) |
38 |
child_process(exec, argv); |