From owner-freebsd-hackers Fri Apr 26 02:57:52 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id CAA28546 for hackers-outgoing; Fri, 26 Apr 1996 02:57:52 -0700 (PDT) Received: from time.cdrom.com (time.cdrom.com [204.216.27.226]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id CAA28541 Fri, 26 Apr 1996 02:57:43 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by time.cdrom.com (8.7.5/8.6.9) with SMTP id CAA29495; Fri, 26 Apr 1996 02:57:31 -0700 (PDT) To: sef@freebsd.org cc: hackers@freebsd.org Subject: Something fishy with our PT_ATTACH code! Date: Fri, 26 Apr 1996 02:57:31 -0700 Message-ID: <29493.830512651@time.cdrom.com> From: "Jordan K. Hubbard" Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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 [d1] jkh-ttyp5@time-> ps ax | grep cat [d2] jkh-ttyp5@time-> gdb (gdb) attach [d3] [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