Skip to content

00mjk/fork-logic

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

fork-logic

generate a c/c++ code snippet for desired no. of processes to create using fork() system call
test by placing fork-logic output inside test.c
eg.

$ ./fork-logic 99
pid_t p;
if((p=fork())==0){
    fork();
    if((p=fork())==0){
        fork();
        fork();
        fork();
        fork();
        if((p=fork())==0){
            fork();
        }
    }
}

About

generate a c/c++ code snippet for desired no. of processes to create using fork() system call

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 100.0%