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 7039705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:49:50+00:00 2026-05-28T01:49:50+00:00

I’ve stumbled across a weird exception I haven’t been able to resolve… can anyone

  • 0

I’ve stumbled across a weird exception I haven’t been able to resolve… can anyone suggest what is wrong or a new design? I’m running a Gunicorn/Flask application. In the configuration file, I specify some work to do with an on_starting hook [1]. Inside that hook code, I have some code like this (nothing fancy):

# Called before the server is started
my_thread = package.MyThread()
my_thread.start()

The package.MyThread class looks like the following. The ls command is unimportant, it can be any command.

class MyThread(threading.Thread):
  """
    Run a command every 60 seconds.

  """
  def __init__(self):
    threading.Thread.__init__(self)
    self.event = threading.Event()

  def run(self):
    while not self.event.is_set():
      ptest = subprocess.Popen(["ls"], stdout=subprocess.PIPE)
      ptest.communicate()
      self.event.wait(60)

  def stop(self):
    self.event.set()

Upon starting up the server, I’m always presented with this exception:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib64/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "__init__.py", line 195, in run
    ptest.communicate()
  File "/usr/lib64/python2.6/subprocess.py", line 721, in communicate
    self.wait()
  File "/usr/lib64/python2.6/subprocess.py", line 1288, in wait
    pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
  File "/usr/lib64/python2.6/subprocess.py", line 462, in _eintr_retry_call
    return func(*args)
OSError: [Errno 10] No child processes

Can anyone suggest what is going on here? I haven’t tried implementing the changes in [2], they seemed hacky.

[1] – http://gunicorn.org/configure.html#server-hooks

[2] – Popen.communicate() throws OSError: "[Errno 10] No child processes"

  • 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-28T01:49:51+00:00Added an answer on May 28, 2026 at 1:49 am

    The error turns out to be related to signal handling of SIGCHLD.

    The gunicorn arbiter intercepts SIGCHLD, which breaks subprocess.Popen. The subprocess.Popen module requires that SIGCHLD not be intercepted (at least, this is true for Python 2.6 and earlier).

    According to bugs.python.org this bug has been fixed in Python 2.7.

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
Does anyone know how can I replace this 2 symbol below from the string
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

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.