@@ -312,7 +312,7 @@ void check_trace(int start)
case 0: //child
i = ptrace(PT_ATTACH, parent, 0, 0);
/* EPERM is given on fbsd when security.bsd.unprivileged_proc_debug=0 */
- if (i == -1 && errno != EPERM) {
+ if (i == -1 && errno != EPERM && errno != EINVAL) {
if (start) {
kill(parent, SIGKILL);
exit(1);