Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
dcdb
dcdb
Commits
d9b1cb48
Commit
d9b1cb48
authored
Oct 20, 2016
by
Michael Ott
Browse files
Use standard daemon() call on Linux to daemonize the process
parent
19bda2d4
Changes
1
Show whitespace changes
Inline
Side-by-side
include/dcdbdaemon.h
View file @
d9b1cb48
...
...
@@ -33,6 +33,9 @@
static
int
dcdbdaemon
()
{
#ifdef __linux__
daemon
(
0
,
0
);
#else
switch
(
fork
())
{
case
-
1
:
return
-
1
;
...
...
@@ -45,6 +48,7 @@ static int dcdbdaemon()
if
(
setsid
()
==
-
1
)
return
-
1
;
#endif
return
0
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment