O
Oliver
I'm using a pipe to talk to a forked child process -
I do not want any data to get lost if the child process exits
unexpectedly -
- so I was hoping to turn off buffering so that there was at most 1
piece of data (i.e. one line) in the pipe.
I thought if I did:
select(PIPEHANDLE);
$| = 1;
then my pipe would not do buffering, and I was expecting that that
would lead to blocking writes - i.e. if the data hadn't been read from
the pipe, then a write to the pipe would block until it was.
however - after doing the above - I find I can still write data to the
pipe - regardless of how much is read out of the other end.
could someone enlighten me as to what's going on here please?
thanks muchly,
Oliver.
I do not want any data to get lost if the child process exits
unexpectedly -
- so I was hoping to turn off buffering so that there was at most 1
piece of data (i.e. one line) in the pipe.
I thought if I did:
select(PIPEHANDLE);
$| = 1;
then my pipe would not do buffering, and I was expecting that that
would lead to blocking writes - i.e. if the data hadn't been read from
the pipe, then a write to the pipe would block until it was.
however - after doing the above - I find I can still write data to the
pipe - regardless of how much is read out of the other end.
could someone enlighten me as to what's going on here please?
thanks muchly,
Oliver.