Messages in this thread Patch in this message | | | From | Jian Wen <> | Subject | [PATCH] Fix usage of open() | Date | Tue, 9 Nov 2021 16:00:54 +0800 |
| |
O_NONBLOCK is a flag instead of a file mode bit.
Fixes: edcaa47958c7 ("perf daemon: Add 'ping' command")
Signed-off-by: Jian Wen <wenjianhn@gmail.com> --- tools/perf/builtin-daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/builtin-daemon.c b/tools/perf/builtin-daemon.c index 6cb3f6cc36d0..37d6fcdbb63d 100644 --- a/tools/perf/builtin-daemon.c +++ b/tools/perf/builtin-daemon.c @@ -531,7 +531,7 @@ static int daemon_session__control(struct daemon_session *session, scnprintf(ack_path, sizeof(ack_path), "%s/%s", session->base, SESSION_ACK); - ack = open(ack_path, O_RDONLY, O_NONBLOCK); + ack = open(ack_path, O_RDONLY|O_NONBLOCK); if (!ack) { close(control); return -1; -- 2.25.1
| |