diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-07-26 19:01:36 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-07-26 19:01:36 +0000 |
commit | 1e256bbd48d7ebc7aa92ad295090f1cf9c68f8d2 (patch) | |
tree | 9f24377bf022d8b75957a460e41558491ad08bf1 | |
parent | 536b62b706746cb17df84bdb56a5726a3afec193 (diff) | |
download | gdb-1e256bbd48d7ebc7aa92ad295090f1cf9c68f8d2.zip gdb-1e256bbd48d7ebc7aa92ad295090f1cf9c68f8d2.tar.gz gdb-1e256bbd48d7ebc7aa92ad295090f1cf9c68f8d2.tar.bz2 |
2004-07-26 Andrew Cagney <cagney@gnu.org>
Problem reported by Ashley Pittman <ashley@quadrics.com>.
* main.c (captured_main): When in batch mode always detach.
-rw-r--r-- | gdb/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -729,6 +729,13 @@ extern int gdbtk_test (char *); if (batch) { + if (attach_flag) + /* Either there was a problem executing the command in the + batch file aborted early, or the batch file forgot to do an + explicit detach. Explicitly detach the inferior ensuring + that there are no zombies. */ + target_detach (NULL, 0); + /* We have hit the end of the batch file. */ exit (0); } |