Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
5621e510
Commit
5621e510
authored
Sep 30, 2007
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved become_daemon() into clientserver.c.
parent
a1d2685b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
29 deletions
+0
-29
socket.c
socket.c
+0
-29
No files found.
socket.c
View file @
5621e510
...
@@ -703,35 +703,6 @@ void set_socket_options(int fd, char *options)
...
@@ -703,35 +703,6 @@ void set_socket_options(int fd, char *options)
free
(
options
);
free
(
options
);
}
}
/**
* Become a daemon, discarding the controlling terminal
**/
void
become_daemon
(
void
)
{
int
i
;
if
(
fork
())
{
_exit
(
0
);
}
/* detach from the terminal */
#ifdef HAVE_SETSID
setsid
();
#elif defined TIOCNOTTY
i
=
open
(
"/dev/tty"
,
O_RDWR
);
if
(
i
>=
0
)
{
ioctl
(
i
,
(
int
)
TIOCNOTTY
,
(
char
*
)
0
);
close
(
i
);
}
#endif
/* make sure that stdin, stdout an stderr don't stuff things
* up (library functions, for example) */
for
(
i
=
0
;
i
<
3
;
i
++
)
{
close
(
i
);
open
(
"/dev/null"
,
O_RDWR
);
}
}
/**
/**
* This is like socketpair but uses tcp. It is used by the Samba
* This is like socketpair but uses tcp. It is used by the Samba
...
...
Write
Preview
Markdown
is supported
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