06-06-2011
execl() destroys your current process, replacing itself with whatever you told it to run. If you want it to run a process and return, try system().
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi
I have a shell script A which calls another 10 shell scripts which run in background. How do i make the parent script wait for the child scripts complete, or in other words, i must be able to do a grep of parent script to find out if the child scripts are still running.
My Code:
... (1 Reply)
Discussion started by: albertashish
1 Replies
2. Programming
Hi All,
I will be glad if you could help me resolve this problem.
I have created two detachable threads and wanted to them execute independent of the parent thread ( the main task which creates the detachable threads). But I see no output coming from the execution of two detachable threads.... (4 Replies)
Discussion started by: jayfriend
4 Replies
3. Shell Programming and Scripting
Hi All,
I have two ksh script. 1st script calls the 2nd script and the second script calls an 'C' program.
I want 1st script to wait until the 'C' program completes.
I cant able to get the process id for the 'C' program (child process) to make the 1st script to wait for the second... (7 Replies)
Discussion started by: sennidurai
7 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
I facing a problem in handling signals between parent process communication. I am trying to send a signal(SIGINT) from child to parent. I am using kill function to do so and I am trying to read the signal using sigaction(). But the program is ending abruptly and I am not able to figure out... (4 Replies)
Discussion started by: vkn_1985
4 Replies
5. Programming
Hi, i want that the parent process start before the child, this code doesn't work,
if the child start before the parent it wait for signal, then the father send the signal SIGALRM and the child catch it and call printf;
else the father call printf and send the signal to the child that call its... (1 Reply)
Discussion started by: blob84
1 Replies
6. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
I need to make an program that in a loop creates one parent and five children with fork(). The problem i'm trying to solve is how to delete the parent and child of the childīs process.
2. Relevant commands, code, scripts,... (0 Replies)
Discussion started by: WhiteFace
0 Replies
7. Emergency UNIX and Linux Support
Hello, everyone.
Here's a program:
pid_t pid = fork();
if (0 == pid) // child process
{
execvp ...;
}
I send a signal (such as SIGINT) to the parent process, the child process receive the signal as well as the parent process.
However I don't want to child process to receive the... (7 Replies)
Discussion started by: jackliang
7 Replies
8. Shell Programming and Scripting
Hi everyone
i am very new to linux , working on bash shell.
I am trying to solve the given problem
1. Create a process and then create children using fork
2. Check the Status of the application for successful running.
3. Kill all the process(threads) except parent and first child... (2 Replies)
Discussion started by: vizz_k
2 Replies
9. Shell Programming and Scripting
I have two scripts lets say A.expect and B.sh needs to be executed.
I am executing B.sh from A.expect where B.sh has sleep command.
My problem is that when B.sh encounters the sleep command my A.expect starts executing and exits.
but my A.expect should execute only after completing B.sh.
Is... (3 Replies)
Discussion started by: priya@2012
3 Replies
10. Shell Programming and Scripting
Hi all,
I am starting mgen5 for sometime depends on input from a file, in a child process. now I want to make parent to wait in this child process till mgen5 finishes, or timeout happens.
could anyone please tell me how to make parent to wait in child process in shell script?
thanks... (2 Replies)
Discussion started by: girijajoshi
2 Replies
LEARN ABOUT HPUX
serialize
serialize(2) System Calls Manual serialize(2)
NAME
serialize() - force target process to run serially with other processes
SYNOPSIS
DESCRIPTION
The system call is used to force the target process referenced by the pid value passed in to run serially with other processes also marked
for serialization. If the value of pid is zero, then the currently running process is marked for serialization. Once a process has been
marked by the process stays marked until process completion, unless is reissued on the serialized process with timeshare set to 1. If
timeshare is set to 1, the process specified in pid will be returned to normal timeshare scheduling algorithms.
This call is used to improve process throughput since process throughput usually increases for large processes when they are executed seri-
ally instead of allowing each program to run for only a short period of time. By running large processes one at a time, the system makes
more efficient use of the CPU as well as system memory, since each process does not end up constantly faulting in its working set, to only
have the pages stolen when another process starts running. As long as there is enough memory in the system, processes marked by behave no
differently from other processes in the system. However, once memory becomes tight, processes marked by are run one at a time with the
highest priority processes being run first. Each process runs for a finite interval of time before another serialized process is allowed
to run.
RETURN VALUE
returns zero upon successful completion, or nonzero if the system call failed.
ERRORS
If fails, it sets (see errno(2)) to the following value:
The pid passed in does not exist.
WARNINGS
The user has no way of forcing an execution order on serialized processes.
AUTHOR
was developed by HP.
SEE ALSO
serialize(1), privileges(5).
serialize(2)