syscall.c 190 B

123456789101112131415
  1. /* See how function and system calls happens. */
  2. #include <unistd.h>
  3. #include <errno.h>
  4. int
  5. main()
  6. {
  7. int x;
  8. x = close(999);
  9. if (x < 0) {
  10. return errno;
  11. } else {
  12. return x;
  13. }
  14. }