Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: system calls problem

by snadra (Scribe)
on May 27, 2004 at 08:21 UTC ( [id://356831]=note: print w/replies, xml ) Need Help??


in reply to system calls problem

Try to execute the whole path.
If that does not help, maybe the programm you try to call is causing the problem. system() is doing a fork, and the process is waitng for the child process to complete.
If you don't need to fork (the return) try exec(), wich does not do a return:
exec('C\pogramms\programm.exe', $file_to_open);

snadra

Replies are listed 'Best First'.
Re: Re: system calls problem
by Aragorn (Curate) on May 27, 2004 at 08:39 UTC
    Be aware of the fact that the reason that exec doesn't return is that the called program is run instead of the caller. The program image of your script (i.e. the Perl interpreter running your script in memory) is replaced with the execed program.

    Arjen

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-03-19 04:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found