Advertisement
riking

Spot the bug

Jan 2nd, 2014
466
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.20 KB | None | 0 0
  1. /* Fork child process, wait 5 seconds and kill it */
  2. pid_t pid = fork();
  3. if(pid =! 0) {
  4.     /* Parent */
  5.     sleep(5);
  6.     kill(pid, 11);
  7. }
  8. else {
  9.     /* Child process. Would contain some code */
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement