fork download
  1. #include <pthread.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. void *start_routine(void *);
  6.  
  7. int main(void) {
  8. if (pthread_create(&(pthread_t){0}, NULL, &start_routine, NULL)) {
  9. exit(0);
  10. }
  11. for (;;);
  12. puts("The loop has ended.");
  13. return 0;
  14. }
  15.  
  16. void *start_routine(void *_) {
  17. exit(0);
  18. }
  19.  
Success #stdin #stdout 0s 10480KB
stdin
Standard input is empty
stdout
Standard output is empty