trivial libdmn fixups
s/select/nanosleep/ for kill delay loop
cleanup/refactor on pipe-related code