ptrace: handling ERESTART_RESTARTBLOCK