Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 431
  • Last Modified:

owner rights to run `dip -k` from a Perl script

Trying to execute a 'dip -k' within a perl script I am getting no response == no I/O no failure no nuthin' ==

I have tried  system("dip -k");
and exec("dip -k")  and using backquotes instead, both in system() and exec() and just as naked lines in the script.

I have tried killing the ppp0 directly but dip seems to keep the hardware locked if I do that... Messy to have a script calling reboot, so ... I want to get dip -k to do the shutdown.

Also, this is an ISDN port so dip owns 2 ppp# processes.

Rapid replies appreciated, as this box is aworking gateway and needs to be reliable SOON!   8^o

riko
0
riko
Asked:
riko
1 Solution
 
mstongeCommented:
Perl treats exec arguments as an array so you have to separate them.  Actually if exec sometime can detect some common characters and pass them properly but it's always safer to call exec or system like this:

exec 'dip','-k'

Hope it helps
Marc
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now