TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Changes to ^d ^z handling

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
LokiChaos



Joined: 27 Oct 2009
Posts: 61

PostPosted: Tue Apr 12, 2016 9:50 am    Post subject: Changes to ^d ^z handling Reply with quote

Something changed between 2.00.9 and 2.01.1 where I can no longer block Ctrl-d and Ctrl-z via a #macro

eg:
#macro {\cd} {#nop}

Used to prevent exiting via ^d, now it seems that ^d is handled before macro's are processed.

Is there an alternate means of preventing tintin++ from responding to EOT and SIGTSTP, at least those originating from ^d/^z?
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Tue Apr 12, 2016 10:40 am    Post subject: Reply with quote

As far as I remember I was never able to use them, the OS has the priority...

By the way, where are you running tt ?
Back to top
View user's profile Send private message
LokiChaos



Joined: 27 Oct 2009
Posts: 61

PostPosted: Tue Apr 12, 2016 11:05 am    Post subject: Reply with quote

I'm running tt++ in tmux 1.9 on Debian, technically I am sshing in from a Gentoo system using rxvt-unicode w/ 256 colour patch.

I specifically had a #macro that blocked ^d and ^z in 2.00.9, as I later had ^d set to a command (how I noticed the change in behaviour). I still have the old binary around and can verify the older version behaves as I recall.

I know it must be some change with tintin, as I have not made any other changes (either a change in settings or version) to my shell (bash), tmux, ssh, or terminal emulator and I can use the older version (2.00.9) and #macro intercepts ^d/^z.
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Tue Apr 12, 2016 5:42 pm    Post subject: Reply with quote

maybe you can disable the respective SIGNALS before starting tintin
Code:

trap "" SIGNAL_NUMBER

and at the exit restore them
Code:

trap SIGNAL_NUMBER


(I'm not extremely sure if the previous commands are right)
Back to top
View user's profile Send private message
LokiChaos



Joined: 27 Oct 2009
Posts: 61

PostPosted: Wed Apr 13, 2016 8:59 am    Post subject: Reply with quote

I have a partial solution, in my launcher script for tt++
stty susp '^-'
tt++

tt++ also needs macros set to catch ^z but macros will process now.

Ideally resetting them afterwards would be nice, but given how the wrapper works, the tty will be terminating anyway.
For that you can save the old values with stty -g:
OLD_STTY=$(stty -g)

Then when finished:
stty $OLD_STTY
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Wed Apr 13, 2016 12:53 pm    Post subject: Reply with quote

Good to know Thumbs Up
Back to top
View user's profile Send private message
LokiChaos



Joined: 27 Oct 2009
Posts: 61

PostPosted: Fri Apr 15, 2016 5:03 pm    Post subject: Reply with quote

This allows both ^z and ^d to work with #macro:
stty -isig

This does have some side effects, notably it prevents processing of the signal for aborting connections. I am looking into a patch that preserves that, but allows ^d to be processed as input as well, if you don't have a macro it will do cursor_delete_or_exit like normal.
Back to top
View user's profile Send private message
Slysven



Joined: 10 Apr 2011
Posts: 365
Location: As "Jomin al'Bara" in WoTMUD or Wiltshire, UK

PostPosted: Mon Apr 18, 2016 9:39 am    Post subject: Reply with quote

Would not "stty -ixoff" work, just to stop the job-control ^z characters - BTW perhaps then you will want "stty ixany" to recover if you get a SIGTTOU or SIGTTIN instead of SIGTSTP ALL of which should halt execution (which I think then gets ignored AS WELL as SIGCONT which is the way to resume)... Confused
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group