cc -pthread -Wall -Wextra fork-setsid-setpgid.c -o fork-setsid-setpgid -D_GNU_SOURCE -D_BSD_SOURCE -D_ALL_SOURCE -D_DEFAULT_SOURCE -lm -lpthread -lrt