Skip to content

Commit 699494b

Browse files
committed
Add process creation error check
So that we get a helpfull error message if process creation fails, otherwise cbmc can continue and fail or hang later in the processing. Note that showing an error message should be the expected behaviour in the case where the user specifies a solver which is not available.
1 parent 259fba7 commit 699494b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/util/piped_process.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ piped_processt::piped_processt(const std::vector<std::string> &commandvec)
233233
// recognize that the child process has ended (but maybe we don't care).
234234
CloseHandle(child_std_OUT_Wr);
235235
CloseHandle(child_std_IN_Rd);
236+
if(!success)
237+
throw system_exceptiont("Process creation failed.");
236238
# else
237239

238240
if(pipe(pipe_input) == -1)

0 commit comments

Comments
 (0)