File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -133,12 +133,11 @@ void gdb_apit::create_gdb_process()
133
133
// Only reachable, if execvp failed
134
134
int errno_value = errno;
135
135
dprintf (pipe_output[1 ], " errno in child: %s\n " , strerror (errno_value));
136
+ throw gdb_interaction_exceptiont (" could not run gdb" );
136
137
}
137
138
else
138
139
{
139
140
// parent process
140
- gdb_state = gdb_statet::CREATED;
141
-
142
141
close (pipe_input[0 ]);
143
142
close (pipe_output[1 ]);
144
143
@@ -148,6 +147,11 @@ void gdb_apit::create_gdb_process()
148
147
// get stream for writing to gdb
149
148
command_stream = fdopen (pipe_input[1 ], " w" );
150
149
150
+ if (waitpid (gdb_process, 0 , WNOHANG) == 0 )
151
+ throw gdb_interaction_exceptiont (" could not run gdb" );
152
+ else
153
+ gdb_state = gdb_statet::CREATED;
154
+
151
155
std::string line = read_most_recent_line ();
152
156
CHECK_RETURN (
153
157
has_prefix (line, R"( ~"done)" ) ||
You can’t perform that action at this time.
0 commit comments