MCPcopy Create free account
hub / github.com/davisking/dlib / wait

Method wait

dlib/matlab/subprocess_stream.cpp:502–526  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

500// ----------------------------------------------------------------------------------------
501
502 void subprocess_stream::
503 wait()
504 {
505 if (!wait_called)
506 {
507 wait_called = true;
508 send_eof();
509
510 std::ostringstream sout;
511 sout << stderr.rdbuf();
512
513 try{check_for_matlab_ctrl_c();} catch(...)
514 {
515 kill(child_pid, SIGTERM);
516 }
517
518 int status;
519 waitpid(child_pid, &status, 0);
520 if (status)
521 throw dlib::error("Child process terminated with an error.\n" + sout.str());
522
523 if (sout.str().size() != 0)
524 throw dlib::error("Child process terminated with an error.\n" + sout.str());
525 }
526 }
527
528// ----------------------------------------------------------------------------------------
529

Callers

nothing calls this directly

Calls 4

errorClass · 0.85
check_for_matlab_ctrl_cFunction · 0.70
strMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected