Changeset 5720
- Timestamp:
- 11/05/09 21:34:18 (3 weeks ago)
- Location:
- mpich2/trunk/src/pm/mpd
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
mpich2/trunk/src/pm/mpd/mpd.py
r5639 r5720 197 197 print "mpd: your python version must be >= 2.2 ; current version is:", vinfo 198 198 sys.exit(-1) 199 os.close(0)199 sys.stdin.close() 200 200 if self.parmdb['MPD_ECHO_PORT_FLAG']: # do this before becoming a daemon 201 201 # print self.parmdb['MPD_LISTEN_PORT'] -
mpich2/trunk/src/pm/mpd/mpdman.py
r5664 r5720 96 96 try: max_fds = os.sysconf('SC_OPEN_MAX') 97 97 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 103 108 if syslog_module_available: 104 109 syslog.openlog("mpdman",0,syslog.LOG_DAEMON)
