Changeset 5720

Show
Ignore:
Timestamp:
11/05/09 21:34:18 (3 weeks ago)
Author:
goodell
Message:

Fix for mpd on FC12 (ticket #902).

mpdman closes all non-standard file descriptors, which causes problems
if the python standard (or FC-modified) distribution has any file
objects open under the hood, such as to /etc/abrt/pyhook.conf. Comment
out this closing for now until we can figure out a safer way to do this,
if there is one.

No reviewer.

Location:
mpich2/trunk/src/pm/mpd
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • mpich2/trunk/src/pm/mpd/mpd.py

    r5639 r5720  
    197197            print "mpd: your python version must be >= 2.2 ; current version is:", vinfo 
    198198            sys.exit(-1) 
    199         os.close(0) 
     199        sys.stdin.close() 
    200200        if self.parmdb['MPD_ECHO_PORT_FLAG']:    # do this before becoming a daemon 
    201201            # print self.parmdb['MPD_LISTEN_PORT'] 
  • mpich2/trunk/src/pm/mpd/mpdman.py

    r5664 r5720  
    9696        try:     max_fds = os.sysconf('SC_OPEN_MAX') 
    9797        except:  max_fds = 1024 
    98         for fd in range(3,max_fds): 
    99             if fd == self.mpdSock.fileno()  or  fd == self.listenRingSock.fileno(): 
    100                 continue 
    101             try:    os.close(fd) 
    102             except: pass 
     98        # FIXME This snippet causes problems on Fedora Core 12.  FC12's python 
     99        # opens a file object to /etc/abrt/pyhook.conf.  Closing the fd out from 
     100        # under the higher level object causes problems at exit time when the 
     101        # higher level object is garbage collected.  See MPICH2 ticket #902 for 
     102        # more information. 
     103        #for fd in range(3,max_fds): 
     104        #    if fd == self.mpdSock.fileno()  or  fd == self.listenRingSock.fileno(): 
     105        #        continue 
     106        #    try:    os.close(fd) 
     107        #    except: pass 
    103108        if syslog_module_available: 
    104109            syslog.openlog("mpdman",0,syslog.LOG_DAEMON)