유닉스(Unix)/시스템 프로그래밍
프로세스 생성
ddingz
2021. 8. 18. 16:46
간단한 방법
프로그램 실행 : system(3)
#include <stdlib.h>
int system(const char *string);
// string : 실행할 명령이나 실행 파일명
프로세스 생성
fork 함수가 생성한 새로운 프로세스를 자식 프로세스child process라고 한다.
한편 fork 함수를 호출한 프로세스는 부모 프로세스parent process가 된다.
프로세스 생성: fork(2)
#include <sys/types.h>
#include <unistd.h>
pid_t fork(void);
프로세스 생성 : vfork(2)
#include <unistd.h>
pid_t vfork(void);