Thanks! man, this is really annoying, first I thought the -hold 0x00
option solved my problem but was because I moved to bash, indeed I wrote
a mail telling how idiot I am xD . Returning to ksh the
Ctrl+Alt+Backspace problem persist as usual. I will try your fix.
Thanks a lot for your time
-Jesus
Cesare Gargano escribis:
On 30/04/08 00:38 +0200, Jesus Sanchez wrote:
Solved! Oh my god, I'm so dumb and idiot, the option -hold was not
helping me
because I was using it in the wrong way, I used "-hold 0" and "-hold
false" and
I did not relized what the good option was "-hold 0x00" for the byte order.
Many thanks for your info and so sorry about the confusion, I really
feel as a dumb
newbie.
Thanks for all.
Antoine Jacoutot escribis:
On Wed, 23 Apr 2008, Jesus Sanchez wrote:
I launch startx (with fvwm2 and mrxvt on my .xinitrc) as a regular user
(it's in the wheel group) and then I open a few tabs on mrxvt (3 or 4),
then I close X with Ctrl+Alt+Backspace and I found with 'ps -ax' that
the ksh opened with mrxvt (ttyp0, ttyp1, and more) are still running,
not mrxvt.
Hi.
Sorry, a bit late on this but I've been busy.
Did you have a look at the '-hold' option?
>From what you've been saying, disabling it should solve your problem.
-hold mask
Hold the tab open after the child process in it exits. mask is
the
mask of flags which control weather the tab will be held open
based
on the exit status of the child process. If the lowest bit
(0x01)
of mask is set, then the tab will always be held open after the
child exits. If the next bit (0x02) is set, then the tab will
only
be held open if the child exits abnormally (e.g. via abort(1)).
If
the third bit (0x04) is set, then the tab will be held open if
the
child exits with non-zero status.
NOTE: In previous versions of mrxvt this was a boolean option.
For
backward compatibility, the value of True, On, Yes will be
treated
as 1 and anything illegal will be treated as 0. The default is
0x06. [holdExit]
I try -hold option before other things, but this don't work for me... I
try with different wm (fvwm, twm, cwm, e17, e16, gnome, xfce), but if I
kill x connection with ctrl+alt+backspace, all ksh remain alive.
I've added a IO handler to wrxvt init.c, this - as workaround - solve
all our issues.
If this is not necessary, post your config here, please.
--- src/init.c.orig Wed Apr 30 15:55:42 2008
+++ src/init.c Wed Apr 30 16:08:59 2008
@@ -46,6 +46,7 @@
int rxvt_getdtablesize ();
#endif
int rxvt_xerror_handler (const Display*, const XErrorEvent*);
+int rxvt_xioerror_handler (Display*);
void rxvt_init_colors (rxvt_t*);
void rxvt_init_win_size (rxvt_t*);
void rxvt_color_aliases (rxvt_t*, int);
@@ -886,6 +887,25 @@ rxvt_init_secondary(rxvt_t *r)
#endif
}
+/*
+ * FIXME
+ *
+ * Wed Apr 30 14:35:33 CEST 2008 +gar <[EMAIL PROTECTED]>
+ *
+ * This is a workaround for for OpenBSD users. On killed connection after
+ * ctrl+alt+backspace with ksh as default shell child processes don't exit,
+ * remaining in WCHAN state for ttyin. This works for me, I set a IO error
+ * handler for killed connection (man XSetErrorHandler) to clean vts before
+ * exiting.
+ */
+int
+rxvt_xioerror_handler(Display *d)
+{
+ rxvt_msg(DBG_ERROR, DBG_INIT, "IO error, cleaning...\n");
+ rxvt_Exit_signal(1);
+ return 0;
+// abort();
+}
/* INTPROTO */
int
@@ -1079,6 +1099,7 @@ rxvt_init_resources(rxvt_t* r, int argc, const char *c
* allowed.
*/
XSetErrorHandler( (XErrorHandler) rxvt_xerror_handler );
+ XSetIOErrorHandler( rxvt_xioerror_handler );
/* Initialize all atoms after establishing connection to X */
for (i = 0; i < NUM_XA; i++)