I would like to start up multiple instances of syslog daemon. I am having a little difficulty. Is this at all possible?
I have separate syslog.conf1.... syslog.conf5 files.
I have linked the daemon to separate files syslogd1 ... syslogd5
I have arranged the rcd.2 start/stop scripts for... (9 Replies)
I am capturing text based reports with a specific program, which works no problem. However, since I send report warehouse output as they are migrated from the database software, on occasion when two capture process' initiate simultaneously, the capture file locks up. Is there a way to setup (in... (1 Reply)
Hi Gurus
I have a requirement like this. i use solaris OS..
if there are 2 instances of the same ksh file running in the directory, i need to kill the ksh file that started to run latest.
suppose ragha.ksh starts running thru cron in abc/xyz directory
now ragha.ksh started running by any... (3 Replies)
Hi,
I know that the answer to this is very simple, since I saw somebody do it some time back..but I forgot how.
The problem is, I have multiple instances of the same program running simultaneously and I want to kill them all in a single command.
I know that it can be done using awk '{print... (12 Replies)
Hi
I have a scenario where i need to check multiple instances of a running shell script (abc.sh) .
How can I find from inside a running shell script whether any other instance of the same script is running or not? If any other instance of same shell script is running I need to exit from... (4 Replies)
Hi,
This is my text file I'm trying to Grep.
Apple Location Greenland Rdsds dsds fdfd ddsads http Received Return Immediately Received End
My Grep command:
grep only--matching 'Location.*Received'
e.
Because the keyword Received appears twice, the Grep command will stop at the last... (0 Replies)
Hi,
This is my text file I'm trying to Grep.
Apple Location Greenland Rdsds dsds fdfd ddsads http Received Return Immediately Received End
My Grep command:
grep only--matching 'Location.*Received'
Because the keyword Received appears twice, the Grep command will stop at the last... (3 Replies)
Hello. This shouldn't be an unusual problem, but I cannot find anything about it at google or at other search machine.
So, I've made an application using C++ and QtCreator. I 've made a new mime type for application's project files.
My system (ubuntu 10.10), when I right click a file and I... (3 Replies)
Suppose I declare
pthread_t clear_thread;
and then
pthread_create(&clear_thread, &detach, clear_message, this);
the thread is supposed to go away, perform the service it is intended to procide, and then kill itself.
A little while later, I require this service again, so I say
... (2 Replies)
Discussion started by: clerew
2 Replies
LEARN ABOUT SUNOS
setsid
setsid(2) System Calls setsid(2)NAME
setsid - create session and set process group ID
SYNOPSIS
#include <sys/types.h>
#include <unistd.h>
pid_t setsid(void);
DESCRIPTION
The setsid() function creates a new session, if the calling process is not a process group leader. Upon return the calling process will be
the session leader of this new session, will be the process group leader of a new process group, and will have no controlling terminal. The
process group ID of the calling process will be set equal to the process ID of the calling process. The calling process will be the only
process in the new process group and the only process in the new session.
RETURN VALUES
Upon successful completion, setsid() returns the value of the process group ID of the calling process. Otherwise it returns (pid_t)-1 and
sets errno to indicate the error.
ERRORS
The setsid() function will fail if:
EPERM The calling process is already a process group leader, or the process group ID of a process other than the calling process
matches the process ID of the calling process.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |Async-Signal-Safe |
+-----------------------------+-----------------------------+
SEE ALSO getsid(2), setpgid(2), setpgrp(2), attributes(5), standards(5)WARNINGS
A call to setsid() by a process that is a process group leader will fail. A process can become a process group leader by being the last
member of a pipeline started by a job control shell. Thus, a process that expects to be part of a pipeline, and that calls setsid(), should
always first fork; the parent should exit and the child should call setsid(). This will ensure that the calling process will work reliably
when started by both job control shells and non-job control shells.
SunOS 5.10 21 Aug 2002 setsid(2)