linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix usage of open()
@ 2021-11-09  8:00 Jian Wen
  0 siblings, 0 replies; only message in thread
From: Jian Wen @ 2021-11-09  8:00 UTC (permalink / raw)
  To: linux-perf-users, linux-kernel; +Cc: Jian Wen

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-09  8:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-09  8:00 [PATCH] Fix usage of open() Jian Wen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).