The Samba-Bugzilla – Attachment 13940 Details for
Bug 13129
The samba daemons should not double fork when started by systemd
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Small systemd fix
0001-Signal-systemd-on-daemon-start.patch (text/plain), 1.40 KB, created by
Marcos Mello
on 2018-02-04 18:19:16 UTC
(
hide
)
Description:
Small systemd fix
Filename:
MIME Type:
Creator:
Marcos Mello
Created:
2018-02-04 18:19:16 UTC
Size:
1.40 KB
patch
obsolete
>From d74b37bb892a6db1e3a416afb15335e26849b0dc Mon Sep 17 00:00:00 2001 >From: Marcos Mello <marcosfrm@gmail.com> >Date: Sun, 4 Feb 2018 16:10:15 -0200 >Subject: [PATCH] Signal systemd on daemon start > >systemd service files run in no forking mode (--foreground) since >8b6f58194da7e849cdb9d20712dff49b17a93a77. > >Rearrange sd_notify() call in become_daemon() to only signal systemd in this >mode (Type=notify is not designed to monitor double forking). Also drop READY=0 >(it does nothing) and MAINPID= (unnecessary because the process spawned by >systemd is already the main PID). >--- > lib/util/become_daemon.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > >diff --git a/lib/util/become_daemon.c b/lib/util/become_daemon.c >index 0ea8f772a61..441ac1e328b 100644 >--- a/lib/util/become_daemon.c >+++ b/lib/util/become_daemon.c >@@ -73,14 +73,12 @@ void become_daemon(bool do_fork, bool no_session, bool log_stdout) > exit_daemon("Fork failed", errno); > } > if (newpid) { >-#if defined(HAVE_LIBSYSTEMD_DAEMON) || defined(HAVE_LIBSYSTEMD) >- sd_notifyf(0, >- "READY=0\nSTATUS=Starting process...\n" >- "MAINPID=%lu", >- (unsigned long) newpid); >-#endif /* HAVE_LIBSYSTEMD_DAEMON */ > _exit(0); > } >+#if defined(HAVE_LIBSYSTEMD_DAEMON) || defined(HAVE_LIBSYSTEMD) >+ } else { >+ sd_notify(0, "STATUS=Starting process..."); >+#endif /* HAVE_LIBSYSTEMD_DAEMON */ > } > > /* detach from the terminal */ >-- >2.16.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 13129
:
13816
|
13817
|
13821
|
13875
|
13878
| 13940