Sponsored Content
Top Forums Programming Runtime.getSystem.exec() function waits for child Post 302211034 by shafi2all on Wednesday 2nd of July 2008 01:20:26 PM
Old 07-02-2008
Runtime.getSystem.exec() function waits for child

Runtime.getSystem.exec() waits for child process to complete .. I do not want to wait for the child process to complete ..what is the option which has to be used ?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Getting Function Name At Runtime

Hi, Suppose I have a User define function get_abc in which I am using $0 to get the name of function. But when I call that function in any script, $0 will give the script name, not the function name. For example: Function: get_abc ------------------- get_abc( ){ echo $0 } Script:... (3 Replies)
Discussion started by: yeheyaansari
3 Replies

2. Shell Programming and Scripting

How can I execute own ksh function in find -exec

Hi, I wrote a smiple ksh function send_notification() { ... } and want to execute it on each file, matched by the find command. I tried: find / -name "*.err" -mtime -8 -exec send_notification {} \; but it doesn't work. What should I do? I work in ksh on Hp-Ux. Regards, Pit (11 Replies)
Discussion started by: piooooter
11 Replies

3. Programming

alternatives of exec() system function

Hi , Can anybody name any System Function in C/C++ for Sun-Solaris (unix) platform which can serve the alternative of execl() system function. Actually I am calling a fork-execl() pair and then making an interprocess communication between these two(parent-child process). But the problem is... (3 Replies)
Discussion started by: Raj Kumar Arora
3 Replies

4. UNIX for Advanced & Expert Users

exec to call specific function in C prog

I would like to call a particular function in a C program using execl(). Is this possible using execl or anyother function ? Thanks (2 Replies)
Discussion started by: vpraveen84
2 Replies

5. Shell Programming and Scripting

Script that waits until a call is done

Hi all, I have a script that checks for the existence of files in a directory. Problem is, if a file suddenly appears, I need to move it to another directory and then call another program that does not import routines (within our DBMS). Now, this script is ever running and uses the sleep... (3 Replies)
Discussion started by: gseyforth
3 Replies

6. Shell Programming and Scripting

Database handle to a child script using exec

Hello, Can I pass a database handle created in parent script to a child script triggered using exec ?? Parent script ========= $dbh =DBI->connect{......); # Db handle creation $param1 =10; # parameter one exec "childscript.pl $param1 $dbh "; # executing childscript.pl with two parameters... (0 Replies)
Discussion started by: coolbhai
0 Replies

7. Shell Programming and Scripting

exit status from ksh script exec from java using runtime

how do i get the exit status from a ksh or perl script executed in a java program using Runtime? (1 Reply)
Discussion started by: twk
1 Replies

8. AIX

AIX CPU waits

Guys, I have a question - when nmon reports a sizeable %CPU wait, does that mean - 1) IO operations are slowing CPU down, OR 2) paging slowing the CPU down, OR 3) one cant tell?? I thought the nmon documentation clearly suggested that CPU waits reported in nmon were from disk... (4 Replies)
Discussion started by: getback0
4 Replies

9. Programming

Java Runtime.getRuntime().exec not returning any value

Hi, i written class like this but it is not returning any results and infact p.waitFor() is returning value 1. This is very basic program that i am planning to run in unix. This is really killing my time and unable to find correct reason.... (6 Replies)
Discussion started by: sbjv
6 Replies

10. SuSE

Tcp waits

Hi Guys I am running an Oracle database and most of my sessions are waiting for tcp. Now, how do I check if tcp from the O/S level is servicing requests properly? Please Help!!! Thanks in advance... (4 Replies)
Discussion started by: Phuti
4 Replies
waitid(2)							   System Calls 							 waitid(2)

NAME
waitid - wait for child process to change state SYNOPSIS
#include <wait.h> int waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options); DESCRIPTION
The waitid() function suspends the calling process until one of its child processes changes state. It records the current state of a child in the structure pointed to by infop. It returns immediately if a child process changed state prior to the call. The idtype and id arguments specify which children waitid() is to wait for, as follows: o If idtype is P_PID, waitid() waits for the child with a process ID equal to (pid_t)id. o If idtype is P_PGID, waitid() waits for any child with a process group ID equal to (pid_t)id. o If idtype is P_ALL, waitid() waits for any child and id is ignored. The options argument is used to specify which state changes waitid() is to wait for. It is formed by bitwise OR operation of any of the following flags: WCONTINUED Return the status for any child that was stopped and has been continued. WEXITED Wait for process(es) to exit. WNOHANG Return immediately. WNOWAIT Keep the process in a waitable state. WSTOPPED Wait for and return the process status of any child that has stopped upon receipt of a signal. WTRAPPED Wait for traced process(es) to become trapped or reach a breakpoint (see ptrace(3C)). The infop argument must point to a siginfo_t structure, as defined in siginfo.h(3HEAD). If waitid() returns because a child process was found that satisfies the conditions indicated by the arguments idtype and options, then the structure pointed to by infop will be filled by the system with the status of the process. The si_signo member will always be equal to SIGCHLD. One instance of a SIGCHLD signal is queued for each child process whose status has changed. If waitid() returns because the status of a child process is available and WNOWAIT was not specified in options, any pending SIGCHLD signal associated with the process ID of that child process is discarded. Any other pending SIGCHLD signals remain pending. RETURN VALUES
If waitid() returns due to a change of state of one of its children and WNOHANG was not used, 0 is returned. Otherwise, -1 is returned and errno is set to indicate the error. If WNOHANG was used, 0 can be returned (indicating no error); however, no children may have changed state if info->si_pid is 0. ERRORS
The waitid() function will fail if: ECHILD The set of processes specified by idtype and id does not contain any unwaited processes. EFAULT The infop argument points to an illegal address. EINTR The waitid() function was interrupted due to the receipt of a signal by the calling process. EINVAL An invalid value was specified for options, or idtype and id specify an invalid set of processes. USAGE
With options equal to WEXITED | WTRAPPED, waitid() is equivalent to waitpid(3C). With idtype equal to P_ALL and options equal to WEXITED | WTRAPPED, waitid() is equivalent to wait(3C). ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |Async-Signal-Safe | +-----------------------------+-----------------------------+ SEE ALSO
intro(2), exec(2), exit(2), fork(2), pause(2), sigaction(2), ptrace(3C), signal(3C), siginfo.h(3HEAD), wait(3C), waitpid(3C), attributes(5), standards(5) SunOS 5.10 9 Jun 2004 waitid(2)
All times are GMT -4. The time now is 06:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy