Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^7: Stopping an HTTP::Server::Simple server

by Corion (Patriarch)
on Jan 26, 2011 at 16:43 UTC ( [id://884381]=note: print w/replies, xml ) Need Help??


in reply to Re^6: Stopping an HTTP::Server::Simple server
in thread Stopping an HTTP::Server::Simple server

->handle_request() will be called in a child process, so it's no surprise that $pid is undefined there (see previous discussion), as $pid is only set in the parent. kill 9, $$ only kills the child process, so that won't work either.

You haven't shown the code that you used to write the PID to a file. You should show that code, or output more diagnostics while running your code to track what values $$ and $pid have at which time, and also what the values read from the .pid file are. Do you check for failure when opening the file in the child?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://884381]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-04-23 08:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found