This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
server/2286: gdbserver opens socket and waits for connection even if child fork fails
- From: michael dot snyder at access-company dot com
- To: gdb-gnats at sources dot redhat dot com
- Date: 17 Jul 2007 20:28:21 -0000
- Subject: server/2286: gdbserver opens socket and waits for connection even if child fork fails
- Reply-to: michael dot snyder at access-company dot com
>Number: 2286
>Category: server
>Synopsis: gdbserver opens socket and waits for connection even if child fork fails
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jul 17 20:38:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator: Michael Snyder
>Release: 6.6
>Organization:
>Environment:
Remote, confirmed on arm-linux and x86-linux, probably applies elsewhere as well
>Description:
Tell gdbserver to launch a program that doesn't exist
(eg. if you typed the name wrong). It will try to fork
the process, and fail of course, but despite the failure
it will still open a socket and wait for gdb to connect.
As soon as gdb connects, gdbserver will close and exit.
>How-To-Repeat:
In the example, "fake" is a program that does not exist.
~ # gdbserver :2222 fake
Cannot exec fake: No such file or directory.
Process fake created; pid = 1158
Child exited with retcode = 7f
Listening on port 2222
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: