Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <unistd.h>
int globalVraiable ;
int main() {
pid_t ChildID;
int localVraiable =0 ;
ChildID = fork(); // check for Fork
if (ChildID >= 0) // fork sucess
{
if (ChildID == 0) // Code Of Child which the value will be 0 in
@khalefa-phd
khalefa-phd / fork1.c
Created February 6, 2020 21:47
fork1.c
#include <stdio.h>
#include <unistd.h>
int main() {
pid_t ChildID;
ChildID = fork(); // check for Fork
if (ChildID >= 0) // fork sucess
{
if (ChildID == 0) // Code Of Child which the value will be 0 in
// case of Child code
{