add guard preventing UB when line length exceeds buffer size
[rofl0r-jobflow.git] / README.md
blob3a563bde7e3542ac45198bc8bdfe426727c74e1a
1 jobflow by rofl0r
2 =================
4 this program is inspired by GNU parallel, but has the following differences
6  + written in C (orders of magnitude less memory used, a few KB vs 50-60 MB)
7  + does not leak memory
8  + much faster
9  + supports rlimits passed to started processes
10  - doesn't support ssh (usage of remote cpus)
11  - doesn't support all kinds of argument permutations
13 basically, it works by processing stdin, launching one process per line.
14 the actual line can be passed to the started program as an argv.
15 this allows for easy parallelization of standard unix tasks.
17 it is possible to save the current processed line, so when the task is killed
18 it can be continued later.
20 example usage
21 -------------
23 you have a list of things, and a tool that processes a single thing.
25     cat things.list | jobflow -threads=8 -exec ./mytask {}
27     seq 100 | jobflow -threads=100 -exec echo {}
29     cat urls.txt | jobflow -threads=32 -exec wget {}
31     find . -name '*.bmp' | jobflow -threads=8 -exec bmp2jpeg {.}.bmp {.}.jpg
33 run jobflow without arguments to see a list of possible command line options,
34 and argument permutations.
36 BUILD
37 -----
39 grab the latest release tarball from the releases page, and just run `make`.
40 it contains all library dependencies.
41 https://github.com/rofl0r/jobflow/releases
43 instructions to build from git:
45     cd /tmp
46     mkdir jobflow-0000
47     cd jobflow-0000/
48     git clone https://github.com/rofl0r/libulz lib
49     git clone https://github.com/rofl0r/jobflow
50     git clone https://github.com/rofl0r/rcb
51     export PATH=$PATH:/tmp/jobflow-0000/rcb
52     ln -s /tmp/jobflow-0000/rcb/rcb.pl /tmp/jobflow-0000/rcb/rcb
53     cd jobflow
54     CC="gcc -static" CFLAGS="-O0 -g -Wall -Wextra" rcb jobflow.c