HP3000-L Archives

October 1997, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Raymond Roesch <[log in to unmask]>
Reply To:
Raymond Roesch <[log in to unmask]>
Date:
Tue, 21 Oct 1997 17:06:36 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (29 lines)
> try this source and wonder why perl hangs or reports bad file number!
> any help is appreciated.
> TIA
> [log in to unmask]
>
>
> #!/usr/local/bin/perl
> #
> $fname="Pipe";
>
> unless (-p $fname) {
>   unlink $fname;
>   system('mkfifo', $fname) &&
>     system('mknod', $fname, 'p') &&
>     die "can't create $fname: $!!\n";
>   }
>
> # uncomment one of the open commands to see the difference
>
> # open( PIPE1, "+>$fname") || die "Could not open the named pipe -
> $!!\n";
> # will print error:
> # Could not open the named pipe - Bad file number!
>
> # open( PIPE2, ">$fname") || die "Could not open the named pipe -
> $!!\n";
> # program hangs
>

ATOM RSS1 RSS2