don't fork upon empty commands in linux's msh_execute
This commit is contained in:
parent
542a6f41ed
commit
294261bdc7
1 changed files with 3 additions and 0 deletions
|
|
@ -26,6 +26,9 @@ void msh_write(unsigned char *st, SIZE_TYPE size) {
|
|||
}
|
||||
|
||||
int msh_execute(unsigned char *cmd, unsigned char **args) {
|
||||
if (*cmd == '\0') {
|
||||
return 0;
|
||||
}
|
||||
SIZE_TYPE fork = (SIZE_TYPE)SYSCALL(fork, 0);
|
||||
// int fork = 0;
|
||||
if (fork == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue