Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: How to see the processId of the process called by system command from perl

by elmex (Friar)
on Apr 16, 2008 at 20:14 UTC ( [id://680913]=note: print w/replies, xml ) Need Help??


in reply to How to see the processId of the process called by system command from perl

How are you calling the R script? With the system function? Are you forking before you call it? Is the script going to the background? Best way would probably be to fork and call the R script in that new process via system:
my $pid = fork; defined $pid or die "fork failed: $!"; if ($pid) { # in parent: waitpid $pid; # wait for the child, which's pid is in $pid } else { # in child: system ("R ..."); exit; }
  • Comment on Re: How to see the processId of the process called by system command from perl
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2024-04-23 12:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found