fork has been available from windows platforms
since perl 5.6.0. I never touch Window systems, but as far
as I know, pipe open is supported on Windows - with the
exception of opening |- and -|
(which kind of surprises me, as fork is now
supported). See perlport.
Abigail | [reply] [d/l] [select] |
Well, the fork() call is as well supported as dd and gzip :) (ie, not). If I read your example correctly, you seem to want to read a disk (in raw or character mode), gzip it and send it somewhere using something along the lines of netcat.
My first suggestion would be to write a few more lines of code and implement the whole thing in perl, which would allow you to run your task anywhere, without the overhead of multiple processes. Take a look at IO::Zlib and IO::Socket, which would do all the work for you.
Also note that in Win32, pipelines used to be very inefficient. The whole output of each member of the pipeline is executed up to completion and its output sent to a temporary file. Then the next member is fed with the temporary file and its output treated in a similar way, untill all the members have run. I would not be surprised if this were the case even today.
Regards.
| [reply] |
Hey thanks good idea about using Zlib, i was already trying to replace netcat using the socket library anyways.
The only program i just dont have a clue on how to get rid of would be ofcourse dd since i need to read a whole disc. any ideas man?
| [reply] |