Re: Proposing a debugging method for this bug
Jérôme Marant wrote:
Le lundi 06 novembre 2006 12:55, Attilio Fiandrotti a écrit :
Jerome, if i provide a simple patch for DFB 0.9.25, could you please
rebuild the libdirectfb-udeb and see if the crash is fixed?
In this case we could backport the fix from DFB 1.0-rc2 to DFB 0.9.25:
would this be possible if fixes this chash?
Of course.
hi jerome
Attached to this mail you will find a patch that moves DFB's 0.9.25.1
signal handling to different signals than SIGUSR1/2 (during my tests,
those were replaced to signals number 41 and 42 and everything worked
correctly).
thanks in anticipation for testing.
Attilio
--- systems/fbdev/vt.c.orig 2006-11-07 14:15:56.000000000 +0100
+++ systems/fbdev/vt.c 2006-11-07 14:16:03.000000000 +0100
@@ -232,8 +232,8 @@
if (ioctl( dfb_vt->fd, VT_SETMODE, &dfb_vt->vt_mode ) < 0)
D_PERROR( "DirectFB/fbdev/vt: Unable to restore VT mode!!!\n" );
- sigaction( SIGUSR1, &dfb_vt->sig_usr1, NULL );
- sigaction( SIGUSR2, &dfb_vt->sig_usr2, NULL );
+ sigaction( SIG_SWITCH_FROM, &dfb_vt->sig_usr1, NULL );
+ sigaction( SIG_SWITCH_TO, &dfb_vt->sig_usr2, NULL );
direct_thread_cancel( dfb_vt->thread );
direct_thread_join( dfb_vt->thread );
@@ -363,14 +363,14 @@
pthread_cond_wait( &dfb_vt->wait, &dfb_vt->lock );
continue;
- case SIGUSR1:
+ case SIG_SWITCH_FROM:
if (ioctl( dfb_vt->fd, VT_RELDISP,
dfb_core_suspend( NULL ) == DFB_OK ? 1 : 0 ) < 0)
D_PERROR( "DirectFB/fbdev/vt: VT_RELDISP failed\n" );
break;
- case SIGUSR2:
+ case SIG_SWITCH_TO:
dfb_core_resume( NULL );
if (ioctl( dfb_vt->fd, VT_RELDISP, 2 ) < 0)
@@ -458,8 +458,8 @@
sig_tty.sa_handler = vt_switch_handler;
sigemptyset( &sig_tty.sa_mask );
- if (sigaction( SIGUSR1, &sig_tty, &dfb_vt->sig_usr1 ) ||
- sigaction( SIGUSR2, &sig_tty, &dfb_vt->sig_usr2 )) {
+ if (sigaction( SIG_SWITCH_FROM, &sig_tty, &dfb_vt->sig_usr1 ) ||
+ sigaction( SIG_SWITCH_TO, &sig_tty, &dfb_vt->sig_usr2 )) {
D_PERROR( "DirectFB/fbdev/vt: sigaction failed!\n" );
close( dfb_vt->fd );
return DFB_INIT;
@@ -468,14 +468,14 @@
vt.mode = VT_PROCESS;
vt.waitv = 0;
- vt.relsig = SIGUSR1;
- vt.acqsig = SIGUSR2;
+ vt.relsig = SIG_SWITCH_FROM;
+ vt.acqsig = SIG_SWITCH_TO;
if (ioctl( dfb_vt->fd, VT_SETMODE, &vt ) < 0) {
D_PERROR( "DirectFB/fbdev/vt: VT_SETMODE failed!\n" );
- sigaction( SIGUSR1, &dfb_vt->sig_usr1, NULL );
- sigaction( SIGUSR2, &dfb_vt->sig_usr2, NULL );
+ sigaction( SIG_SWITCH_FROM, &dfb_vt->sig_usr1, NULL );
+ sigaction( SIG_SWITCH_TO, &dfb_vt->sig_usr2, NULL );
close( dfb_vt->fd );
Reply to: