728x90

fork()

#include <sys/types.h>
#include <unistd.h>

pid_t fork(void);

* child pid는 parent pid와 다르게 새롭게 생성
* 0이 pid로 반환되면 child
* 대기중인 signal은 정리되며, child에게 상속되지 않음
* fd lock은 상속되지 않음




background로 다른 프로그램 실행시킬 때 많이 사용한다.




728x90

'Programming > linux왕초보' 카테고리의 다른 글

GDB를 사용한 CORE 파일의 분석  (0) 2016.02.05
kernel make menuconfig error  (0) 2016.01.21
Caching your GitHub password in Git  (0) 2016.01.08
Serial ports usage on Linux  (0) 2016.01.08
process 종료  (0) 2015.05.28
Linux SSD 최적화  (0) 2015.04.17
fflush, fileno  (0) 2015.04.07
[Linux] stream write  (0) 2015.03.26
linux filesystem 사용 용량 확인  (0) 2015.03.18
[Linux] Select and Poll  (0) 2015.01.27

+ Recent posts