08-19-2008
Hi,I am also having problems in background processes for my shell...
how do i set the control terminal of my bg process?do i need to use the signals SIGTTIN and SIGTTOU?
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
How do you capture the return code from a background process?
I am dumping data to a fifo and then processing it in a c program.
I need to know that the sql finished successfully to ensure no missing data. Thanks.
ex.
sqlplus user/password < get_data.sql > data_fifo.txt &
bin/process_data... (2 Replies)
Discussion started by: korndog
2 Replies
2. Shell Programming and Scripting
hi there,
here's what i need in my korn-shell:
... begin korn-shell script
... nohup process_A.ksh ; nohup process_B.ksh &
... "other stuff"
... end lorn-shell script
in plain english i want process A and process B to run in the background so that the script can continue doing... (6 Replies)
Discussion started by: jacob_gs
6 Replies
3. Programming
Hey guys,
I am writing a very simple dummy shell in C++ and I am having trouble getting a process to run in the background. First of all, the shell has to recognize when I input a "&" at the end of the command, then it has to stick it in the background of the shell.
I understand that if I want... (6 Replies)
Discussion started by: icer
6 Replies
4. SuSE
I have installed oracle 10g on suse sles9. I do not see oracle background processes.
ps -ef|grep ora_ gives me environment variables junk.
ps -ef|grep smon does not show anything however database is up and running.
Any idea how to tweak that? (1 Reply)
Discussion started by: vijayasawant
1 Replies
5. Shell Programming and Scripting
I've got a bit of code I'm trying to work on...
What i want to happen is ... at all times have four parallel mysql dump and imports running.
I found the follow code snippet on the forum and modified it to work
by starting four concurrent processes but it waits until all four are done before... (7 Replies)
Discussion started by: dgob123
7 Replies
6. UNIX for Dummies Questions & Answers
Hi,
Inorder to improve the performance, I am trying to execute my command as a background process..
For eg: To zip large numbers of files present in a directory instead of using a single process, i do follow the below method:
gunzip -c > / &... (3 Replies)
Discussion started by: unni.raj
3 Replies
7. Solaris
Hi,
I need to establish a procedure that will start an application in background each time my remote Solaris server is (re)started. This would be a kind of daemon. I am no sysadmin expert, so I am looking for pointers.
How should I proceed? What are the main steps?
Thanks,
JVerstry (9 Replies)
Discussion started by: JVerstry
9 Replies
8. Shell Programming and Scripting
Ok guys so I have my first dummy shell almost done except for one tiny part: I do not know how to run a process in the background, from the code!
I already know how to do that in a normal shell:
$ program &
However, no clue when it comes to how to program that thing. :eek:
A very... (2 Replies)
Discussion started by: Across
2 Replies
9. Shell Programming and Scripting
Hi,
I have a schell script parent.ksh from which I am calling three background processes a.ksh,b.ksh and c.ksh. Once these three processes completes the next step in parent.ksh should execute. How to achieve this?
Please help me....
Thanks... (1 Reply)
Discussion started by: ravinunna
1 Replies
10. UNIX for Advanced & Expert Users
How do I list the process in a Unix based system which are running in background?
The following are options that I'm aware of, but they may not be appropiate.
a. using ps -ef , and getting records of processes for which STATUS='S'(uninterruptible sleep)
b. using jobs -l, and filtering... (5 Replies)
Discussion started by: kumarjt
5 Replies
KILL(2) BSD System Calls Manual KILL(2)
NAME
kill -- send signal to a process
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <sys/types.h>
#include <signal.h>
int
kill(pid_t pid, int sig);
DESCRIPTION
The kill() system call sends the signal given by sig to pid, a process or a group of processes. The sig argument may be one of the signals
specified in sigaction(2) or it may be 0, in which case error checking is performed but no signal is actually sent. This can be used to
check the validity of pid.
For a process to have permission to send a signal to a process designated by pid, the user must be the super-user, or the real or saved user
ID of the receiving process must match the real or effective user ID of the sending process. A single exception is the signal SIGCONT, which
may always be sent to any process with the same session ID as the sender. In addition, if the security.bsd.conservative_signals sysctl is
set to 1, the user is not a super-user, and the receiver is set-uid, then only job control and terminal control signals may be sent (in par-
ticular, only SIGKILL, SIGINT, SIGTERM, SIGALRM, SIGSTOP, SIGTTIN, SIGTTOU, SIGTSTP, SIGHUP, SIGUSR1, SIGUSR2).
If pid is greater than zero:
The sig signal is sent to the process whose ID is equal to pid.
If pid is zero:
The sig signal is sent to all processes whose group ID is equal to the process group ID of the sender, and for which the process has
permission; this is a variant of killpg(2).
If pid is -1:
If the user has super-user privileges, the signal is sent to all processes excluding system processes (with P_SYSTEM flag set),
process with ID 1 (usually init(8)), and the process sending the signal. If the user is not the super user, the signal is sent to
all processes with the same uid as the user excluding the process sending the signal. No error is returned if any process could be
signaled.
For compatibility with System V, if the process number is negative but not -1, the signal is sent to all processes whose process group ID is
equal to the absolute value of the process number. This is a variant of killpg(2).
RETURN VALUES
The kill() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate
the error.
ERRORS
The kill() system call will fail and no signal will be sent if:
[EINVAL] The sig argument is not a valid signal number.
[ESRCH] No process or process group can be found corresponding to that specified by pid.
[EPERM] The sending process does not have permission to send sig to the receiving process.
SEE ALSO
getpgrp(2), getpid(2), killpg(2), sigaction(2), sigqueue(2), raise(3), init(8)
STANDARDS
The kill() system call is expected to conform to ISO/IEC 9945-1:1990 (``POSIX.1'').
HISTORY
The kill() function appeared in Version 7 AT&T UNIX.
BSD
March 15, 2012 BSD