[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

8613.0. "stty ignbrk doesn't work" by HGOSPS::FEYNMANLO () Tue Jan 28 1997 05:56

    
    A  customer runs a shell(Korn) script which displays
    a manual for invoking applications. The shell script  is 
    launched from  the .profile. She required that
    the login user is tied to the shell script and
    will be automatically logout of the system after
    normal exit (chosen from the manual), i.e. won't get
    to the command prompt.
    
    She can achieve this as long as the remote login user
    (running a terminal emulator) does not press the Break (F5)
    key. If the user does so, it will quit to the command prompt.
    
    We have tried to use  'stty -isig' in .profile to ignore the signals
    such as INT, QUIT. It was sucessfull to ignore e.g Ctrl-C.
    
    We has tried 'stty ignbrk' in .profile according to the stty man
    page to try to ignore the Break key. But it was unsucessful.
    
    We have tried 'stty brkint' in .profile to signal INT on break. And
    tried to trap the INT signal inside the shell script. It
    was also unsucessful.
    
    We haven't tried, but the customer insist not to use
    restricted shell because it is too restricted.
    
    It seems to us that there is no way to ignore/trap 
    the break key. And we don't know why stty ignbrk does not
    work at all.
    
    I could see 1 or 2 guys has asked similar questions in
    the conference but no answers were concluded.
    
    Any suggestions and hints?
    
    
    Regards,
     - Feynman
    
T.RTitleUserPersonal
Name
DateLines
8613.1SMURF::MENNERit's just a box of Pax..Tue Jan 28 1997 18:554
    When i just do a standard rlogin from one Digital UNIX box to
    another  - hitting break (F5) does *not* break me out of a shell
    script.  So the question is: what escape sequence is the terminal
    emulator sending as a result of pressing (f5)?
8613.2Sequence 'FF F3'HGOSPS::FEYNMANLOWed Jan 29 1997 04:2725
    Really thanks for the useful hint.
    
    I've just done some experiment. When I use a
    terminal with LAT to login the account. It works
    FINE!  stty ignbrk (or stty brkint) do work as
    expected.
    
    I used a Sniffer analyser to capture the LAT traffic.
    I discovered that the 'LAT' Break is not sent as a
    ASCII sequence. Rather, it is sent as a LAT AUX Data
    with the Break Condition Detected bit set.
    
    When I capture the Telnet traffic from a terminal emulator
    running on a PC(known as KEA), the Break is sent as
    ASCII sequence 'FF F3' and is interpreted as a 'IAC Break'
    in the Sniffer's decoder, though I don't know what a IAC Break
    is. In this case, the Shell scripts cannot capture/interpret
    this 'Break' and exit to the command prompt.
    
    
    Now the question is: how could I tell the login shell to
    ignore or trap this 'FF F3' sequence?
    
    - Feynman
    
8613.3SMURF::MENNERit's just a box of Pax..Thu Jan 30 1997 09:591
    Try trapping SIGQUIT.