closed inotify fd

This commit is contained in:
Axel Kittenberger 2010-09-17 23:51:27 +00:00
parent 709a8adc8a
commit 02892c30da
2 changed files with 3 additions and 2 deletions

View File

@ -2925,6 +2925,7 @@ one_main(int argc, char **argv)
if (daemon(0, 0)) {
printlogf(log, ERROR, "Cannot daemonize! (%d:%s)",
errno, strerror(errno));
close(inotify_fd);
return LSYNCD_INTERNALFAIL;
}
}
@ -3003,7 +3004,7 @@ one_main(int argc, char **argv)
s_free(excludes.data[i]);
}
}
close(inotify_fd);
#ifdef MEMCHECK
fprintf(stderr, "Memcheck count: %d\n", memc);

View File

@ -18,7 +18,7 @@ mkdir -p "${WORKSOURCE}"/a/a
echo 'test' > "${WORKSOURCE}"/a/a/file
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"
sleep 4s