Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Apr 1996 09:03:40 -0700
From:      Sean Eric Fagan <sef@kithrup.com>
To:        jkh@time.cdrom.com
Cc:        hackers@freebsd.org
Subject:   Re: Something fishy with our PT_ATTACH code!
Message-ID:  <199604261603.JAA13098@kithrup.com>

next in thread | raw e-mail | index | archive | help
>Just got back from Kirk's usual Thursday-night OS class and while we
>were going through exit1(), I noticed something that looked a little
>odd in the ptrace "reattach" code.  In following it (and it later
>turned out to be correct), I happened to notice the following weird
>behavior with attach and detach:

Well, I didn't write the attach/detach code ;).

>This is probably a bit hard to read, so I'll give you
>a synopsis:  Start cat, attach cat from another tty with
>gdb, watch cat go to sleep, detach cat in gdb and watch
>cat erroneously suspend itself.

It doesn't seem that the detached process is suspending itself so much as it
is simply renotifying the parent that it is still stopped.  This could be
wrong behaviour, however.

To change that, in the PT_DETACH code, a

	psignal(p, SIGCONT);

would do the trick.  I think ;).

Sean.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604261603.JAA13098>