diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2006-09-20 18:41:06 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@xenon.tklauser.home> | 2006-09-20 18:41:06 +0200 |
commit | d5433918e5ea78035467ca1b955fe8dc8c93dda7 (patch) | |
tree | 869e915061c98d85593977c6e2e7f13c47c9b1c6 | |
parent | b4144edd4c469d4db5e0e4cc963a0a238a73ce89 (diff) |
Just tail everything in tail_pipe() for nowv0.1
-rw-r--r-- | inotail.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -138,11 +138,18 @@ static int bytes_to_offset(struct file_struct *f, int n_lines) return (ret < 0 ? 0 : ret); } -/* We will just tail everything here */ static int tail_pipe(struct file_struct *f) { + int rc; + char buf[BUFFER_SIZE]; + if (verbose) write_header(f->name); + + /* We will just tail everything here */ + while ((rc = read(f->fd, &buf, BUFFER_SIZE)) > 0) + write(STDOUT_FILENO, buf, (size_t) rc); + return 0; } |