J
junky_fellow
The main() function of my C program is doing some system calls.
If any of my system call fails, I want to terminate the program
and propagate the exact cause of exit (the error number) to the parent
process.
What is the correct way of doing this ?
Should I do,
exit(errno);
Or
return(errno);
If any of my system call fails, I want to terminate the program
and propagate the exact cause of exit (the error number) to the parent
process.
What is the correct way of doing this ?
Should I do,
exit(errno);
Or
return(errno);