[Bug 48199] Re: multimon crashes Xorg when window is closed

dl9sau thomas at x-berg.in-berlin.de
Thu Apr 2 01:36:10 UTC 2009


I've traced the problem, and found out that in xdisplay.c the code              
leads to a kil(-1, SIGTERM) [in fact 2^32-1).
This kills all processes down to init (or at least all processes owned by a user. And you know,
as soon as your session-manager dies, it's the end of your session ;)                                       
                                                                                
Tom Sailor (the author) did actually fix the problem in his upstream version at              
  http://www.baycom.org/~tom/ham/linux/multimon.tar.bz2                         
and I confirm that his solution fixes the problem. 

Tom's fix in that version is:
diff -Naur multimon-1.0/ xdisplay.c                                             
--- multimon-1.0/xdisplay.c     2005-07-26 21:09:38.000000000 +0200             
+++ xdisplay.c  2009-03-24 19:07:58.000000000 +0100                             
@@ -1,8 +1,8 @@                                                                 
 /*                                                                             
  *      xdisplay.c -- actually displaying things                               
  *                                                                             
- *      Copyright (C) 1996                                                     
- *          Thomas Sailer (sailer at ife.ee.ethz.ch, hb9jnx at hb9w.che.eu)          
+ *      Copyright (C) 1996, 2009                        
+ *          Thomas Sailer (t.sailer at alumni.ee.ethz.ch)                         
  *                                                                             
  *      This program is free software; you can redistribute it and/or modify   
  *      it under the terms of the GNU General Public License as published by   
@@ -336,6 +336,8 @@                                                             
 {                                                                              
        if (cnum  < 0 || cnum >= NUMCLI)                                        
                return;                                                         
+       if (!cli[cnum].used)                                                    
+               return;                                                         
        kill(cli[cnum].pid, SIGTERM);                                           
 }                                                                              
                                                                                
@@ -403,6 +405,8 @@                                                             
                                                                                
        if (cnum < 0 || cnum >= NUMCLI)                                         
                return 0;                                                       
+       if (!cli[cnum].used)                                                    
+               return 0;                                                       
        i = read(cli[cnum].cmdfd, &c, 1);                                       
        if (i < 0 && errno != EAGAIN) {        
                perror("read");                                                 
                                                                                
                                                                                
73,                                                                             
        - Thomas  dl9sau

-- 
multimon crashes Xorg when window is closed
https://bugs.launchpad.net/bugs/48199
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list