Author: Stan Eisenstat
Subject: Re: [Cs323] status follow-up
Date: Monday, 16 Nov 2020, 07:33:20
> Message Posted By: Unknown
>
> Could you also provide more description on whats supposed to happen when a
> system call fails? I may have accidently assumed to exit (even though I
> now realize its never explicitly said). I am not sure what is supposed to
> happen when say execvp fails in a simple except for a perror based on the
> spec.
When a system call fails, bashLT should use perror() to
write an error message to stderr. What happens next
depends on the system call and what bashLT was doing at
the time; e.g., if execvp() fails, the child process
should call exit() with the value to which execvp() set
errno.
--Stan-
PREV
INDEX
NEXT