[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-readline] Does _rl_interrupt_immediately still need to exist?

From: Pedro Alves
Subject: [Bug-readline] Does _rl_interrupt_immediately still need to exist?
Date: Thu, 21 Mar 2019 15:46:21 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1


I'm looking at readline's signal handling code, and I noticed that 
in the current master, the _rl_interrupt_immediately variable is
never set anymore.

I see that _rl_interrupt_immediately used to be set around
rl_attempted_completion_function in complete.c in older releases,
but that signal handling was replaced with the safer
RL_SIG_RECEIVED check in the mainline code.

Is there a reason the _rl_interrupt_immediately variable still
exists, then?  Could rl_signal_handler be simplified, like:

 rl_signal_handler (int sig)
-  if (_rl_interrupt_immediately)
-    {
-      _rl_interrupt_immediately = 0;
-      _rl_handle_signal (sig);
-    }
-  else
-    _rl_caught_signal = sig;
+  _rl_caught_signal = sig;



I was looking at signal handling on Windows, for gdb, assessing its
correctness (given Windows runs signals on a separate thread).  Not
having the _rl_interrupt_immediately==true path simplifies things.

Pedro Alves

reply via email to

[Prev in Thread] Current Thread [Next in Thread]