exec_fork.c 331 B

123456789101112
  1. /* -*- mode:c; c-file-style:"k&r"; c-basic-offset: 4; tab-width:4; indent-tabs-mode:nil; mode:auto-fill; fill-column:78; -*- */
  2. /* vim: set ts=4 sw=4 et tw=78 fo=cqt wm=0: */
  3. #include <stdlib.h>
  4. #include <errno.h>
  5. #include <unistd.h>
  6. int main() {
  7. char * argv[] = { "./fork", NULL };
  8. execv(argv[0], argv);
  9. return 0;
  10. }