mirror of
https://github.com/octoleo/lsyncd.git
synced 2025-01-06 00:30:46 +00:00
closed inotify fd
This commit is contained in:
parent
709a8adc8a
commit
02892c30da
3
lsyncd.c
3
lsyncd.c
@ -2925,6 +2925,7 @@ one_main(int argc, char **argv)
|
|||||||
if (daemon(0, 0)) {
|
if (daemon(0, 0)) {
|
||||||
printlogf(log, ERROR, "Cannot daemonize! (%d:%s)",
|
printlogf(log, ERROR, "Cannot daemonize! (%d:%s)",
|
||||||
errno, strerror(errno));
|
errno, strerror(errno));
|
||||||
|
close(inotify_fd);
|
||||||
return LSYNCD_INTERNALFAIL;
|
return LSYNCD_INTERNALFAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3003,7 +3004,7 @@ one_main(int argc, char **argv)
|
|||||||
s_free(excludes.data[i]);
|
s_free(excludes.data[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
close(inotify_fd);
|
||||||
|
|
||||||
#ifdef MEMCHECK
|
#ifdef MEMCHECK
|
||||||
fprintf(stderr, "Memcheck count: %d\n", memc);
|
fprintf(stderr, "Memcheck count: %d\n", memc);
|
||||||
|
@ -18,7 +18,7 @@ mkdir -p "${WORKSOURCE}"/a/a
|
|||||||
echo 'test' > "${WORKSOURCE}"/a/a/file
|
echo 'test' > "${WORKSOURCE}"/a/a/file
|
||||||
|
|
||||||
echo -e "$CON* starting lsyncd$COFF"
|
echo -e "$CON* starting lsyncd$COFF"
|
||||||
./lsyncd --logfile "${LOGFILE}" --pidfile "${PIDFILE}" --no-daemon "${WORKSOURCE}" "${WORKTARGET}"&
|
./lsyncd --logfile "${LOGFILE}" --pidfile --verbose "${PIDFILE}" --no-daemon "${WORKSOURCE}" "${WORKTARGET}"&
|
||||||
|
|
||||||
echo -e "$CON* waiting for lsyncd to start$COFF"
|
echo -e "$CON* waiting for lsyncd to start$COFF"
|
||||||
sleep 4s
|
sleep 4s
|
||||||
|
Loading…
Reference in New Issue
Block a user