08-01-2008
no crossposts! read the rules of unix.com. thread closed...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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:
... (5 Replies)
Discussion started by: albertashish
5 Replies
2. Shell Programming and Scripting
Hi All,
I have a script which calls a child script with a parameter to be run in the background
. childscript.ksh $a &
Can any one suggest me how do i export a variable from the child script to parent script?
Note that the child script is in background
If the child script is in... (3 Replies)
Discussion started by: aixjadoo
3 Replies
3. 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
4. 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
5. Shell Programming and Scripting
I am trying to find a list of files and writing it to a text file. Based on the machine performance the file writing will be slow at certain time.
The code to find file and redirecting the output to text file is on a shell script
/usr/bin/find $SEARCH_DIR -daystart \( \( -name 'KI*' -a... (4 Replies)
Discussion started by: nuthalapati
4 Replies
6. Programming
Hello,
I have the following problem:
I have makefileproj and makefilemod in a build process for a complex project - from makefileproj I call the makefilemod.
In makefilemod I generate a list containing objects eg,: "../../../25_Build/Results/Objects/FBL/Fls.o... (4 Replies)
Discussion started by: marina_lmv
4 Replies
7. Programming
Hello. I want to make a child do some stuff,wait,then the parent does some stuff and then child does some stuff and waits again.I have made the following but it does not work.Can anybody help me?
pid1 = fork();
if (pid1 == -1)
{
perror("Can't create child\n");
... (18 Replies)
Discussion started by: Cuervo
18 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
hi,
i want to call a child shell script from a parent shell script. the child will be running for 5 mins. normally when the child is running, parent will wait till the child completes. so in the above case parent will be paused for 5 mins. is there a way so that the parents does not wait for the... (3 Replies)
Discussion started by: Little
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
pthread_cancel
pthread_cancel(3T) pthread_cancel(3T)
NAME
pthread_cancel() - cancel execution of a thread
SYNOPSIS
PARAMETERS
thread Target thread to be canceled.
DESCRIPTION
requests that thread (hereby referred to as target thread) be canceled. It allows a thread to terminate the execution of any thread in the
process in a controlled manner.
The target thread's cancelability state and type determine when the cancellation takes effect. Cancellation only occurs when the target
thread's cancelability state is When the target thread's cancelability state is cancellation requests against the target thread are held
pending and will be acted upon when cancellation is enabled.
When the cancelability type is for the target thread, new or pending cancellation requests are acted upon at any time. When the target
thread's cancelability type is cancellation requests are held pending until the target thread reaches a cancellation point (see below).
If the target thread's cancelability state is disabled, the cancelability type does not matter. When cancelability is enabled, the cance-
lability type will take effect.
When the cancellation is acted on, the cancellation cleanup handlers for thread are called. The cancellation cleanup handlers are called
in the opposite order in which they were installed. When the last cancellation cleanup handler returns, the thread-specific data destruc-
tor functions for thread are called. When the last destructor function returns, thread shall be terminated.
The caller of will not wait for the target thread to be canceled.
Cancellation Points
are points inside of certain functions where a thread must act on any pending cancellation request when cancelability is enabled if the
function would block.
RETURN VALUE
Upon successful completion, returns zero. Otherwise, an error number is returned to indicate the error (the variable is not set).
ERRORS
For each of the following conditions, if the condition is detected, the function returns the corresponding error number:
[ESRCH] No thread could be found corresponding to thread.
WARNINGS
Use of asynchronous cancelability while holding resources that need to be released may result in resource loss. Applications must care-
fully follow static lexical scoping rules in their execution behavior. For instance, the use of return, goto, etc., to leave user-defined
cancellation scopes without doing the necessary scope pop will result in undefined behavior.
AUTHOR
was derived from the IEEE POSIX P1003.1c standard.
SEE ALSO
pthread_exit(3T), pthread_join(3T), pthread_setcancelstate(3T), pthread_cleanup_pop(3T), pthread_cond_wait(3T).
STANDARDS CONFORMANCE
Pthread Library pthread_cancel(3T)