08-07-2008
I sort of assumed you meant waitpid
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi All,
I am working on solaris 8 sparc machine with 2 cpu.
I am trying to run my application which generates files. I run multiple instance of the application, but the results don't seem to show as if it were runing parallely.
When i run the application once it takes 12 secs to generate a... (1 Reply)
Discussion started by: zing
1 Replies
2. Shell Programming and Scripting
Hi
I want to run two shell script files parallely. These two scripts are interacting with the database. can any body help on this Pls
Regards
Audippa naidu.M (3 Replies)
Discussion started by: audippa
3 Replies
3. Shell Programming and Scripting
hi i am preparing a set of batches for a set of files sequentially
There is a folder /xyz where all the files reside
now all the files starting with
01 - will be appended for one below other to form a batch batch01
then all the files starting with
02 - will be appended for one below other to... (7 Replies)
Discussion started by: mad_man12
7 Replies
4. Shell Programming and Scripting
Hello everybody,
I have a little problem with one of my program. I made a plugin for collectd (a stats collector for my servers) but I have a problem to make it run in parallel.
My program gathers stats from logs, so it needs to run in background waiting for any new lines added in the log... (0 Replies)
Discussion started by: Samb95
0 Replies
5. Shell Programming and Scripting
How to write script which run multiple scripts parllely,
i have script called A,which has to execute B,C,D,E scripts parllely.. (2 Replies)
Discussion started by: machpee
2 Replies
6. Shell Programming and Scripting
HI All,
I have scenerio where I need to call sub modules through for loop
for (i=0; i<30 ;i++)
{
..
..
..
subroutine 1;
subroutine 2;
}
I want this to be run in parallel
process1
{
...
...
subroutine 1;
subroutine 2; (0 Replies)
Discussion started by: gvk25
0 Replies
7. Shell Programming and Scripting
Hi
Say I am interested in processing a big data set over shell, and each process individually takes a long time, but many such processes can be pipe-lined, is there a way to do this automatically or efficiently in shell?
For example consider pinging a list addresses upto 5 times each. Of... (5 Replies)
Discussion started by: jamie_123
5 Replies
8. Shell Programming and Scripting
Unix OS : Linux 2.6x
Shell type : Korn
Hi all ,
This is a requirement to incorporate parallel processing of a Unix code .
I have two pieces of unix code , one of which will act as a parent process .
This script will invoke multiple ( say four ) instances of the second script at one go... (13 Replies)
Discussion started by: kumarjt
13 Replies
9. Shell Programming and Scripting
Hi,
I am taking up the cue from where I was left in my earlier post ( link given below )
https://www.unix.com/shell-programming-scripting/231107-implement-parallel-processing.html
I actually wanted to know the significance of using the Unix "wait" , which returns
the control from background to... (3 Replies)
Discussion started by: kumarjt
3 Replies
10. Shell Programming and Scripting
I have 10,000 + files, each of which I need to zip using bzip2.
Is ti possible to use bash to create 8 parallel streams sending a new file to be processed from the list when one of the others has finished? (1 Reply)
Discussion started by: garethsays
1 Replies
WAIT4(2) Linux Programmer's Manual WAIT4(2)
NAME
wait3, wait4 - wait for process to change state, BSD style
SYNOPSIS
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/wait.h>
pid_t wait3(int *status, int options,
struct rusage *rusage);
pid_t wait4(pid_t pid, int *status, int options,
struct rusage *rusage);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
wait3():
_BSD_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
wait4():
_BSD_SOURCE
DESCRIPTION
These functions are obsolete; use waitpid(2) or waitid(2) in new programs.
The wait3() and wait4() system calls are similar to waitpid(2), but additionally return resource usage information about the child in the
structure pointed to by rusage.
Other than the use of the rusage argument, the following wait3() call:
wait3(status, options, rusage);
is equivalent to:
waitpid(-1, status, options);
Similarly, the following wait4() call:
wait4(pid, status, options, rusage);
is equivalent to:
waitpid(pid, status, options);
In other words, wait3() waits of any child, while wait4() can be used to select a specific child, or children, on which to wait. See
wait(2) for further details.
If rusage is not NULL, the struct rusage to which it points will be filled with accounting information about the child. See getrusage(2)
for details.
RETURN VALUE
As for waitpid(2).
ERRORS
As for waitpid(2).
CONFORMING TO
4.3BSD.
SUSv1 included a specification of wait3(); SUSv2 included wait3(), but marked it LEGACY; SUSv3 removed it.
NOTES
Including <sys/time.h> is not required these days, but increases portability. (Indeed, <sys/resource.h> defines the rusage structure with
fields of type struct timeval defined in <sys/time.h>.)
On Linux, wait3() is a library function implemented on top of the wait4() system call.
SEE ALSO
fork(2), getrusage(2), sigaction(2), signal(2), wait(2), signal(7)
COLOPHON
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2012-09-23 WAIT4(2)