diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2013-02-28 21:14:34 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2013-03-04 20:18:53 -0500 |
commit | 8fa51dde2a88faac80817e607d2c92fb578e4cef (patch) | |
tree | e7228612758e4445c5236f8b240ea875a9357311 | |
parent | 7fd690c31a14dd37e8bb665b28adcf66e42e8299 (diff) | |
download | trace-cmd-8fa51dde2a88faac80817e607d2c92fb578e4cef.tar.gz |
trace-cmd: Have read splice check for EINTR or EAGAIN
The read part of the splice can be interrupted via EINTR or
EAGAIN (when the file descriptor is turned to NONBLOCK).
Do not error on those.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | trace-recorder.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/trace-recorder.c b/trace-recorder.c index 8eb8ac87..a24f1a25 100644 --- a/trace-recorder.c +++ b/trace-recorder.c @@ -142,8 +142,10 @@ static long splice_data(struct tracecmd_recorder *recorder) ret = splice(recorder->trace_fd, NULL, recorder->brass[1], NULL, recorder->page_size, 1 /* SPLICE_F_MOVE */); if (ret < 0) { - warning("recorder error in splice input"); - return -1; + if (errno != EAGAIN && errno != EINTR) { + warning("recorder error in splice input"); + return -1; + } } ret = splice(recorder->brass[0], NULL, recorder->fd, NULL, |