tianyupu / comp3520ass1

Simple UNIX-like shell written in C
0 stars 0 forks source link

forked process doesn't terminate if there's an exec error #1

Closed tianyupu closed 12 years ago

tianyupu commented 12 years ago

If the shell is given an external command that results in an "exec-error" message being printed on the screen, then control stays continues in the newly spawned forked process and doesn't terminate. If this happens several times, then many myshell processes litter the system and must be exited from individually.

tianyupu commented 12 years ago

Tentatively fixed -- added exit(-1) call after the print message