Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mike Perry
Tor
Commits
faa0f7ff
Commit
faa0f7ff
authored
21 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Use daemon(3) function where available.
svn:r665
parent
71e5ad71
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configure.in
+1
-1
1 addition, 1 deletion
configure.in
src/common/util.c
+7
-1
7 additions, 1 deletion
src/common/util.c
with
8 additions
and
2 deletions
configure.in
+
1
−
1
View file @
faa0f7ff
...
...
@@ -136,7 +136,7 @@ dnl These headers are not essential
AC_CHECK_HEADERS(stdint.h sys/types.h inttypes.h sys/wait.h netinet/in.h arpa/inet.h)
AC_CHECK_FUNCS(gettimeofday ftime socketpair uname)
AC_CHECK_FUNCS(gettimeofday ftime socketpair uname
daemon
)
dnl In case we aren't given a working stdint.h, we'll need to grow our own.
dnl Watch out.
...
...
This diff is collapsed.
Click to expand it.
src/common/util.c
+
7
−
1
View file @
faa0f7ff
...
...
@@ -548,7 +548,13 @@ get_uname(void)
}
void
daemonize
(
void
)
{
#ifndef MS_WINDOWS
#ifdef HAVE_DAEMON
if
(
daemon
(
0
/* chdir to / */
,
0
/* Redirect std* to /dev/null */
))
{
log_fn
(
LOG_ERR
,
"Daemon returned an error: %s"
,
strerror
(
errno
));
exit
(
1
);
}
#elif ! defined(MS_WINDOWS)
/* Fork; parent exits. */
if
(
fork
())
exit
(
0
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment