PHP exec()命令等待时间

I would like my PHP script to call a complied C++ file and wait to finish the PHP script until the C++ is finished executing. According to http://php.net/manual/en/function.exec.php

"If a program is started with this function, in order for it to continue running in the background, the output of the program must be redirected to a file or another output stream. Failing to do so will cause PHP to hang until the execution of the program ends."

Does this mean that if I just leave the return_var blank the PHP will wait until the C++ finishes?

EDIT: I do not need any of the returned C++ data.

How would I do something like this?:

exec("./myc++program");
//Waiting for C++ to finish
... rest of PHP here