Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

PERL on VMS

by Calvin.Ledbetter (Initiate)
on Jan 30, 2012 at 07:34 UTC ( #950709=perlquestion: print w/ replies, xml ) Need Help??
Calvin.Ledbetter has asked for the wisdom of the Perl Monks concerning the following question:

Hello Perl Monks, We have Perl installed on our VMS machines at work. When ever we run a perl program (PERL PROGRAM.PL) the VMS DecTerm window freezes or locks up until the perl program exits or is halted. I just wrote a new perl program, and I need to find a way to prevent this from happening every time I run the program. Any ideas would be greatly appreciated. Feel free to email me directly at TheGimp@me.com Calvin

Comment on PERL on VMS
Re: PERL on VMS
by Anonymous Monk on Jan 30, 2012 at 07:58 UTC

    I don't think this is a perl issue

    Probably bugs (upgrade) , could be cpu quota related

    Sorry :/

Re: PERL on VMS
by rovf (Priest) on Jan 30, 2012 at 08:46 UTC
    I wasn't aware that VMS still exists!

    I would first try to narrow down the bug. You said that this occurs with every Perl program. Since I don't know VMS, I don't know how DecTerm is supposed to behave, but maybe it's by design, that Perl takes over control. For instance, if you type at the command line (please adjust the quoting to the syntax on your platform; as I said I don't know VMS and the syntax on its shells):

    perl -e "sleep 5"
    it means that you can't enter anything for 5 seconds, but afterwards everything is fine again?

    This would actually be the expected behaviour. On a xterm Window on Linux, this would be the same. I would have to start the program in the background in order to enter other commands while the Perl application is running.
    -- 
    Ronald Fischer <ynnor@mm.st>
Re: PERL on VMS
by fisher (Priest) on Jan 30, 2012 at 10:02 UTC
    locks up until the perl program exits ... I just wrote a new perl program

    Just a five cents - maybe I misundertood you, but if you want to prevent your program from hanging up in loop forever, you can use timer as a watchdog inside your perl program. The hanlder should exit if some global variable doesn't change, and when everything is going rigth, you explicitly change it in main program loop. This is just an example usage for the idea.
    #!/usr/bin/env perl use strict; use warnings; our $flag = 0; $SIG{ALRM} = \&Watchdog; sub Watchdog { print "--- Tick ".$main::flag++."---\n"; if ($main::flag >3) { print "--- Bark! Bark! ---\n"; exit 1; } alarm 1; } alarm 1; while(1) { print "main loop...\n"; while(1){}; print "done\n"; $main::flag = 0; }
      The "done\n" part is not executed (because of exit). You cannot use last instead of exit, either.
        Yes, I know. This is a demo how watchdog reacts to an infinite loop.
Re: PERL on VMS
by ramlight (Friar) on Jan 30, 2012 at 17:10 UTC
    Disclaimer: It's been five or six years since I used Perl on OpenVMS so my information may not be up to date. I'm relying on my memory which is not quite as good as it used to be.

    When you say that the DecTerm window "freezes", do you mean that no input or output is displayed? Or no input is accepted but the output is displayed properly? I assume from what you said that you can ctrl-Y out of the program.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://950709]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2014-11-28 08:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (194 votes), past polls