You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "tmedicci (via GitHub)" <gi...@apache.org> on 2023/04/08 14:41:36 UTC
[GitHub] [nuttx] tmedicci commented on a diff in pull request #8985: drivers/pipe: make pipe and named pipe (mkfifo) POSIX-compliant (blocking `open`)
tmedicci commented on code in PR #8985:
URL: https://github.com/apache/nuttx/pull/8985#discussion_r1161120263
##########
drivers/pipes/pipe_common.h:
##########
@@ -135,6 +137,12 @@ struct pipe_dev_s
struct pollfd *d_fds[CONFIG_DEV_PIPE_NPOLLWAITERS];
};
+enum pipe_common_type_e
+{
+ PIPE_COMMON_PIPE = 0, /* Pipe */
+ PIPE_COMMON_MKFIFO, /* Named pipe */
Review Comment:
Because blocking `open` for write-only (with no readers) would fail `pipe` implementation. Please check https://github.com/apache/nuttx/blob/2c36bbc20cda2dbcd75d5992672a10d9bac96568/drivers/pipes/pipe.c#L258.
I made it different to be able to keep the expected behavior of pipes. Does it make sense to you?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org