09-09-2002
To guarantee that processes in a process group are in the same session. Once this guarantee is in place you can think of a session as a collection of process groups.
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
All,
I have a file with text as shown below. I want the o/p file with generated values in the first column as shown in the o/p file. Pls note that the size of my file is 6 GB. How do i do this ?
Input file
999999abcdef
999999ghijkl
999999mnopq
777777rosesarered
777777skyisblue
Output... (1 Reply)
Discussion started by: ajfaq
1 Replies
2. UNIX for Dummies Questions & Answers
Hell Sir,
This is chanikya
Is there any System call which behaves just like fork but i dont want to return back two times to the calling func.
In the following ex iam creating a child process in the called func but the ex prints two times IN MAIN.
ex :-
calling()
{
fork();
}
... (2 Replies)
Discussion started by: chanikya
2 Replies
3. Shell Programming and Scripting
Hi,
I want to put the following code as a parallel or background process
The program is as below:
$n=10; #Count of files to be created.
for($j=0;$j<=$n;$j++) {
open(FH,">files_$j.txt") || warn "cannot create a file\n";
{
print FH "count of file: $j\n"; #Sample data to be written. just... (5 Replies)
Discussion started by: vanitham
5 Replies
4. UNIX for Dummies Questions & Answers
I have a multithreaded usermode program(actually a daemon) which is in hanged state.
To debug it I tried attaching the process to gdb, but the gdb hangs.
gstack also gets hanged.
I peeped into the proc file system and saw the process to be in sleeping state.
/proc/sysrq-trigger I guess... (1 Reply)
Discussion started by: rupeshkp728
1 Replies
5. Shell Programming and Scripting
I would like to create the following script:
run a python script with setsid
python may or may not fail with exception
check if all of the group processes were terminated correctly
if not, kill the remaining processes
How can I do that?
Thanks a lot (3 Replies)
Discussion started by: ASF Studio
3 Replies
6. UNIX for Beginners Questions & Answers
Hello and thanks in advance for any help anyone can offer me
I've been reading up on process signal calls (sighup, sigint, sigkill & sigterm) and I understand they all have different methods of terminating a running process. From what I've also read is a exit() actually terminates a process. ... (2 Replies)
Discussion started by: bodisha
2 Replies
7. What is on Your Mind?
Yup it's true:
Transfer of power
This will put Python development in disarray.
Which reminded me of this thread I posted some time ago:
https://www.unix.com/what-is-on-your-mind-/249767-has-python-lost-plot.html
MadeInGermany's post 3 is probably one of the reasons but not quoted.... (1 Reply)
Discussion started by: wisecracker
1 Replies
8. Shell Programming and Scripting
I am running the below loop that to process the 3 bam files (which isn't always the case). A .py executable is then called using | xargs sh to further process. If I just run it with echo the output is fine and expected, however when
| xargs sh is added I get the error. I tried adding | xargs... (4 Replies)
Discussion started by: cmccabe
4 Replies
LEARN ABOUT DEBIAN
setsid
SETSID(2) Linux Programmer's Manual SETSID(2)
NAME
setsid - creates a session and sets the process group ID
SYNOPSIS
#include <unistd.h>
pid_t setsid(void);
DESCRIPTION
setsid() creates a new session if the calling process is not a process group leader. The calling process is the leader of the new session,
the process group leader of the new process group, and has no controlling tty. The process group ID and session ID of the calling process
are set to the PID of the calling process. The calling process will be the only process in this new process group and in this new session.
RETURN VALUE
On success, the (new) session ID of the calling process is returned. On error, (pid_t) -1 is returned, and errno is set to indicate the
error.
ERRORS
EPERM The process group ID of any process equals the PID of the calling process. Thus, in particular, setsid() fails if the calling
process is already a process group leader.
CONFORMING TO
SVr4, POSIX.1-2001.
NOTES
A child created via fork(2) inherits its parent's session ID. The session ID is preserved across an execve(2).
A process group leader is a process with process group ID equal to its PID. In order to be sure that setsid() will succeed, fork(2) and
_exit(2), and have the child do setsid().
SEE ALSO
getsid(2), setpgid(2), setpgrp(2), tcgetsid(3), credentials(7)
COLOPHON
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2008-12-03 SETSID(2)