mirror of
https://framagit.org/ppom/reaction
synced 2026-03-14 20:55:47 +01:00
The stream_manager is now the sole owner of the child process handle and is responsible for cleaning it. The stream_manager expects a shutdown command from the broadcast channel it receives as parameter and watches it concurrently with the child process I/O. When the shutdown command is received, the child process is killed and the remaining I/O is processed. Then the child process is reaped. Or it is killed and reaped after EOF is encountered, would the child process exit before (or at the same time as) the shutdown command is issued.
26 lines
365 B
Jsonnet
26 lines
365 B
Jsonnet
{
|
|
patterns: {
|
|
zero: {
|
|
regex: @'0',
|
|
},
|
|
},
|
|
|
|
streams: {
|
|
idle: {
|
|
cmd: ['sh', '-c', 'while true; do sleep 1; done'],
|
|
filters: {
|
|
filt1: {
|
|
regex: [
|
|
@'abc',
|
|
],
|
|
actions: {
|
|
act: {
|
|
cmd: ['echo', '1'],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|
|
|