~emersion/mrsh

34bbe8a34d40c899436a8cd0f11e4dc41b870907 — Simon Ser 8 months ago 287f4e2
Don't send SIGHUP to processes that exited
1 files changed, 3 insertions(+), 0 deletions(-)

M shell/process.c
M shell/process.c => shell/process.c +3 -0
@@ 86,6 86,9 @@ void broadcast_sighup(struct mrsh_state *state) {

	for (size_t i = 0; i < priv->processes.len; ++i) {
		struct mrsh_process *proc = priv->processes.data[i];
		if (process_poll(proc) >= 0) {
			continue;
		}
		if (kill(proc->pid, SIGHUP) != 0) {
			perror("kill");
		}