Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
I configured socket activation using this
When I connect to port 10090, cherrypy starts up, but throws an error:
When I remove the lines from around server.py:172, the socket activation works fine:
# Start the httpserver in a new thread. if isinstance(self.bind_addr, tuple): wait_for_free_port(*self.bind_addr)
I use the HEAD version of cherrypy, and the following systemd version:
Of course, it would be nice to have this feature covered with tests and proved working well. So any help with this is welcome.
It seems those lines lack check similar to this:
if not os.environ.get('LISTEN_PID', None):
Could you please check my assumption and prepare PR?
You are right that adding a check for LISTEN_PID fixes the issuel. PR submitted.
One thing I'd like to ask @xaiki just out of curiosity is on what configuration did the original socket activation code work? I could not come up with one that makes that code work.