Date: Fri, 26 Apr 1996 02:57:31 -0700 From: "Jordan K. Hubbard" <jkh@time.cdrom.com> To: sef@freebsd.org Cc: hackers@freebsd.org Subject: Something fishy with our PT_ATTACH code! Message-ID: <29493.830512651@time.cdrom.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: Sequence: [d0] jkh-ttyp4@time-> cat <leave cat hanging around reading from stdin> [d1] jkh-ttyp5@time-> ps ax | grep cat <get cat's pid> [d2] jkh-ttyp5@time-> gdb (gdb) attach <catpid> [d3] <cat process is now in TX+ state, no wait channel> [d4] (gdb) detach [d5] [1]+ Suspended (signal) cat 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 would seem to me that the far more correct behavior would be something like: Start cat, attach cat from another tty with gdb, watch cat go to sleep, detach cat in gdb and watch it return to its previous un-stopped state. Or am I off-base on this one somehow? Jordan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?29493.830512651>