OSTEP:5 Interlude: Process API
5 Interlude: Process API
5.1 The fork() System Call
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char *argv[]) {
printf("hello world (pid:%d)\n", (int) getpid());
int rc = fork();
if (rc < 0) {
//
原创
2022-04-19 01:39:16 ·
273 阅读 ·
0 评论