mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
gdbstub: fix gdbserver_fork
As reported by Martin Mohring fork doesn't work with NPTL. A fix is attached that makes the also attached test run (tested with ARM CodeSourcery 2008q3 on an x86_64 Fedora Core with kernel 2.6.23). Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6195 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
6cdc737502
commit
9f6164d6f6
1 changed files with 1 additions and 1 deletions
|
@ -2225,7 +2225,7 @@ int gdbserver_start(int port)
|
|||
void gdbserver_fork(CPUState *env)
|
||||
{
|
||||
GDBState *s = gdbserver_state;
|
||||
if (s->fd < 0)
|
||||
if (gdbserver_fd < 0 || s->fd < 0)
|
||||
return;
|
||||
close(s->fd);
|
||||
s->fd = -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue