rfmonk

syscall_error.c

Dec 24th, 2013
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.18 KB | None | 0 0
  1.     /* system call to open a file*/
  2. fd = open(pathname, flags, mode);
  3. if (fd == -1) {
  4.     /* code to handle error */
  5. }
  6. ...
  7. if (close(fd) == -1) {
  8.     /* Code to handle the error */
  9. }
Advertisement
Add Comment
Please, Sign In to add comment