Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

setsid(1) [x11r4 man page]

SETSID(1)                                                          User Commands                                                         SETSID(1)

NAME
setsid - run a program in a new session SYNOPSIS
setsid [options] program [arguments] DESCRIPTION
setsid runs a program in a new session. The command calls fork(2) if already a process group leader. Otherwise, it executes a program in the current process. OPTIONS
-c, --ctty Set the controlling terminal to the current one. -w, --wait Wait for the execution of the program to end, and return the exit value of this program as the return value of setsid. -V, --version Display version information and exit. -h, --help Display help text and exit. SEE ALSO
setsid(2) AUTHOR
Rick Sladkey <jrs@world.std.com> AVAILABILITY
The setsid command is part of the util-linux package and is available from https://www.kernel.org/pub/linux/utils/util-linux/. util-linux July 2014 SETSID(1)

Check Out this Related Man Page

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 terminal. 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
setsid(1), getsid(2), setpgid(2), setpgrp(2), tcgetsid(3), credentials(7) COLOPHON
This page is part of release 3.53 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 2013-02-11 SETSID(2)
Man Page

13 More Discussions You Might Find Interesting

1. IP Networking

Mandrake should be faster.

For some reason 8.1 Mandrake Linux seems much slower than Windows 2000 with my cable modem. DSL reports test says they conferable speed with Windows2 though. This is consistant slow with both of my boxes, at the same time. Linux used to be faster, but not with Mandrake. Any way to fix this? (17 Replies)
Discussion started by: lancest
17 Replies

2. UNIX for Dummies Questions & Answers

Installation problems!

Hello, I just wanted to install a red hat on my pc, it says that it can not find a file! and i should click return! When I click ok or I use esc, it does not work! Just the error page returns!! and then i formated my pc due to this error :( plz help me! (13 Replies)
Discussion started by: creative
13 Replies

3. UNIX for Dummies Questions & Answers

need unix os

Wher can i get a copy of unix os ? someone might want to give me a big help, thanks (13 Replies)
Discussion started by: rancak
13 Replies

4. UNIX for Dummies Questions & Answers

UNIX Operating System

Hello Everyone, I'm new to this forum and Unix. I have a couple of questions and please, excuse my ignorance. I have a spare machine which is now running MS Windows 98 and I would like to format the disk and install the Unix operating system along with Oracle 8i and SQL Server. My... (13 Replies)
Discussion started by: IronBear
13 Replies

5. Post Here to Contact Site Administrators and Moderators

what happened?

A few hours ago I made several reasonable posts to this forum and now they have dissapeared. I read and followed the rules, and I sure didn't break any, but gone they are :( I know I only joined the forum today, but do the posts have to be authorised or something? ... (14 Replies)
Discussion started by: cw1972
14 Replies

6. Programming

Controlling child processes

Hello all, I am trying to create n child processes and control them from a parent process; say make child 3 print its pid and then child 5 do the same and some other stuff. Is there a way to accomplishing this after all the child processes are created via a call to fork(). Thank you, FG (23 Replies)
Discussion started by: forumGuy
23 Replies

7. Slackware

Windows Emulator?

I have heard of something called a windows emulator that allows you to run windows programs in linux, does this realy work? can I run any windows program (like a computer game)? and where can I get it :p (13 Replies)
Discussion started by: Kimm
13 Replies

8. SuSE

PhPMyAdmin basic set up on SUSE linux 9.1

Hey, I was wondering if anybody could help me setup my PhpMyAdmin on my SUSE linux 9.1 machine. I want to use it to access MySQL server instead of the defualt MySQLCC-Console Manager. I have not tried yet but i have done a such and it's installed in one of the folders. I would like to point... (15 Replies)
Discussion started by: sybella1
15 Replies

9. Programming

Error need help

Dear all I am receiving the bellow error. Please help me how to over the error. couliba@linux:~/bin/Ga> make find_rules cc find_rules.c -o find_rules In file included from find_rules.c:19: util.h:15: error: syntax error before '*' token util.h:15: error: conflicting types for... (19 Replies)
Discussion started by: coulio
19 Replies

10. Programming

Cannot catch SIGINT while serial break condition occurs

I setup termios structure with IGNBRK is not set and BRKINT is set. To allow the process to receive signals I call: fcntl(fd, F_SETOWN, getpid()); I have made a signal handler to catch all signals. I can catch SIGINT when pressing ctrl+c but when I send break signal over serial then it cannot... (13 Replies)
Discussion started by: gzz
13 Replies

11. Solaris

Shell

Hi folks, How can I change a terminal to display different things in different collors.. for example, folders in blue, scripts in green... as it works in Linux?? Thanks for any tip! Fernanda (21 Replies)
Discussion started by: ffpradella
21 Replies

12. Linux

Setting up crontab, still cant get it to work

OK I have been working on this simple action for a while and I cannot get it to work. First off im new to the linux command line world. I feel like I am missing something simple. What I am trying to achieve is that I want this command: tcpdump -s2000 -w'flowroute-%H%M.pcap' -G900 -W36 &to... (13 Replies)
Discussion started by: Nasasdge
13 Replies

13. Linux

Ambiguous redirect error and syntax error when using on multiple files

Hi, I need help on following linux bash script. When I linux commands for loop or while loop on individual file it runs great. but now I want the script to run on N number of files so it gives me ambiguous redirect error on line 12 and syntax error on line 22 : (pls help ); #!/bin/bash #... (16 Replies)
Discussion started by: Madhusudan Das
16 Replies