core: use "/dev/null" for stdin in hook_process instead of closing stdin (bug #39538)