https://bugs.kde.org/show_bug.cgi?id=419562

Philippe Waroquiers <philippe.waroqui...@skynet.be> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |philippe.waroquiers@skynet.
                   |                            |be

--- Comment #1 from Philippe Waroquiers <philippe.waroqui...@skynet.be> ---
Thanks for the proposed patch.

I do not remember the reason for the line
   ret = VG_(prctl) (PR_SET_PTRACER, 1, 0, 0, 0);

prctl PR_SET_PTRACER documentation indicates that the second argument
is either PR_SET_PTRACER_ANY (to allow any process to ptrace the caller),
or a pid (to allow pid to ptrace the caller)
or 0 (to not allow anymore a process to ptrace the caller).

So, the reason of the call with the pid 1 is not clear (anymore to me.
I must have had a good reason at a time, but not commented :(.

That being said:
Does calling set_ptracer with value 1 effectively allow vgdb to
get a blocked valgrind process out of the syscall ?

In other words, before your patch:
   valgrind sleep 100
in another window:   vgdb help
and vgdb should block or give error msg or similar
     (you might use vgdb -d -d -d -d help   to get more info about what
      is going on)

and after your patch, vgdb -d -d -d -d help  should be able to wake up
valgrind and produce the help text.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to