[I am not sure whether writing an expect script merits a LIP
post. Anyways.]

I am using Expect to automate a program but facing a problem right now.

The problem is that the program is supposed to receive the input(a password) 
and then fork off and daemonise. Also, the program uses /dev/tty for reading
the password and writing the prompt.

By using strace on the Expect script, I can find out that the expect script is 
receiving
and replying correctly to the program prompts. However, as soon as the
expect script finishes, the daemon also gets killed. 

After a manual execution of the daemon program, a "ps" shows that
the daemon is attached to a terminal. Therefore this dumb daemon
program is /not/ using a double-fork() and detaching itself from 
its controlling terminal. So I suspect that on abortion of the Expect
script, the daemon is receiving a SIGHUP and exiting.

How can I coerce Expect to solve this problem?

- Sandip

          ================================================
To unsubscribe, send email to [EMAIL PROTECTED] with unsubscribe in subject 
header. Check archives at http://www.mail-archive.com/ilugd%40wpaa.org

Reply via email to