Bugfix: read from stdin before we check whether we got somem entries...

这个提交包含在:
2013-09-30 19:45:48 +02:00
父节点 47a8301190
当前提交 29794f9b99

查看文件

@@ -309,7 +309,7 @@ void check_forkbomb(const char *path_logfile, const char *path_prog)
void queue_watches_from_stdin() void queue_watches_from_stdin()
{ {
char *line = NULL; char *line = NULL;
size_t n = 0; size_t n = 0;
ssize_t r; ssize_t r;
while((r = getline(&line, &n, stdin)) != -1) while((r = getline(&line, &n, stdin)) != -1)
{ {
@@ -471,15 +471,15 @@ int main(int argc, char **argv)
} }
} }
if(fromstdin)
queue_watches_from_stdin();
if(watchlist_head == NULL) if(watchlist_head == NULL)
{ {
watchpath = cur_wkdir(); watchpath = cur_wkdir();
watchqueue_addpath(watchpath); watchqueue_addpath(watchpath);
} }
if(fromstdin)
queue_watches_from_stdin();
if(mask == 0) if(mask == 0)
mask |= IN_CLOSE_WRITE; mask |= IN_CLOSE_WRITE;