/****fork_test.c ***** /# include # include # includemain () {pid_t pid; /* At this time only one process * /int n = 4; pid = fork (); /* this case has two processes running simultaneously * /if (pid & lt; 0) printf (" error in fork /n "!); else if (pid == 0) /* returns 0 represents child process * /{n ++; printf (" I am the child process, my process ID is% d, n =% d /n ", getpid (), n);} else /* returns greater than 0 indicates the parent process * /{n--; printf (" I am the parent process, my process ID is% d, n =% d /n ", getpid (), n);}}
statement & ldquo; pid =fork()”, which produced two processes, the original parent process, and the newly created child process.
The difference between the parent and child processes is different from the return value of the different fork functions of the PID. In the parent process, the child process Pid is returned, and the child process returns 0;
This article will guide you to install Debian 7 Wheezy network directly by using DNSMASQ as a PXE se
Command Save the file and exit :x is equivalent to the following command: :wq Saves the cur
There are 7 startup levels in Linux: #0 - halt (Do NOT set initdefault to this)# 1 - Single
Find the difference between find, locate, whereis, which, type in linux
Linux network based three-layer switch and NAT address translation notes
U-Boot first phase key code understanding
Linux ApachePHPMysql default installation path
Ubuntu - grubrescue master boot fix
Computer Technology: cacti Installation and Configuration
The small knowledge points used in the Linux system accumulate
Linux system reloading and restoring
How to find files quickly in Linux
Ubuntu under the bower report EACCES: permissiondenied solution
How to do kb3081438 update failure kb3081438 can not update the solution
Win7 system software does not work properly How to enable the option to run in compatible mode
Close Win7 login welcome interface Direct access to the system
Win10 Mobile Preview 10240 has a hindrance Bug
How to solve the win10 network icon exclamation mark
How to rename multiple files at the same time in Win7
Steps to install KVM virtual machine in CentOS5.5
What is a KPI? What is a KPI indicator?