Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Pipe DD command?

by rovf (Priest)
on Feb 09, 2012 at 15:49 UTC ( [id://952763]=note: print w/replies, xml ) Need Help??


in reply to Pipe DD command?

How would I enable my perl program to DD a file to all of those slots, ideally at the same time?
The "cheapest" way would be to do it like on the (bash/zsh/ksh/...) command line, i.e. by running the command in the background:

system("dd ... &");
However, if you need to monitor the child processes, for example by waiting for them, you need their PIDs. In this case, you have two options: Use the special form of system, which has the digit 1 as the first parameter, i.e.
my $child_pid=system(1,'dd','first_parameter',....);
or use fork and exec.

-- 
Ronald Fischer <ynnor@mm.st>

Log In?
Username:
Password:

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

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

    No recent polls found