This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

server/2286: gdbserver opens socket and waits for connection even if child fork fails


>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]