diff options
author | Thomas White <taw@physics.org> | 2020-05-08 15:09:46 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-07-29 18:42:57 +0200 |
commit | c03df15d71cf443f44a438f6d9dd99ab8259bcd5 (patch) | |
tree | 56b30fbf2cfc33324b63b11b4e3229e17e0a2be9 /src/im-sandbox.c | |
parent | 184a643f177363b8cb2a44dd04221de556cebec0 (diff) |
indexamajig: Run in own process group
Normally, the shell puts indexamajig into its own process group, so that
the entire program (including subprocesses) can be killed easily.
However, this doesn't happen when running from the GUI. So, it needs to
be done manually.
Diffstat (limited to 'src/im-sandbox.c')
-rw-r--r-- | src/im-sandbox.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/im-sandbox.c b/src/im-sandbox.c index d7481f34..271616d1 100644 --- a/src/im-sandbox.c +++ b/src/im-sandbox.c @@ -1079,6 +1079,9 @@ int create_sandbox(struct index_args *iargs, int n_proc, char *prefix, return 0; } + setsid(); + setpgid(0, 0); + sb->n_processed_last_stats = 0; sb->t_last_stats = get_monotonic_seconds(); sb->n_proc = n_proc; |