Hi all -

I am developing a perl 5.8 application using the
new threading model. I use this technique
(thanks Jenda!) to dup STDIN to a temp file handle:
  ...
  open SAVIN, '<&STDIN';
  open (STDIN,'<&' . $tmpfh->fileno) or die "...";
  my $out = `some-command 2>&1`;
  open STDIN, '<&SAVIN';
  close $tmpfh;
  ...
in various threads. All works - the command run
reads from STDIN and output to STDOUT (maybe
STDERR also). I get the output in $out.

My question: how 'global' is STDIN? Must I place
a lock on some dummy shared variable when using
STDIN in a thread, in other words, will all
threads 'see' the dup of STDIN?

Aloha => Beau;


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to