File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1950,18 +1950,19 @@ main(int argc, char ** args)
1950
1950
if (is_gridinit_running (sock_path )) {
1951
1951
FATAL ("A gridinit is probably already running,"
1952
1952
" someone listens to UNIX sock path [%s]" , sock_path );
1953
- g_printerr ("A gridinit is probably already running,"
1954
- " someone listens to UNIX sock path [%s]\n" , sock_path );
1955
1953
goto label_exit ;
1956
1954
}
1957
1955
1956
+ if (flag_daemon || * syslog_id ) {
1957
+ freopen ( "/dev/null" , "w" , stdout );
1958
+ freopen ( "/dev/null" , "w" , stderr );
1959
+ }
1960
+
1958
1961
if (flag_daemon ) {
1959
1962
if (0 != daemon (1 ,0 )) {
1960
1963
FATAL ("Failed to daemonize : %s" , strerror (errno ));
1961
1964
goto label_exit ;
1962
1965
}
1963
- freopen ( "/dev/null" , "w" , stdout );
1964
- freopen ( "/dev/null" , "w" , stderr );
1965
1966
write_pid_file ();
1966
1967
}
1967
1968
You can’t perform that action at this time.
0 commit comments