Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6815265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:47:11+00:00 2026-05-26T20:47:11+00:00

So I have an interesting design problem. I am working on SLES 9+ Linux,

  • 0

So I have an interesting design problem. I am working on SLES 9+ Linux, kernel 2.6+, and have a multi-threaded application acting as an RPC client. The idea is to have few threads in place to process requests; one such request is to start a “job” as a child process.

Now the problem I’m having is setting up a proper signal handler to deal with a variety of signals. What I’ve done is set up a another thread for signal handling sitting a sigwait() state while blocking all relevant signals in the other threads. The idea is that all signals for the process should be delivered to the signal handling thread and the rest of the threads should worry only about processing requests as they come in.

All of this works great except for those rotten children, always throwing their Frisbees in my backyard and trampling all over my lawn…but in all seriousness, my signal handling thread is not getting the SIGCHLD signal. My best guess as to what is happening here is that because the signal handing thread is not the thread that spawned the child, it will not be the thread that receives SIGCHLD, but instead the my worker threads which did will.

So as for my questions:

  1. Am I crazy about SIGCHLD not making it to my signal handler thread?
  2. If I am not crazy (it’s a stretch, I know), how would you go about fixing this little problem? Currently what I am doing is setting a very simple signal handler for SIGCHLD set up on all threads that simply resends the signal as a SIGUSR2 signal to the process group which is blocked in all threads allowing the signal handling thread. This seems to work, however I can’t help think either I’m missing something OR there is a better way to handle this…he he, get it, handle this…okay I’ll stop now

As per David Schwartz request SLES9: NPTL 2.3.5, SLES10: NPTL2.4

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:47:12+00:00Added an answer on May 26, 2026 at 8:47 pm

    (Edit: Because I can’t read and you are already doing proper pthread_sigmask calls….)

    In the 2.6 kernel, when SIGCHLD is set to ignore/SIG_IGN the kernel will reap child processes for you. It sounds like if you set up a specific handler for SIGCHLD for your signal handling thread in order to avoid having SIGCHLD set to SIG_IGN/SIG_DFL.

    Edit (from comments):
    I think you hit an edge case. If you leave it as SIG_IGN in the thread spawning the children, the kernel won’t even send SIGCHLD. But if you set it to be handled, then your handler is called instead. I think if you set a handler but then still block the signal in pthread_sigmask, the signal will be delivered to a thread that doesn’t have the signal blocked (your sigwait thread).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an interesting design problem and I was hoping you all could make
I have somewhat interesting development situation. The client and deployment server are inside a
I have an interesting problem and would appreciate your thoughts for the best solution.
I have one interesting problem. I must parse mail body (regular expression), get some
I have some interesting problem for an hour.. In my flex project, all width
I have an interesting SQL problem that I need help with. Here is the
I have an interesting problem. The basis of the problem is that my last
I have an interesting algorithm problem here. The problem is in a way related
I'm currently working on the topic of programming-languages and interpreter-design. I have already created
So I have an interesting design question regarding an app I'm developing for the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.