You are not logged in.
Well not exactly.
If you type exit or press Ctrl +d, if does, but when closing with the button it doesnt. It just does not add lines to history
If there is no bash_history file, it does not create it.
Found a patch:
*** ../bash-4.2-patched/sig.c Tue Nov 23 08:21:22 2010
--- sig.c Tue Mar 8 21:28:32 2011
***************
*** 47,50 ****
--- 47,51 ----
#if defined (READLINE)
# include "bashline.h"
+ # include <readline/readline.h>
#endif
***************
*** 63,66 ****
--- 64,68 ----
extern int history_lines_this_session;
#endif
+ extern int no_line_editing;
extern void initialize_siglist ();
***************
*** 506,510 ****
#if defined (HISTORY)
/* XXX - will inhibit history file being written */
! history_lines_this_session = 0;
#endif
terminate_immediately = 0;
--- 508,515 ----
#if defined (HISTORY)
/* XXX - will inhibit history file being written */
! # if defined (READLINE)
! if (interactive_shell == 0 || interactive == 0 || (sig != SIGHUP && sig != SIGTERM) || no_line_editing || (RL_ISSTATE (RL_STATE_READCMD) == 0))
! # endif
! history_lines_this_session = 0;
#endif
terminate_immediately = 0;Last edited by Viper_Scull (2011-03-10 10:44:55)
Athlon II X4 620 + Gigabyte 785GPM-UD2H + 4GB DDR3 + SSD OCZ Vertex2 60GB
Archlinux x86_64 + Openbox
Offline
this is an upstream choice: http://lists.gnu.org/archive/html/bug-b … 00054.html
Offline
If you are going to post a patch, please post the comment about the patch made by the lead developer of bash when he posted it:
"Yes, I know that it's not 100% safe and will run unsafe functions from a signal handler."
Puts a new perspective on it...
Offline
If you are going to post a patch, please post the comment about the patch made by the lead developer of bash when he posted it:
"Yes, I know that it's not 100% safe and will run unsafe functions from a signal handler."
Puts a new perspective on it...
You are absolutely right.
Can you share then your perspective on this specific patch?
I'll stick to "exit command" if it may damage something.
Athlon II X4 620 + Gigabyte 785GPM-UD2H + 4GB DDR3 + SSD OCZ Vertex2 60GB
Archlinux x86_64 + Openbox
Offline
My thoughts only extend to if the upstream developer has concerns about the patch, then so do I... and it will not make the Arch package until upstream says it is OK.
Saying that, the patch is probably good and fairly low risk. But I'd just try and use "exit" or "ctrl+d" for the time being.
Offline
I can't test it with a button, but I got the same behavior with xprop (PID of urxvt) kill -9 PID.
It seems to work with this though, maybe you can try putting it in .bashrc:
trap exit TERM HUP
edit: changed INT to TERM (apparently, it's HUP anyway though...)
Last edited by Procyon (2011-03-10 12:48:14)
Offline
I can't test it with a button, but I got the same behavior with xprop (PID of urxvt) kill -9 PID.
It seems to work with this though, maybe you can try putting it in .bashrc:
trap exit TERM HUPedit: changed INT to TERM (apparently, it's HUP anyway though...)
It works.
Thank you Procyon.
Athlon II X4 620 + Gigabyte 785GPM-UD2H + 4GB DDR3 + SSD OCZ Vertex2 60GB
Archlinux x86_64 + Openbox
Offline