]> granicus.if.org Git - strace/commit
Fix PTRACE_SETOPTIONS tests
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 16 Aug 2011 18:57:29 +0000 (18:57 +0000)
committerDenys Vlasenko <dvlasenk@redhat.com>
Tue, 23 Aug 2011 10:53:00 +0000 (12:53 +0200)
commit04f8b4860f12512186481ca21dbd311d9d612326
treec3fa5ed4240c6db16763c399a9fdda2ef7647a34
parent25caa318eedf38200cd7660320d95bf4662c6c5b
Fix PTRACE_SETOPTIONS tests

* strace.c [LINUX] (kill_save_errno): New function.
(test_ptrace_setoptions_followfork): Change return type to void.
Fix and harden error handling.  Use kill_save_errno() to avoid errno
clobbering.  Treat EIO from ptrace() the same way as EINVAL.
(test_ptrace_setoptions_for_all): Use kill_save_errno() to avoid errno
clobbering.  Treat EIO from ptrace() the same way as EINVAL.
(main): Update use of test_ptrace_setoptions_followfork().
strace.c