Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://gitlab.com/eidheim/tiny-process-library
A small platform independent library making it simple to create and stop new processes in C++, as well as writing to stdin and reading from stdout and stderr of a new process
https://gitlab.com/eidheim/tiny-process-library
Last synced: about 1 month ago
JSON representation
A small platform independent library making it simple to create and stop new processes in C++, as well as writing to stdin and reading from stdout and stderr of a new process
- Host: gitlab.com
- URL: https://gitlab.com/eidheim/tiny-process-library
- Owner: eidheim
- License: mit
- Created: 2018-06-08T09:34:02.479Z (over 6 years ago)
- Default Branch: master
- Last Synced: 2024-08-02T07:23:40.326Z (4 months ago)
- Stars: 42
- Forks: 25
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-game-engine-dev - Tiny-Process-Library - Making it simple to create and stop new processes. (Libraries / C++)
README
# tiny-process-library
A small platform independent library making it simple to create and stop new processes in C++, as well as writing to stdin and reading from stdout and stderr of a new process.This library was created for, and is used by the C++ IDE project [juCi++](https://gitlab.com/cppit/jucipp).
### Features
* No external dependencies
* Simple to use
* Platform independent
* Creating processes using executables is supported on all platforms
* Creating processes using functions is only possible on Unix-like systems
* Read separately from stdout and stderr using anonymous functions
* Write to stdin
* Kill a running process (SIGTERM is supported on Unix-like systems)
* Correctly closes file descriptors/handles### Usage
See [examples.cpp](examples.cpp).### Get, compile and run
#### Unix-like systems
```sh
git clone http://gitlab.com/eidheim/tiny-process-library
cd tiny-process-library
mkdir build
cd build
cmake ..
make
./examples
```#### Windows with MSYS2 (https://msys2.github.io/)
```sh
git clone http://gitlab.com/eidheim/tiny-process-library
cd tiny-process-library
mkdir build
cd build
cmake -G"MSYS Makefiles" ..
make
./examples
```