cederom commented on code in PR #2903:
URL: https://github.com/apache/nuttx-apps/pull/2903#discussion_r1890334115
##########
nshlib/nsh_parse.c:
##########
@@ -2733,16 +2739,12 @@ static int nsh_parse_command(FAR struct nsh_vtbl_s
*vtbl, FAR char *cmdline)
if (param.fd_in != -1)
{
close(param.fd_in);
- param.fd_in = -1;
vtbl->np.np_redir_in = redirect_in_save;
}
- if (param.fd_out != -1)
Review Comment:
yeah, what happens on `close(-1)`? according to manpage `errno` is set and
`-1` is returned do we check that anywhere or assume `param.fd_out` is always
`stdout`? is any other scenario possible here for instance broken redirect
pipe? :-)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]