replaced the check for the return value of ptrace() (compare with -1).