modified daemonProcess prg