Hi,
when I execute a script on unix AIX, I've got an error message:
"Execution: 85328 Signal d'alarme".
If I edit this file with "vi", I ve got the same error after a while (about 1 minute).
If I try with another user I still have the problem.
But if I rename this file, no problem.
My... (5 Replies)
Hi everyone,
Is there a variable or built in function in the Unix env. for me to obtain the name of a signal that is caught? As far as I understand only a numeric value of the signal is returned to the handler.
For example:
void handler (int signum)
{
... (2 Replies)
Hello e'bdy,
We have WebSphere MQ running on AIX 5.1
Every weekend MQ receives a kill -30 signal from some process or user and offloads a big error file. There is no way in MQ through which that process can be tracked.
Is there something which i can do on UNIX level to trap the process?
Best... (3 Replies)
Hello,
I'm doing a project of OS simulation (Process Scheduling, to be very specific). Can anyone, please, explain what exactly happens in the background when we see "Sending all processes the KILL signal...........". How is it sent to each process? Is it that something like a boolean is stored... (3 Replies)
Who can explain the meaning of the &2 &1 or @, #, etc in the script?
Is there any document which can explain the usage of these words in details?
for example:
ls /etc/sysconfig/network > /dev/null 2>&1
#@
bash, ksh and sh.
Thanks in advance for ur advice. (1 Reply)
I have a script which invoke a java program, because the program requires file as input, hence the script would sleep a X seconds then check for file existence, if the file exists then program is invoker else, keep waiting until the time is up. My problem is that if there is a way to find out if my... (1 Reply)
Hi!
I want to catch all signals that my program receives print their name and then execute the default handler.
Can you help me on that?
I've tried the following code:
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
void (*hnd)(int i);
char signals =
{
"SIGHUP",... (7 Replies)
Hi all
I have Master script, Main script ,and 4 Child script.
Master.sh
#!/bin/bash
/export/home/user/Main.shMain.sh
#!/bin/bash
/export/home/user/Child1.sh &
/export/home/user/Child2.sh &
/export/home/user/Child3.sh &
/export/home/user/Child4.sh &I run only Master.sh script... (1 Reply)
A program have to receive signals and work agreed with it, but the process have to receive more than one signal when it is attending other. Those have to be queued to be attended later recived.
how can i do that?
thanks. (2 Replies)
Hello I want to know how can i use signal function in c for keyboard interrupt handling. what i exactly want is : my program is processing and if i press any key while processing , the program should call the interrupt and displays/prints that key and now goes back to processing.
I added the... (5 Replies)
Discussion started by: Jahanzeb
5 Replies
LEARN ABOUT SUSE
runsv
runsv(8) System Manager's Manual runsv(8)NAME
runsv - starts and monitors a service and optionally an appendant log service
SYNOPSIS
runsv service
DESCRIPTION
service must be a directory.
runsv switches to the directory service and starts ./run. If ./run exits and ./finish exists, runsv starts ./finish. If ./finish doesn't
exist or ./finish exits, runsv restarts ./run.
If ./run or ./finish exit immediately, runsv waits a second before starting ./finish or restarting ./run.
Two arguments are given to ./finish. The first one is ./run's exit code, or -1 if ./run didn't exit normally. The second one is the least
significant byte of the exit status as determined by waitpid(2); for instance it is 0 if ./run exited normally, and the signal number if
./run was terminated by a signal. If runsv cannot start ./run for some reason, the exit code is 111 and the status is 0.
If the file service/down exists, runsv does not start ./run immediately. The control interface (see below) can be used to start the ser-
vice and to give other commands to runsv.
If the directory service/log exists, runsv creates a pipe, redirects service/run's and service/finish's standard output to the pipe,
switches to the directory service/log and starts ./run (and ./finish) exactly as described above for the service directory. The standard
input of the log service is redirected to read from the pipe.
runsv maintains status information in a binary format (compatible to the daemontools' supervise program) in service/supervise/status and
service/log/supervise/status, and in a human-readable format in service/supervise/stat, service/log/supervise/stat, service/supervise/pid,
service/log/supervise/pid.
CONTROL
The named pipes service/supervise/control, and (optionally) service/log/supervise/control are provided to give commands to runsv. You can
use sv(8) to control the service or just write one of the following characters to the named pipe:
u Up. If the service is not running, start it. If the service stops, restart it.
d Down. If the service is running, send it a TERM signal, and then a CONT signal. If ./run exits, start ./finish if it exists.
After it stops, do not restart service.
o Once. If the service is not running, start it. Do not restart it if it stops.
p Pause. If the service is running, send it a STOP signal.
c Continue. If the service is running, send it a CONT signal.
h Hangup. If the service is running, send it a HUP signal.
a Alarm. If the service is running, send it a ALRM signal.
i Interrupt. If the service is running, send it a INT signal.
q Quit. If the service is running, send it a QUIT signal.
1 User-defined 1. If the service is running, send it a USR1 signal.
2 User-defined 2. If the service is running, send it a USR2 signal.
t Terminate. If the service is running, send it a TERM signal.
k Kill. If the service is running, send it a KILL signal.
x Exit. If the service is running, send it a TERM signal, and then a CONT signal. Do not restart the service. If the service is
down, and no log service exists, runsv exits. If the service is down and a log service exists, runsv closes the standard input of
the log service, and waits for it to terminate. If the log service is down, runsv exits. This command is ignored if it is given to
service/log/supervise/control.
Example: to send a TERM signal to the socklog-unix service, either do
# sv term /etc/service/socklog-unix
or
# printf t >/etc/service/socklog-unix/supervise/control
printf(1) usually blocks if no runsv process is running in the service directory.
CUSTOMIZE CONTROL
For each control character c sent to the control pipe, runsv first checks if service/control/c exists and is executable. If so, it starts
service/control/c and waits for it to terminate, before interpreting the command. If the program exits with return code 0, runsv refrains
from sending the service the corresponding signal. The command o is always considered as command u. On command d first service/control/t
is checked, and then service/control/d. On command x first service/control/t is checked, and then service/control/x. The control of the
optional log service cannot be customized.
SIGNALS
If runsv receives a TERM signal, it acts as if the character x was written to the control pipe.
EXIT CODES
runsv exits 111 on an error on startup or if another runsv is running in service.
runsv exits 0 if it was told to exit.
SEE ALSO sv(8), chpst(8), svlogd(8), runit(8), runit-init(8), runsvdir(8), runsvchdir(8), utmpset(8)
http://smarden.org/runit/
AUTHOR
Gerrit Pape <pape@smarden.org>
runsv(8)