This commit is contained in:
Axel Kittenberger 2010-11-11 20:43:20 +00:00
parent 83d0f90c65
commit eadbb6a202
1 changed files with 7 additions and 4 deletions

View File

@ -859,7 +859,8 @@ static int callError;
* Prior it pushed the callError handler. * Prior it pushed the callError handler.
*/ */
static void static void
load_runner_func(lua_State *L, const char *name) load_runner_func(lua_State *L,
const char *name)
{ {
printlogf(L, "Call", "%s()", name); printlogf(L, "Call", "%s()", name);
@ -1084,8 +1085,9 @@ masterloop(lua_State *L)
/* kernel > 2.6.21 indicates that way that way that /* kernel > 2.6.21 indicates that way that way that
* the buffer was too small to fit a filename. * the buffer was too small to fit a filename.
* double its size and try again. When using a lower * double its size and try again. When using a lower
* kernel and a filename > 2KB appears lsyncd * kernel and a filename > 2KB appears lsyncd
* will fail. (but does a 2KB filename really happen?)*/ * will fail. (but does a 2KB filename really happen?)
*/
readbuf_size *= 2; readbuf_size *= 2;
readbuf = s_realloc(readbuf, readbuf_size); readbuf = s_realloc(readbuf, readbuf_size);
continue; continue;
@ -1374,7 +1376,7 @@ main(int argc, char *argv[])
} }
/* opens inotify */ /* opens inotify */
inotify_fd = inotify_init(); inotify_fd = inotify_init1(IN_CLOEXEC);
if (inotify_fd == -1) { if (inotify_fd == -1) {
printlogf(L, "Error", printlogf(L, "Error",
"Cannot create inotify instance! (%d:%s)", "Cannot create inotify instance! (%d:%s)",
@ -1382,6 +1384,7 @@ main(int argc, char *argv[])
return -1; // ERRNO return -1; // ERRNO
} }
{ {
/* adds signal handlers * /* adds signal handlers *
* listens to SIGCHLD, but blocks it until pselect() * listens to SIGCHLD, but blocks it until pselect()