Hi Craig,

I was afraid you'd say that :{

I wrote a short C routine that can trap ctrl/y. I guess I should just turn it 
into XS code and use that.

Thanks for trying. If there is ever a patch to add to Perl to do this, let me 
know.

Thanks again,

-Doug

--- On Thu, 1/1/09, Craig A. Berry <craigbe...@mac.com> wrote:
From: Craig A. Berry <craigbe...@mac.com>
Subject: Re: Trapping ctrl/y in VMSPERL
To: dorsal_f...@yahoo.com
Cc: vmsperl@perl.org
Date: Thursday, January 1, 2009, 2:07 PM

On Dec 31, 2008, at 7:18 PM, doug brann wrote:

> Hi and thanks for the reply. I sent this message already, but forgot to
hit "Reply All" Sorry.
> 
> Anyhow,
> 
> I'm running version 5.8.6 and I tried this script:
> 
> $SIG{QUIT} = \&routine;
> 
> while (1) {
>  print "waiting\n";
>  sleep(1);
> }
> 
> sub routine {
>   print "YAY\n";
> }
> 
> when I did a Ctrl-Y, it did not catch the interupt. I even tried using a
line like:
> 
> foreach (keys %SIG) {
>   $SIG{$_} = \&routine;
> }
> 
> and still couldn't trap CTRL-Y. I could get CTRL-C, but I really need
to trap CTRL-Y.
> 
> Any ideas?


Hmm.  I'm back home and near my VMS systems and I can see the same thing
with a recent development snapshot.  There may not be any way to do this in pure
Perl.  I confess I don't know offhand all the details of trapping Control-Y
in one of the VMS-native languages either.  You might have a look at the I/O
User's Reference and be able to work out something:

http://h71000.www7.hp.com/doc/73final/6136/6136pro_015.html#index_x_643


A possible workaround is a DCL wrapper that traps Control-Y and restarts the
Perl script after handling whatever needs to be handled.

________________________________________
Craig A. Berry
mailto:craigbe...@mac.com

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser




      

Reply via email to