From 8fa51dde2a88faac80817e607d2c92fb578e4cef Mon Sep 17 00:00:00 2001 From: "Steven Rostedt (Red Hat)" Date: Thu, 28 Feb 2013 21:14:34 -0500 Subject: 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 --- trace-recorder.c | 6 ++++-- 1 file 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, -- cgit v1.2.3