I want to do this:
do {
$pid = open(KID_TO_WRITE, "|-");
unless (defined $pid) {
warn "cannot fork: $!";
die "bailing out" if $sleep_count++ > 6;
sleep 2;
}
} until defined $pid;
This will fork a child which can read STDIN for the contents written by the parent to KID_TO_WRITE.
How can I make my writes to KID_TO_WRITE block? I would like the parent's progress writing lines to somewhat reflect the progress of the child reading the pipe.
Basically, I'd like this to work as if I wrote to a fifo (mknod). But, without the visibility of the fifo (for security reasons).
Thanks!
Mark
In reply to How to make interprocess pipe blocking? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |