rugwuk has asked for the wisdom of the Perl Monks concerning the following question:
I've searched around and found some useful references for using HTTP::Daemon, and have got a simple web server up and running very easily using this module and the examples from Randall etc. I fork a child to do some work from the main daemon and that works just fine and dandy.
My problem is that sometimes (Solaris 2.8 BTW), when i kill my daemon during testing and start it again on the same PORT i get "Address already in use", and i can't seem to see why, as the process i was running is clearly dead.
Now its doesn't always fail, just sometimes. I scoped out netstat -a on my port and found a WAIT_TIME entry for my port number, but wasn't sure if this was related or not? eventually the PORT does become free, but i haven't managed to track down exactly when yet.
I know this isn't strictly perl, but it might be, and am trying to rule it out. Is there a particular way i should kill the process, currently just Ctrl C, to make sure that any hanging resources are released?
Thx in advance and Rgds Richard
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: HTTP:Daemon : Address already in use
by merlyn (Sage) on Jun 13, 2002 at 22:47 UTC | |
by IlyaM (Parson) on Jun 14, 2002 at 08:17 UTC | |
by rugwuk (Initiate) on Jun 14, 2002 at 22:00 UTC |