diff --git a/system/res/sentinel.bash b/system/res/sentinel.bash index 6fedfc0..c74b844 100755 --- a/system/res/sentinel.bash +++ b/system/res/sentinel.bash @@ -15,7 +15,6 @@ while read -t2 -a cmd; do fi uuid="${cmd[1]}" args=("${cmd[@]:2}") - echo >&2 "${cmd[0]} ${args[0]} with UUID ${uuid}" input="/var/cache/riju/share/cmd-${uuid}-input" output="/var/cache/riju/share/cmd-${uuid}-output" mkfifo "${input}" "${output}" diff --git a/system/src/riju-pty.c b/system/src/riju-pty.c index 1781a3f..0159efa 100644 --- a/system/src/riju-pty.c +++ b/system/src/riju-pty.c @@ -100,10 +100,12 @@ int main(int argc, char **argv) int wstatus; if (waitpid(exec_pid, &wstatus, 0) != exec_pid) die("waitpid failed"); - if (signal(SIGTERM, SIG_IGN) == SIG_ERR) - die("signal failed"); - if (kill(0, SIGTERM) < 0) - die("kill failed"); + if (!no_pty) { + if (signal(SIGTERM, SIG_IGN) == SIG_ERR) + die("signal failed"); + if (kill(0, SIGTERM) < 0) + die("kill failed"); + } return WEXITSTATUS(wstatus); } char buf[1024];