use ns_pid for daemons