You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/09/01 02:52:18 UTC
[GitHub] [incubator-nuttx] anchao commented on a diff in pull request #6969: fs/dup2: fix potential deadlock on usrsock
anchao commented on code in PR #6969:
URL: https://github.com/apache/incubator-nuttx/pull/6969#discussion_r960174004
##########
fs/inode/fs_files.c:
##########
@@ -415,8 +415,15 @@ int fs_getfilep(int fd, FAR struct file **filep)
int nx_dup2(int fd1, int fd2)
{
FAR struct filelist *list;
+ FAR struct file *filep;
+ FAR struct file file;
int ret;
+ if (fd1 == fd2)
+ {
+ return OK;
Review Comment:
Done
--
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