dont complain about read() failing in case of being killed.

This commit is contained in:
Axel Kittenberger 2010-08-03 15:19:28 +00:00
parent 05b189d517
commit 4ddbb903fa
2 changed files with 9 additions and 5 deletions

View File

@ -1552,7 +1552,11 @@ master_loop(const struct global_options *opts,
}
if (len < 0) {
printlogf(log, ERROR, "failed to read from inotify (%d:%s)", errno, strerror(errno));
if (!keep_going) {
printlogf(log, NORMAL, "read exited due to TERM signal.");
} else {
printlogf(log, ERROR, "failed to read from inotify (%d:%s)", errno, strerror(errno));
}
return false;
}
@ -1581,7 +1585,8 @@ master_loop(const struct global_options *opts,
}
/**
* Utility function to check file exists. Print out error message and die.
* Utility function to check file exists.
* Prints out error message and die.
*
* @param filename filename to check
*/
@ -1595,7 +1600,6 @@ check_file_exists(const struct log* log, const char* filename, const char *errms
}
}
/**
* Utility function to check given path is absolute path.
*
@ -1672,7 +1676,7 @@ print_help(char *arg0)
#ifdef XML_CONFIG
/*--------------------------------------------------------------------------*
* config file parsing
* Config file parsing
*--------------------------------------------------------------------------*/
/**

View File

@ -40,7 +40,7 @@ echo -e "$CON* and deleting a directory$COFF"
rm -r "${WORKSOURCE}"/b
echo -e "$CON* waiting for lsyncd to do the job.$COFF"
sleep 10s
sleep 20s
echo -e "$CON* killing daemon$COFF"
if ! kill "${LSYNCPID}"; then