From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4E083385840C; Mon, 25 Mar 2024 18:40:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E083385840C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1711392041; bh=eb/ICPWOHh/D6sYqqVZ4cQozOSdj9hMfCzTQ3O/LzFU=; h=From:To:Subject:Date:From; b=B0zT9RqKAHSOHrec9FdDtVYLMz0nZ2u9bDFGrYaSB8ZpBLRv1WDRFkH4z56TE1zYX mPtqTbVVjWbiJ8+mGmOHrML0w4nKjVLawIxRj65S2NRq8FFT+gPENO6X1oL9eY4I4o 8MZJfcwM7o+SVTR4qs7JhqyfiKs+fD/dno5nKTc0= From: "pedro at palves dot net" To: gdb-prs@sourceware.org Subject: [Bug gdb/31555] New: Cannot attach to program after its main thread has exited, on Linux Date: Mon, 25 Mar 2024 18:40:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pedro at palves dot net X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31555 Bug ID: 31555 Summary: Cannot attach to program after its main thread has exited, on Linux Product: gdb Version: unknown Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: pedro at palves dot net Target Milestone: --- On Linux, it is not possible to attach to a process after its main thread h= as exited. Ptrace does not let you attach to zombie threads. E.g., with the gdb.threads/leader-exit.exp test program: $ gdb -p 1804363 ... Attaching to process 1804363 warning: process 1804363 is a zombie - the process has already terminated ptrace: Operation not permitted. (gdb) This is possible on other systems -- at least on Windows it is. --=20 You are receiving this mail because: You are on the CC list for the bug.=