Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 406855
Collapse All | Expand All

(-)a/gmetad-python/gmetad.py (-4 / +4 lines)
Lines 175-184 if __name__ == '__main__': Link Here
175
        ignore_fds.append(fileHandler.stream.fileno())
175
        ignore_fds.append(fileHandler.stream.fileno())
176
        logging.getLogger().addHandler(fileHandler)
176
        logging.getLogger().addHandler(fileHandler)
177
177
178
    # Switch to non-priviledged user if running as root
179
    if not os.getuid():
180
        setuid()
181
182
    # Determine if the service should be daemonized based on the debug level.
178
    # Determine if the service should be daemonized based on the debug level.
183
    if 5 > int(gmetadConfig[GmetadConfig.DEBUG_LEVEL]):
179
    if 5 > int(gmetadConfig[GmetadConfig.DEBUG_LEVEL]):
184
        daemonize(ignore_fds)
180
        daemonize(ignore_fds)
Lines 198-203 if __name__ == '__main__': Link Here
198
            logging.error('Unable to write PID %d to %s (%s)' % (os.getpid(), gmetadConfig[GmetadConfig.PIDFILE], e))
194
            logging.error('Unable to write PID %d to %s (%s)' % (os.getpid(), gmetadConfig[GmetadConfig.PIDFILE], e))
199
            sys.exit()
195
            sys.exit()
200
         
196
         
197
    # Switch to non-priviledged user if running as root
198
    if not os.getuid():
199
        setuid()
200
201
    # Initialize the data store with the notifier and summery threads and plugins
201
    # Initialize the data store with the notifier and summery threads and plugins
202
    dataStore = DataStore()
202
    dataStore = DataStore()
203
    
203
    

Return to bug 406855