Sponsored Content
Full Discussion: When is SIGCHLD is raised.
Top Forums Programming When is SIGCHLD is raised. Post 87084 by supersumanth on Thursday 20th of October 2005 12:43:50 AM
Old 10-20-2005
When is SIGCHLD is raised.

Hi,
I have 2 processes X and Y. Y is exec() from X. In Y i have an exit handler, which is called when i return from main. With in exit handler i delete and object which in turn calls the destructor of the object, which terminates all the threads of Y.

I believe that SIGCHLD is raised by Y as soon as it returns from main().
Or is it done else where.

Sumanth
 

9 More Discussions You Might Find Interesting

1. Programming

Need help with SIGCHLD

Hello everybody, this is my first post on this forum. I have a program that has a child process that sleeps for 5 second and exit. I'm suppose to modify this program so that when the child exits, the parent reports the exit status of the child, so I also have to deal with SIGINT and SIGQUIT. Can... (1 Reply)
Discussion started by: Unlimited Sky
1 Replies

2. Programming

signal handler for SIGCHLD

Hi, I have an c++ application which uses the function fork and execvp(). The parent does not wait until the child ends. The parents just creates children and let them do their stuff. You can see the parent program as a batch-manager. I have added a SIGCHLD handler to the program: void... (3 Replies)
Discussion started by: jens
3 Replies

3. UNIX for Dummies Questions & Answers

About SIGCHLD

When the SIGCHLD is sent? SIGCHLD is sent either a child exits spontaneously (e.g. exit(0)) or it is killed ? thank you in advance (3 Replies)
Discussion started by: Puntino
3 Replies

4. Shell Programming and Scripting

automatically answer a question raised by a command

i have installed vmware on a text base linux node now i have to vmware-configure.pl to do the initial configuration now 1st step it askes for agreeing for a " License Agreement" for that i have to say "q" and "yes" to Accept it i want to run a script with does these 3 steps... (6 Replies)
Discussion started by: pbsrinivas
6 Replies

5. UNIX for Dummies Questions & Answers

Who sent the process SIGCHLD ?

I want to know whicj process send the signal SIGCHLD to the parent's child. Thank you in advance, (1 Reply)
Discussion started by: Puntino
1 Replies

6. Programming

SIGCHLD trace problem

Hello, I'd like to know whether it is possible to let the parent know who kills its child process. The case is likely as below: if there are four processes, we call them A, B, C and D. B is the child of A, and can be killed by both C and D. if B is killed, then A will receive SIGCHLD from B.... (7 Replies)
Discussion started by: aaronwong
7 Replies

7. Shell Programming and Scripting

Populating array raised an error

Hi, The following test case populate an array named: array3. Since array1 and array2 are equal in length and values array3 will remain empty. #!/usr/bin/ksh test() { set -A array1 "A" set -A array2 "A" NUM_1=`echo ${#array1}` print "num elenemt in NUM_1 is ${NUM_1}" i=1 for ELE2 in... (1 Reply)
Discussion started by: yoavbe
1 Replies

8. Programming

SIGCHLD interrupts its own handler

Hi. I have a program whose job it is to manage 15 child processes. Sometimes these children die (sometimes deliberately other times with a SEGV). This causes a SIGCHLD to be sent to my program which uses waitpid() in the signal handler to gather information and, in most cases, restart the child.... (3 Replies)
Discussion started by: jrichemont
3 Replies

9. UNIX for Dummies Questions & Answers

using SIGCHLD

I'm testing out how to use SIGCHLD and I had a question about intercepting the signal and executing an action in the signal handler. signal(SIGCHLD,countdown); What I'm trying to achieve is be able to printf(Hello) every second that child is set to sleep. I'm setting sleep = 3; so... (1 Reply)
Discussion started by: l flipboi l
1 Replies
semanage_iterate(3)					   Libsemanage API documentation				       semanage_iterate(3)

NAME
semanage_iterate - SELinux Management API SYNOPSIS
The following iterate function is supported for any semanage record. Replace the function and object name as necessary. extern int ITERATE_FUNCTION ( semanage_handle_t *handle, int (*handler) ( const semanage_OBJECT_t *object, void *varg), void *handler_arg); DESCRIPTION
Behavior: The iterate function will execute the specified handler over all objects in the selected location. An arbitrary argument can be passed into the handler function along with each object. The object passed in is property of the libsemanage library, and may not be modified or preserved - use semanage_OBJECT_clone if that is necessary. The handler code may not invoke any semanage write requests for the same object type (i.e. modifying the underlying store is not allowed). The iterate function is reentrant only while inside a transaction (see semanage_begin_transaction ). It is not safe to execute other semanage read or write requests within iterate if not inside a transaction. The handler may return -1 to signal error exit, 0 to signal continue, and 1 to signal successful exit early (the iterate function will stop accordingly). Parameters: The handle is used to track persistent state across semanage calls, and for error reporting. The handler is the function to execute, with handler_arg as its second parameter, and each object as its first parameter. Requirements: This function requires an semanage connection to be established (see semanage_connect(3) ) RETURN VALUE
In case of failure, -1 is returned, and the semanage error callback is invoked, describing the error. Otherwise a non-negative integer is returned (a commit number). The same number will be returned by all other semanage object read calls until the next commit. SEE ALSO
semanage_handle_create(3), semanage_connect(3), ivg2@cornell.edu 15 March 2006 semanage_iterate(3)
All times are GMT -4. The time now is 08:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy