path: root/sys/conf
diff options
authorAndrey Zonov <zont@FreeBSD.org>2012-09-12 13:06:57 +0000
committerAndrey Zonov <zont@FreeBSD.org>2012-09-12 13:06:57 +0000
commit896fc4638adead1874e390e3044633f81412d461 (patch)
tree6e08361c9ce542272c7c5f927f7965b9c5f725a7 /sys/conf
parentd1b835208a0ef95bea841226d9f46efa69dc2c50 (diff)
- Fix detaching under some circumstances.
When truss is detaching from very active process it is possible to hang on waitpid(2) in restore_proc() forever, because ptrace(PT_SYSCALL) must be called before detaching, to allow the debugging process to continue execution. Also when truss called with '-c' argument, it does not print anything after detach, because it immediately exits from restore_proc(). To fix these two problems make detaching deferred, but then it is impossible to detach from a process which does not do any system call. To fix this issue use sigaction(2) instead of signal(3) to disable SA_RESTART flag for waitpid(2) that makes it non-restartable. Remove global variable child_pid, because now detaching is handled in context where child's pid is known. Reported by: mjg Tested by: mjg, swills Approved by: kib (mentor) MFC after: 2 weeks
Notes: svn path=/head/; revision=240393
Diffstat (limited to 'sys/conf')
0 files changed, 0 insertions, 0 deletions