Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Signal Has No Effect On Child Process

    We have a linux service, started by a shell script. The service forks and then calls execlp to run another program as a child process. When I run command "kill -6 <child_pid>" nothing happens. If I run the second (child) program without using this service, the same kill command would produce the response expected "Aborted, core dumped". Could someone explain why the signal is not being received by the child process? The service (parent process) does define its own signal handler but SIGABRT (6) is not handled. I also tried to add handling of SIGABRT (in the parent), and there is still no effect on the child process. I read that child process from fork inherites signal handler, which would mean the child does not handle SIGABRT (my experiment with handling SIGABRT case is not considered) either so it should be the system behavior which is to abort and core dump.

    Just want to mention that kill -9 always works on the child.

    Thank you for any help.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    You might want to check if some signal masking is going on with the child process. Do you have the source code for it?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts