Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion psh/psh.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ int psh_ttyopen(const char *ttydev)
dup2(fd, STDOUT_FILENO);
dup2(fd, STDERR_FILENO);

close(fd);
if ((fd != STDIN_FILENO) && (fd != STDOUT_FILENO) && (fd != STDERR_FILENO)) {
close(fd);
}

return EOK;
}
Expand Down
Loading