diff --git a/base/univention-config-registry/python/univention/service_info.py b/base/univention-config-registry/python/univention/service_info.py index 217690d..6842de1 100644 --- a/base/univention-config-registry/python/univention/service_info.py +++ b/base/univention-config-registry/python/univention/service_info.py @@ -65,10 +65,11 @@ def pidof( name ): if not os.path.isfile( os.path.join( dir, 'stat' ) ): continue cmdline = os.path.join( dir, 'cmdline' ) - if not os.path.isfile( cmdline ): + try: + with open(cmdline) as fd: + cmd = fd.readline() + except (IOError, OSError): continue - fd = open( cmdline ) - cmd = fd.readline() # kernel thread if not cmd: continue