Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Nov 2001 14:59:23 +1100
From:      Chris Aitken <chris@ideal.net.au>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Spawning an application with a shell in tow
Message-ID:  <5.1.0.14.2.20011126145236.03933008@mail.ideal.net.au>

next in thread | raw e-mail | index | archive | help
Hi,


I have a bit of a problem that ive narrowed it down to a small part. I have 
a perl script that needs to spawn off the expect application.

This works great when I execute it from command line on my FreeBSD box, but 
when I try and launch it from my cgi-bin from the web server (apache) 
expect barfs because it doesnt have a shell (expect needs a loaded shell to 
work properly).


Is there any way to spawn off my command so that it utilises a shell, or 
some sort of shell equivilant so expect can run...  This is how im 
executing the script....

$foo = `/usr/local/bin/expect /scripts/bar.exp Arg1 Arg2`;


When I check the apache error logs I get this....

can't read "env(SHELL)": no such variable while executing "spawn $env(SHELL)"




Any help on this would be appreciated.


Cheers


Chris

--
     Chris Aitken - Administration/Database Designer - IDEAL Internet
  email: chris@ideal.net.au  phone: +61 2 4628 8888  fax: +61 2 4628 8890
              __-----------------------------------------__
                      # ln -s /dev/null /bin/laden
          If you don't like my typing, all flames to /bin/laden


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.1.0.14.2.20011126145236.03933008>