Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Trouble starting Daemon with Expect.pm

by da (Friar)
on Aug 03, 2001 at 23:45 UTC ( [id://102114]=note: print w/replies, xml ) Need Help??


in reply to Trouble starting Daemon with Expect.pm

The script starts the server fine (According to the output of apachectl anyway) but it appears that the server is immediately dispatched. I just get a defunct apachectl process.

I've not used expect before, but I do know that apachectl isn't supposed to hang around after starting apache; it should exit in good order. That would suggest to me an apache/ssl startup problem.

I just glanced at the expect FAQ, which has this:

Q: How come when I automate the passwd program to change passwords for me passwd dies before changing the password sometimes/every time? A: What's happening is you are closing the handle before passwd exits. When you close the handle to a process it is sent a signal (SIGPIPE?) telling it that STDOUT has gone away. The default behavior for processes is to die in this circumstance. Two ways you can make this not happen are: $process->soft_close(); Which is new in 1.04. This will wait 15 seconds for a process to finish up before killing it. $process->expect(undef); This will wait forever for the process to match an empty set of patterns. It will return when the process hits an EOF.
Is it possible your sleep isn't long enough for apachectl to return? You might see what happens with
$process->expect(0)

___ -DA > perl -MPOSIX -le '$ENV{TZ}="EST";print ctime(1000000000)' Sat Sep 8 20:46:40 2001

Replies are listed 'Best First'.
Re: Re: Trouble starting Daemon with Expect.pm
by shotgunefx (Parson) on Aug 04, 2001 at 00:39 UTC
    Thanks for the suggestions. I've tried all of the above and still no dice. Apachectl runs to completion and reports success but still no server is started. It does the same thing when I try to start the binary directly without using the apachectl script. Nothing in the error logs either. I'm stumped.

    -Lee

    "To be civilized is to deny one's nature."

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-20 02:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found