- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: How to disable <ctrl>-c for an OpenVms account...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2007 06:55 PM
тАО04-10-2007 06:55 PM
Questions:
1. How to disable CTRL C for an account ?
2. If RCTRLC is the only way, how should i incorporate it so that when the user account logins into VMS, he/she is prevented from using CTRL -C ?
Thks.
CO
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2007 07:12 PM
тАО04-10-2007 07:12 PM
Re: How to disable <ctrl>-c for an OpenVms account?
you can use SET NOCONTROL=Y (see $ HELP SET CONTROL EXAMPLE) and the associated /FLAGS in UAF (e.g. DISCTLY).
In a program, you can use LIB$DISABLE_CTRL.
You may also want to read chapter 5.2.1.2 (Terminal Driver Features) in the I/O User's Reference Manual.
You may also want to consider setting the user account CAPTIVE, depending on what you're trying to achieve by disabling CTRL-C.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2007 07:17 PM
тАО04-10-2007 07:17 PM
Re: How to disable <ctrl>-c for an OpenVms account?
keyboards?
2. If the RCTRLC at which you're looking is
the RCTRLC at which I'm looking, then it's a
BASIC feature, not a general VMS feature.
CTRL/C does different things in different
situations. Exactly what is it that you
don't want the users to be able to do?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2007 07:21 PM
тАО04-10-2007 07:21 PM
Re: How to disable <ctrl>-c for an OpenVms account?
keyboards?
2. If the RCTRLC at which you're looking is
the RCTRLC at which I'm looking, then it's a
BASIC feature, not a general VMS feature.
CTRL/C does different things in different
situations. Exactly what is it that you
don't want the users to be able to do?
SET TERMINAL /PASTHRU
(Probably not what you want, but I don't
really know what you want.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2007 07:22 PM
тАО04-10-2007 07:22 PM
Re: How to disable <ctrl>-c for an OpenVms account?
However, by convention, Ctrl-C can be used by programs to mean "abort the current operation, but not the program" and hence it's relatively easy to include code in an application program to detect when Ctrl-C has been pressed. Ctrl-Y on the other hand generally means "abort the program" and is more difficult to trap. (You can however enable or disable it under program control.)
If a program doesn't include code to trap Ctrl-C the VMS device drivers will treat Ctrl-C as if the user had pressed Ctrl-Y.
I suspect you really want to be able to disable Ctrl-Y, and this is easily done via a flag in SYSUAF. For example:
$ MCR AUTHORIZE
UAF> MODIFY username/FLAG=DISCTLY
With DISCTLY in effect, the user process is started with Ctrl-Y disabled. However it's intended to be used with CAPTIVE or RESTRICTED accounts that don't allow the user to access the DCL command prompt. If the user is able to type DCL commands he or she could use the $ SET CONTROL=Y command to enable Ctrl-Y once logged in.
Regards,
Jeremy Begg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2007 08:48 PM
тАО04-10-2007 08:48 PM
Re: How to disable <ctrl>-c for an OpenVms account?
I know how to disable ctrl y BUT not ctrl C.
Basically, I have a program which does not work well when ctrl C invoked. I want to prevent users from using ctrl c.
Removing the key probably is the last creative resort i wnt to try. :)
SET TERMINAL /PASTHRU , i am not sure what this does.
What is this LIB$DISABLE_CTRL ? can it be incorporated in a login file/script ?
Captive flag does not help much in my case, as it only disable ctrl y behavior.
Thks for the feedbacks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2007 09:06 PM
тАО04-10-2007 09:06 PM
Re: How to disable <ctrl>-c for an OpenVms account?
did you bother to read the I/O User's Reference Manual ?
There is even an example included (Example 5-4) on using CTRL-C and CTRL-Y handling - including the LIB$DISABLE_CTRL RTL routine.
http://h71000.www7.hp.com/doc/82FINAL/aa-pv6sg-tk/aa-pv6sg-tk.PDF
Typing CTRL-C when running a program invokes a CTRL-C AST routine, if one has been set up by the program. If not, it's converted to a CTRL-Y.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2007 11:07 PM
тАО04-10-2007 11:07 PM
Re: How to disable <ctrl>-c for an OpenVms account?
I am unclear as to what "does not work well" means. If interrupting the program is bad, then BOTH CNTRL/Y and CNTRL/C are an issue, and the command SET NOCOMMAND=(Y) is the correct response.
Remember, for all intents and purposes either interrupts the program's execution unless other provisions have been made.
Please clarify what the precise problem is.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-11-2007 08:12 PM
тАО04-11-2007 08:12 PM
Re: How to disable <ctrl>-c for an OpenVms account?
Anyway, after some consideration, i think it is still the best way to advise users to avoid use it, rather than have to disable it.
Thks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-11-2007 09:27 PM
тАО04-11-2007 09:27 PM
Re: How to disable <ctrl>-c for an OpenVms account?
Did you try the suggestion to use
$ set nocontrol=y
That will disable both Control-Y and Control-C. And it requires no changes to your programs.
This is assuming the program isn't doing something to enable it, but if the program was going to the trouble to do that, it would be catching the exception and doing cleanup work before shutting down.
The only downsides of doing this is that you will not be able to abort a program that has a bug, and you will have to issue a
$ stop/id=xxxx[/image][/exit]
from another process in that case.
Also, if you start doing something that takes a long time, you will not be able to abort it.
Your alternative, if you have sourcecode and the programming skills, is to modify your programs so they handle a control-C and do the right thing. For an example, look at the EDT editor. If you open a large text file, and then search for something, you are able to press control-c and it will abort the search, but not exit the editor.
Good luck in training your users not to use control-C or control-Y.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2007 01:10 AM
тАО04-12-2007 01:10 AM
SolutionYou have my sympathy. We have restricted & DisCtlY accounts also with set nocontrol=Y in the DCL, yet the 3rd party app aborts in a mess when ctrlC is pressed (user thinks they can copy (windows!)). CTRLY does nothing - as expected. I explored the LIB$DISABLE_CTRL RTL avenue, it didn't work for me. We ended up disabling CTRL_C key sequence in the PC VT emulator we use.
Regards
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2007 05:35 AM
тАО04-12-2007 05:35 AM
Re: How to disable <ctrl>-c for an OpenVms account?
So this third party product is trapping Control-C but not handling it correctly? I suppose that's possible. I just tried using EDT after $ set nocontrol=y, and it does behave differently, the CANCEL mesage from the terminal driver is displayed, and nothing else happens until you enter another key, then it displays "CTRL/C ignored" at the bottom of the screen. Control-Y just messes up the screen with the Interrupt message from the terminal driver, but is otherwise ignored, and the screen can be fixed with Control-W.
Does the application normally do something different when Control-C is pressed vs. Control-Y? What message is displayed by the terminal driver, Cancel or Interrupt? If the program isn't trapping control-C you will get "Interrupt" when Control-C is pressed.
Some terminal emulators are more capable than others, and allow you to map keyboard scan codes instead of ascii characters, so you could make the combination of left-contrl+C and right-contrl+C do nothing but allow some other combination to send a 0x03 (ASCII Control-C). That way you could still send a control-C when necessary, but the standard key combination wouldn't trigger the bug.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2007 06:56 PM
тАО04-12-2007 06:56 PM
Re: How to disable <ctrl>-c for an OpenVms account?
> So this third party product is trapping Control-C but not handling it correctly?
Correct.
We don't get INTERRUPT or CANCEL, but a nasty Internal i/o terminal driver error.
Kind Regards,
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2007 09:54 PM
тАО04-12-2007 09:54 PM
Re: How to disable <ctrl>-c for an OpenVms account?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-15-2007 02:08 PM
тАО04-15-2007 02:08 PM