Skip to content

A simple C library that provides a simple and flexible interface for managing processes in a Unix-like environment. It offers functionalities to create, start, and manipulate processes, making it easier for developers to incorporate process handling capabilities into their applications.

License

Notifications You must be signed in to change notification settings

Snap997/ProcessBuilder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProcessBuilder

A simple C library that provides a simple and flexible interface for managing processes in a Unix-like environment. It offers functionalities to create, start, and manipulate processes, making it easier for developers to incorporate process handling capabilities into their applications.

Basic example:

int main(){
    char *args[SIZE] = {"/bin/", "-al"};
    Process process = createProcess("ls", args);
    startProcess(process);
    waitForTermination(process);
}

if you want to redirect the output in a file you simply do:

int main(){
    char *args[SIZE] = {"/bin/", "-al"};
    Process process = createProcess("ls", args);
    setOutputStream(process, open("out.txt", O_WRONLY, 0666));
    startProcess(process);
    waitForTermination(process);
}

How to build

To compile and create the dynamic library, you must have CMake installed. Then, you need to create the build output folder, generate the Makefile, and compile.

mkdir build && cd build && cmake .. && make

About

A simple C library that provides a simple and flexible interface for managing processes in a Unix-like environment. It offers functionalities to create, start, and manipulate processes, making it easier for developers to incorporate process handling capabilities into their applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published