07-30-2009
But once the daemon killed more than 5 times, it won't start again by inittab.
Solaris will write "off" into this entry under /etc/inittab.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a process that is in the sleeping state "S" and I have tried to stop it with a run control script that I use to stop/start it - but it does not stop.
I have tried kill -9 <PID of process> with no change. I imagine that this process is sleeping with the kernel.
It does not respond to... (5 Replies)
Discussion started by: finster
5 Replies
2. UNIX for Dummies Questions & Answers
Suppose we have the following process tree:
init-> ProcessA->processB->processC
then I kill processB
Who is the parent of the processC?
init or the processA (6 Replies)
Discussion started by: Puntino
6 Replies
3. Programming
We are forking a process B from process A and the process B should display the details it reads from process C(daemon process) continuously.
Let us say that the process C sents 100 packets.The process B receives all the 100 packets from the process C before it prints all details of 31... (1 Reply)
Discussion started by: cijkmysj
1 Replies
4. Shell Programming and Scripting
I have this shell script and in case the sybase process is been killed how can identify whether the process was killed or not, as the error code always returns 0.
#!/bin/sh
isql -S SERVER -U user -P pass<<TOP
select * from tableName
go
TOP
echo $? (2 Replies)
Discussion started by: dinjo_jo
2 Replies
5. Solaris
Hi all,
Currently I am using LDAP to store some network related data, When I run following script
./ns-slapd ldif2db
Execution of above script terminates displaying "Killed" on the console.
As far as I know, a process can be killed by two ways-
1. manually running " kill -9 <PID of LDAP... (1 Reply)
Discussion started by: akash_mahakode
1 Replies
6. UNIX for Dummies Questions & Answers
HI all,
I am very new to AIX (matter of fact Unix). We are currently automating out manual process using Unix Shell Scripting.
My wrote a shell script which will accept the name of the sas job as parameter, checks the existense of the sas file in the specified folder.
If it is not present,... (1 Reply)
Discussion started by: anubhav2020
1 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have a process which takes 13-15 mins for execution and its getting killed in the meantime.So can you please helpme out how to protect the process from getting killed.
Thanks in advance.
Regards,
Harika (9 Replies)
Discussion started by: harikagrp
9 Replies
8. UNIX for Dummies Questions & Answers
Hi reader,
I'm making a tool out of korn shell script that is running on a HP-UX server. But everytime i invoke the tool, it gets killed after a while (mid-process). I have tried re-running it a couple of times but each invocation ending up the same way ..
following is a snippet of the o/p... (8 Replies)
Discussion started by: clakkad
8 Replies
9. Shell Programming and Scripting
Hi,all.Well,I know someone has already asked this question before,however,It's too long before.So i post a new thread here.
Here is the issue.I have a shell script that use awk to calculate something and the script takes about 15 mins,it will use 100% CPU,and the system automatically killed the... (2 Replies)
Discussion started by: homeboy
2 Replies
10. Shell Programming and Scripting
I have two set of questions.
1) To skip killing some process automatically.
2) To kill other process and capture their log.
I have set of process, some needs to be killed gracefully and others should be skipped.
Listed are the process.
adm 1522... (1 Reply)
Discussion started by: murali1687
1 Replies
LEARN ABOUT FREEBSD
daemon
DAEMON(8) BSD System Manager's Manual DAEMON(8)
NAME
daemon -- run detached from the controlling terminal
SYNOPSIS
daemon [-cfr] [-p child_pidfile] [-P supervisor_pidfile] [-u user] command arguments ...
DESCRIPTION
The daemon utility detaches itself from the controlling terminal and executes the program specified by its arguments. Privileges may be low-
ered to the specified user.
The options are as follows:
-c Change the current working directory to the root (``/'').
-f Redirect standard input, standard output and standard error to /dev/null.
-p child_pidfile
Write the ID of the created process into the child_pidfile using the pidfile(3) functionality. The program is executed in a spawned
child process while the daemon waits until it terminates to keep the child_pidfile locked and removes it after the process exits.
The child_pidfile owner is the user who runs the daemon regardless of whether the -u option is used or not.
-P supervisor_pidfile
Write the ID of the daemon process into the supervisor_pidfile using the pidfile(3) functionality. The program is executed in a
spawned child process while the daemon waits until it terminates to keep the supervisor_pidfile locked and removes it after the
process exits. The supervisor_pidfile owner is the user who runs the daemon regardless of whether the -u option is used or not.
-r Supervise and restart the program if it has been terminated.
-u user
Login name of the user to execute the program under. Requires adequate superuser privileges.
If the -p, -P or -r option is specified the program is executed in a spawned child process. The daemon waits until it terminates to keep the
pid file(s) locked and removes them after the process exits or restarts the program. In this case if the monitoring daemon receives software
termination signal (SIGTERM) it forwards it to the spawned process. Normally it will cause the child to exit, remove the pidfile(s) and then
terminate.
The -P option is useful combined with the -r option as supervisor_pidfile contains the ID of the supervisor not the child. This is especially
important if you use -r in an rc script as the -p option will give you the child's ID to signal when you attempt to stop the service, causing
daemon to restart the child.
EXIT STATUS
The daemon utility exits 1 if an error is returned by the daemon(3) library routine, 2 if child_pidfile or supervisor_pidfile is requested,
but cannot be opened, 3 if process is already running (pidfile exists and is locked), otherwise 0.
DIAGNOSTICS
If the command cannot be executed, an error message is displayed on standard error unless the -f flag is specified.
SEE ALSO
setregid(2), setreuid(2), daemon(3), exec(3), pidfile(3), termios(4), tty(4)
HISTORY
The daemon utility first appeared in FreeBSD 4.7.
BSD
September 13, 2013 BSD