diff options
Diffstat (limited to 'arch/sandbox/cpu/os.c')
-rw-r--r-- | arch/sandbox/cpu/os.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c index e7ec892bdf0..c461fb0db0e 100644 --- a/arch/sandbox/cpu/os.c +++ b/arch/sandbox/cpu/os.c @@ -86,7 +86,10 @@ int os_open(const char *pathname, int os_flags) int os_close(int fd) { - return close(fd); + /* Do not close the console input */ + if (fd) + return close(fd); + return -1; } int os_unlink(const char *pathname) |