Skip to content

Commit ee13530

Browse files
committed
Simulation script fix
Bash condition check fix
1 parent 92e82b5 commit ee13530

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wrapper/simulation/SimulationTool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ std::string SimulationTool::GenerateSimulationScript(const std::string& top_file
331331
<< "OUT_LVL=\"" << Param->getOption<int>(OPT_output_level) << "\"\n\n"
332332
<< "### Do not edit below\n\n";
333333

334-
script << "function cleanup { if ${__sys_elf_pid}; then kill ${__sys_elf_pid}; fi }\n"
334+
script << "function cleanup { if [ ${__sys_elf_pid} -ne 0 ]; then kill ${__sys_elf_pid}; fi }\n"
335335
<< "trap cleanup EXIT\n\n";
336336

337337
GenerateScript(script, top_filename, file_list);

0 commit comments

Comments
 (0)