"Craig A. Berry" <[EMAIL PROTECTED]> wrote on 01/14/2005 12:45:54 PM:
<snip />
> The way to find out what you're configured with is:
> $ perl -"V:useperlio"
> useperlio='define';
Yep, when I do that, I get "useperlio='define';"
<snip />
> I read the perlipc documentation the same way you do, i.e., the
> signal should get delivered when using perlio.
Well, I have changing the I/O discipline six ways from Sunday and can't
get the ALRM signal delivered under VMS. The script (a working one this
time!) is attached. It's got DOS line breaks -- be warned.
In summary, I took the script from yesterday, added Getopt::Long and a
-discipline option, and opened the pipe with
my $access = "-|$opt{discipline}";
my $pid = open ($pipe, $access, $cmd) or die;
I tried :perlio, :stdio:crlf, :unix:crlf, and maybe others, but with $cmd
= "wait 00:00:30" and the timeout at 10 seconds, it universally took 30
seconds to execute. Well, sometimes 31. But never 10.
$ assign "unsafe" PERL_SIGNALS
did in fact restore the old behaviour. Not suprisingly, I can find no way
to do this from inside Perl. Even doing it in a BEGIN block didn't help.
> But we could have a
> bug or an implementation-defined behavior or a loophole closed for
> stability reasons but not documented properly. This would need to be
> tested and compared on various platforms before filing a bug report I
> think.
I don't know whether by "various platforms" you mean other VMS-es on other
architectures or other OS-es completely. If the former, I'm a bit
challenged, since the system I'm reporting on (DEC C V5.6-003 on OpenVMS
Alpha V7.1-1H2) is the most modern one currently available to me (!). If
the latter I'm slightly better off, but not much:
With ActivePerl 810 (5.8.4) running under Win2000 and feeding it the
"pause" command, I get the same behaviour as under VMS, including the
results of "perl -V:useperlio". I have to hit return before the script
exits. Unlike 5.6.1, though, you _can_ use SIGALRM under Windows to time
out something like "sleep 1 until $timeout" (where $timeout is set by the
alarm handler). So we're closer, but still no cigar.
Oddly enough, with Cygwin on the same machine as the ActivePerl 810 test
(Perl 5.8.6 this time) it works as advertised: 'sleep 30' with a 10-second
timeout completes in 10 seconds, using both :perlio and :stdio. I will
withhold the obvious editorial comment.
I can check Darwin over the weekend, but after that I'll be pretty much
out of "various platforms" I can test personally.
Thanks again for the help,
Tom Wyant
This communication is for use by the intended recipient and contains
information that may be privileged, confidential or copyrighted under
applicable law. If you are not the intended recipient, you are hereby
formally notified that any use, copying or distribution of this e-mail,
in whole or in part, is strictly prohibited. Please notify the sender
by return e-mail and delete this e-mail from your system. Unless
explicitly and conspicuously designated as "E-Contract Intended",
this e-mail does not constitute a contract offer, a contract amendment,
or an acceptance of a contract offer. This e-mail does not constitute
a consent to the use of sender's contact information for direct marketing
purposes or for transfers of data to third parties.
Francais Deutsch Italiano Espanol Portugues Japanese Chinese Korean
http://www.DuPont.com/corp/email_disclaimer.html
trw.pl
Description: Binary data
