Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP4
slurm.11945
slurmdbd-uses-xdaemon_-for-systemd.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File slurmdbd-uses-xdaemon_-for-systemd.patch of Package slurm.11945
From: Egbert Eich <eich@suse.com> Date: Tue Nov 20 09:58:47 2018 +0100 Subject: slurmdbd uses xdaemon_* for systemd Patch-mainline: Not yet Git-commit: 8a286cbaf3fe7ebe009106675a4624a2272d616f References: bsc#1084125 Signed-off-by: Egbert Eich <eich@suse.com> --- slurm-18.08.3/src/slurmdbd/slurmdbd.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/slurm-18.08.3/src/slurmdbd/slurmdbd.c b/slurm-18.08.3/src/slurmdbd/slurmdbd.c index 471c724..8c7ea94 100644 --- a/src/slurmdbd/slurmdbd.c +++ b/src/slurmdbd/slurmdbd.c @@ -103,7 +103,7 @@ static List lft_rgt_list = NULL; static void _become_slurm_user(void); static void _commit_handler_cancel(void); static void *_commit_handler(void *no_data); -static void _daemonize(void); +static int _daemonize_start(void); static void _default_sigaction(int sig); static void _free_dbd_stats(void); static void _init_config(void); @@ -127,6 +127,7 @@ int main(int argc, char **argv) { char node_name_short[128]; char node_name_long[128]; + int pipefd; void *db_conn = NULL; assoc_init_args_t assoc_init_arg; @@ -139,8 +140,9 @@ int main(int argc, char **argv) _update_nice(); _kill_old_slurmdbd(); - if (foreground == 0) - _daemonize(); + if (foreground == 0) { + pipefd = _daemonize_start(); + } /* * Need to create pidfile here in case we setuid() below @@ -149,7 +151,9 @@ int main(int argc, char **argv) * able to write a core dump. */ _init_pidfile(); - + if (foreground == 0) { + xdaemon_finish(pipefd); + } /* * Do plugin init's after _init_pidfile so systemd is happy as * slurm_acct_storage_init() could take a long time to finish if running @@ -598,11 +602,14 @@ static void _init_pidfile(void) /* Become a daemon (child of init) and * "cd" to the LogFile directory (if one is configured) */ -static void _daemonize(void) +static int _daemonize_start(void) { - if (xdaemon()) + int retval; + retval = xdaemon_init(); + if (retval == -1) error("daemon(): %m"); log_alter(log_opts, LOG_DAEMON, slurmdbd_conf->log_file); + return retval; } static void _set_work_dir(void)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor