mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
nsh: fix nsh redirect fd double close
avoid double-close of redirection fds Signed-off-by: zhenwei fang <fangzhenwei@bytedance.com>
This commit is contained in:
parent
85b1a1c8c1
commit
72fe4e21e1
1 changed files with 2 additions and 0 deletions
|
|
@ -726,6 +726,8 @@ static int nsh_execute(FAR struct nsh_vtbl_s *vtbl,
|
|||
if (vtbl->np.np_redir_out || vtbl->np.np_redir_in)
|
||||
{
|
||||
nsh_undirect(vtbl, save);
|
||||
fd_out = -1;
|
||||
fd_in = -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue