Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix PATTERN/FILE in --help output
[rsync/rsync.git]
/
socket.c
diff --git
a/socket.c
b/socket.c
index
f8d4659
..
674e3d7
100644
(file)
--- a/
socket.c
+++ b/
socket.c
@@
-283,21
+283,19
@@
void become_daemon(void)
{
int i;
{
int i;
- if (fork())
+ if (fork())
{
_exit(0);
_exit(0);
+ }
/* detach from the terminal */
#ifdef HAVE_SETSID
setsid();
#else
#ifdef TIOCNOTTY
/* detach from the terminal */
#ifdef HAVE_SETSID
setsid();
#else
#ifdef TIOCNOTTY
- {
- int i = open("/dev/tty", O_RDWR);
- if (i >= 0)
- {
- ioctl(i, (int) TIOCNOTTY, (char *)0);
- close(i);
- }
+ i = open("/dev/tty", O_RDWR);
+ if (i >= 0) {
+ ioctl(i, (int) TIOCNOTTY, (char *)0);
+ close(i);
}
#endif /* TIOCNOTTY */
#endif
}
#endif /* TIOCNOTTY */
#endif