Sponsored Content
Top Forums UNIX for Advanced & Expert Users catch SIGCHLD signal in parent process Post 74315 by ranjan on Thursday 9th of June 2005 02:56:57 AM
Old 06-09-2005
catch SIGCHLD signal in parent process

I want to catch SIGCHLD signal in parent process. I can't use wait() system call to catch SIGCHLD according to project requirment.
Operating system linux 3.1
can any one have a solution for this.
Thanking you,
ranjan
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. UNIX for Dummies Questions & Answers

Sending signal from child to parent process!

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

4. Programming

Catch signal SIGPIPE print errno but it's value equal to 2

catch signal SIGPIPE ,print errno but it's value equal to 2(ENOENT) #define ENOENT 2 /* No such file or directory */ is it should be EPIPE ? #define EPIPE 32 /* Broken pipe */ Thanks ! (7 Replies)
Discussion started by: aobai
7 Replies

5. UNIX for Advanced & Expert Users

Size of a tarball without untarring - Catch parent tar ball has sub tars

hi, I am in a weird situation. I have a parent tarball which contains 2 sub tarballs. The structure is such : Parent.tar.gz ---- > child1.tar.gz and child2.tar.gz I need to get the size of the parent tarball without untaring it I know that the command is gunzip -c parent.tar.gz | wc -c ... (1 Reply)
Discussion started by: mnanavati
1 Replies

6. Programming

Parent,child wait,signal

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

7. Programming

Parent process starts before the child using signal, in C

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

8. Emergency UNIX and Linux Support

signal between parent process and child process

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

9. AIX

Catch Zombie Process

Hi All, Anyone have any shell script to capture the zombie process, as according to the support they need the real time zombie PID, they only provide the kdb (0) > p* |grep -i defunct (0) > p * | grep <hex pid> But this is doesn't seem easy to catch the zombie as it is not always... (1 Reply)
Discussion started by: ckwan
1 Replies

10. Shell Programming and Scripting

forking a child process and kill its parent to show that child process has init() as its parent

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
DtTermSubprocReap(library call) 										   DtTermSubprocReap(library call)

NAME
DtTermSubprocReap -- allow a DtTerm widget to clean up after subprocess termination SYNOPSIS
#include <Dt/Term.h> void DtTermSubprocReap( pid_t pid, int *stat_loc); DESCRIPTION
The DtTermSubprocReap function allows DtTerm widgets to function correctly in applications that have installed a SIGCHLD signal handler. The pid argument specifies the process ID of the child process wait(2) returns. The stat_loc argument specifies the termination information wait(2) returns. RETURN VALUES
The DtTermSubprocReap function returns no value. APPLICATION USAGE
The DtTermSubprocReap function allows an application to install its own SIGCHLD signal handler. The application must install its own SIGCHILD signal handler and call DtTermSubprocReap if the DtTerm widget was created with the DtSubpro- cessTerminatorCatch resource set to False. The application must call the DtTermSubprocReap function after performing a wait(2) (or associated function) on a terminated child process. If the child process is associated with a DtTerm widget, the widget's data structures are cleaned up and the associated callbacks invoked. SEE ALSO
Dt/Term.h - DtTerm(5), DtTerm(3), signal(5), wait(2). DtTermSubprocReap(library call)
All times are GMT -4. The time now is 09:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy