mirror of
https://github.com/octoleo/lsyncd.git
synced 2025-01-08 17:24:06 +00:00
dont complain about read() failing in case of being killed.
This commit is contained in:
parent
05b189d517
commit
4ddbb903fa
10
lsyncd.c
10
lsyncd.c
@ -1552,7 +1552,11 @@ master_loop(const struct global_options *opts,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (len < 0) {
|
if (len < 0) {
|
||||||
|
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));
|
printlogf(log, ERROR, "failed to read from inotify (%d:%s)", errno, strerror(errno));
|
||||||
|
}
|
||||||
return false;
|
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
|
* @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.
|
* Utility function to check given path is absolute path.
|
||||||
*
|
*
|
||||||
@ -1672,7 +1676,7 @@ print_help(char *arg0)
|
|||||||
|
|
||||||
#ifdef XML_CONFIG
|
#ifdef XML_CONFIG
|
||||||
/*--------------------------------------------------------------------------*
|
/*--------------------------------------------------------------------------*
|
||||||
* config file parsing
|
* Config file parsing
|
||||||
*--------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -40,7 +40,7 @@ echo -e "$CON* and deleting a directory$COFF"
|
|||||||
rm -r "${WORKSOURCE}"/b
|
rm -r "${WORKSOURCE}"/b
|
||||||
|
|
||||||
echo -e "$CON* waiting for lsyncd to do the job.$COFF"
|
echo -e "$CON* waiting for lsyncd to do the job.$COFF"
|
||||||
sleep 10s
|
sleep 20s
|
||||||
|
|
||||||
echo -e "$CON* killing daemon$COFF"
|
echo -e "$CON* killing daemon$COFF"
|
||||||
if ! kill "${LSYNCPID}"; then
|
if ! kill "${LSYNCPID}"; then
|
||||||
|
Loading…
Reference in New Issue
Block a user