Sponsored Content
Full Discussion: Using Signals
Top Forums Programming Using Signals Post 2829 by PxT on Wednesday 6th of June 2001 04:18:55 PM
Old 06-06-2001
SIGCHLD is delivered to the parent when the child exits. Use signal(2) to trap this signal and react to it.
 

10 More Discussions You Might Find Interesting

1. Programming

Signals In HP-UX

does the way of handling, interrupting signals in HP-UX same as that of solaris. If there is difference than what it is.?:confused: (1 Reply)
Discussion started by: kapilv
1 Replies

2. UNIX for Dummies Questions & Answers

Signals...

(posted this in the scripting forum as well, but figured it should go here) So, what's going on is this: For our program, we had to create our own shell, and if the user pressed ctrl-c just at the cmdline, then this signal would be ignored, but if there is a foreground process running, let's... (0 Replies)
Discussion started by: blind melon
0 Replies

3. UNIX for Dummies Questions & Answers

threads and signals

can any one give me an example of a concurrency program in threads and signals, i.e how to deliver messages between threads using signals. thanks (0 Replies)
Discussion started by: moe_7
0 Replies

4. Programming

threads and signals

can any one give me an example of a concurrency program in threads and signals, i.e how to deliver messages between threads using signals. thanks (2 Replies)
Discussion started by: moe_7
2 Replies

5. OS X (Apple)

How to debug signals

Hi, In our program, we are using SIGTERM and i tired to put break point in this function. But my debuger is unable to brake at that point. I am working on Mac X and using XCode. Thanks (0 Replies)
Discussion started by: Saurabh78
0 Replies

6. Programming

Can we debug Signals

Hi, In our program, we are using SIGTERM and i tired to put break point in this function. But my debuger is unable to brake at that point. I am working on Mac X and using XCode. Thanks (1 Reply)
Discussion started by: Saurabh78
1 Replies

7. UNIX for Dummies Questions & Answers

Help understanding signals

I am having trouble with folowing sigset_t s; // now s represents set of signals sigemptyset(&s) ; // initialize this set and exclude all the signals from it.is it empty? sigaddset(&s,SIGILL);//this set containts only SIGILL signal sigprocmask(SIG_BLOCK,&s,NULL);//lost on this one Can... (3 Replies)
Discussion started by: joker40
3 Replies

8. UNIX for Dummies Questions & Answers

perror with signals

I have following problem with this code.. First time trough the main loop..... perror gives ....blocked signal:success(all other times gives illlegal seek) Should every time trought the main loop be success?? And the perror otside of main loop...didn't change mask:success That line of code... (2 Replies)
Discussion started by: joker40
2 Replies

9. UNIX for Dummies Questions & Answers

Blocking signals

I know how to add signal to a set. But what if I want to add 2 or 3 signals to the set. I know I can use sigaddset (&set,SIGBUS)....but what if I want to add SIGBUS and SIGALRM at once. Do i have to do it like this.. sigaddset (&set,SIGBUS); sigaddset (&set,SIGALRM); Is there another way to... (0 Replies)
Discussion started by: joker40
0 Replies

10. UNIX for Advanced & Expert Users

Help with Signals

Hi All, The problem statement is as below: Problem: A process (exe) is getting executed in background. The output of this process is getting logged in a file. After successfully running for some time the process gets terminated. In the log file following is present: ^M[7m Interrupt ^M[27m... (8 Replies)
Discussion started by: Praty.27
8 Replies
siginfo(5)							File Formats Manual							siginfo(5)

NAME
siginfo - Details of signal generation SYNOPSIS
#include <siginfo.h> DESCRIPTION
The siginfo structure provides processes with information on why a signal was generated, or a process that is monitoring child processes may receive information that specifies why a child process changed state. See the sigaction(2) and waitid(2) reference pages for more information. The type siginfo_t contains the following members: Contains the system generated signal number. Note that for the waitid function, this field is always SIGCHLD. Contains, if non-zero, the errno that is associated with the signal. Specifies a code that determines whether the signal was generated by a user process, a specific signal, or by the kernel. When the value of si_code is less than or equal to zero (0), the signal was generated by a user process and the siginfo structure contains the following additional members: pid_t si_pid /*sending process ID*/ uid_t si_uid /*sending user ID*/ See the kill(2) and sigsend(2) reference pages for more information on these fields. The following table describes the meaning of the code generated by a signal. The table lists signals in alphabetical order. ---------------------------------------------------------- Signal Code Definition ---------------------------------------------------------- SIGBUS BUS_ADRALN invalid address alignment BUS_ADRERR non-existent physical address BUS_OBJERR object specific hardware error SIGCHLD CLD_EXITED child has exited CLD_KILLED child was killed CLD_DUMPED child terminated abnormally CLD_TRAPPED traced child has trapped CLD_STOPPED child has stopped CLD_CONTINUED stopped child has continued CLD_SIGEXITING child is about to exit because it received a fatal signal SIGILL ILL_ILLOPC illegal opcode ILL_ILLOPN illegal operand ILL_ILLADR illegal addressing mode ILL_ILLTRP illegal trap ILL_PRVOPC privileged opcode ILL_PRVREG privileged register ILL_COPROC coprocessor error ILL_BADSTK internal stack error SIGFPE FPE_INTDIV integer divide by zero FPE_INTOVF integer overflow FPE_FLTDIV floating point divide by zero FPE_FLTOVF floating point overflow FPE_FLTUND floating point underflow FPE_FLTRES floating point inexact result FPE_FLTINV invalid floating point opera- tion FPE_FLTSUB subscript out of range SIGPOLL POLL_IN data input available POLL_OUT output buffers available POLL_MSG input message available POLL_ERR I/O error POLL_PRI high priority input available POLL_HUP device disconnected SIGSEGV SEGV_MAPERR address not mapped to object SEGV_ACCERR invalid permissions for mapped object SIGTRAP TRAP_BRKPT process breakpoint TRAP_TRACE process trace trap ---------------------------------------------------------- When a signal is generated by the system, the meaning of the code is as follows: ------------------------------------------------------------ Signal Field Description ------------------------------------------------------------ SIGILL caddr_t si_addr address of faulting instruction SIGFPE SIGSEGV caddr_t si_addr address of faulting memory SIGBUS reference SIGCHLD pid_t si_pid child process ID int si_status exit value or signal SIGPOLL long si_band band event for POLL_IN, POLL_OUT, or POLL_MSG ------------------------------------------------------------ Note, if the signal is SIGCHLD, and the si_code is equivalent to CLD_EXITED, si_status is equivalent to the exit value of the process. If si_code is not equivalent to CLD_EXITED, the si_status field is equivalent to the signal that caused the process to change state. In some instances, si_addr may not be defined, but si_addr will appear on the same page as the faulting instruction or memory reference. SEE ALSO
Functions: kill(2), sigaction(2), sigsend(2), waitid(2) Files: signal(4) siginfo(5)
All times are GMT -4. The time now is 12:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy