diff options
author | VG <vg@devys.org> | 2016-04-23 09:13:11 +0200 |
---|---|---|
committer | VG <vg@devys.org> | 2016-04-23 09:13:11 +0200 |
commit | 34dbfc09093c882199fcee77c008fe74fb12102f (patch) | |
tree | 95b712bce0b90e1e6ae7580ba28fccf4d0884b59 /test2.sh | |
parent | c143a16712b4006caa8a303b007ceed30f925a0c (diff) | |
parent | 37944c977c0fa30079ca6b0c31e906974b0909be (diff) | |
download | teaqueue-34dbfc09093c882199fcee77c008fe74fb12102f.tar.gz teaqueue-34dbfc09093c882199fcee77c008fe74fb12102f.tar.bz2 teaqueue-34dbfc09093c882199fcee77c008fe74fb12102f.zip |
Merge conflict autocommit on 807fe7afb37fe2cfcf15c9457d04f64fa11b7511
Diffstat (limited to 'test2.sh')
-rwxr-xr-x | test2.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test2.sh b/test2.sh new file mode 100755 index 0000000..c4d433a --- /dev/null +++ b/test2.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -eux + +maxprocs=2 +while true; do + read filename <fifo + sh -c "sleep 10; echo 'done: $filename'" & + if test "$(jobs | wc -l)" -ge $maxprocs; then + wait + fi + sleep 1 +done |