A POSIX system call to create a new session and set the process group ID
Questions tagged [setsid]
20 questions
1
vote
1 answer
Why doesn't my daemon terminate when I log out?
I'm reading about Linux process groups and sessions. From this site I see:
When a user logs out of a system, the kernel needs to terminate all the processes the user had running...To simplify this task, processes are organized into sets of…

Tom
- 18,685
- 15
- 71
- 81
0
votes
1 answer
Why will setsid not start any of my executable scripts?
I am currently writing a script that is writing scripts and then executing them.
The user that is running the parent script is the root user.
Here is the code:
1 for i in $(seq 1 $num)
2 do
3
4
5 scriptL1="#!/bin/bash"
6 …

Eric Ovenden
- 5
- 2
0
votes
0 answers
Run a shell script with setsid in it error
I made shell script to run my task with many seeds. Here is my shell script
task.sh
for i in 1 2 3 4 5
do
setsid python main.py --random-seed 24 1>data/${i}_24.log 2>&1
sleep 3
done
echo "OK 1"
for i in 1 2 3 4 5
do
setsid python…

GoingMyWay
- 16,802
- 32
- 96
- 149
0
votes
1 answer
setsid is not working, giving error
I want to run a script as a process. so running below command,
setsid test.sh > test.log &
But giving error as below,
setsid: failed to execute test.sh: No such file or directory
Whats wrong here? I have test.sh file with execute permission in…

Chintamani Manjare
- 1,543
- 1
- 13
- 28
-1
votes
1 answer
Sending SIGINT signal to child process that uses execvp in C
I'm making a shell in C and I need to be able to handle SIGINT and SIGTSTP signals so as the shell doesn't terminate but it passes the signals to the child processes. I've found various posts here saying I should either use kill(child_pid,SIGINT) in…

stefnto
- 85
- 3
- 8