Return script exit code.
The build was successful. Details

This commit is contained in:
Rafal Kupiec 2018-08-26 08:37:35 +02:00
parent 94b213674a
commit c8c6208cca
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
1 changed files with 3 additions and 2 deletions

View File

@ -112,6 +112,7 @@ int main(int argc, char **argv) {
int dump_vm = 0; /* Dump VM instructions if TRUE */
int err_report = 0; /* Report run-time errors if TRUE */
int n; /* Script arguments */
int status = 0; /* Script exit code */
int rc;
/* Process interpreter arguments first*/
for(n = 1 ; n < argc ; ++n) {
@ -215,10 +216,10 @@ int main(int argc, char **argv) {
* And finally, execute our program. Note that your output (STDOUT in our case)
* should display the result.
*/
ph7_vm_exec(pVm, 0);
ph7_vm_exec(pVm, &status);
/* All done, cleanup the mess left behind.
*/
ph7_vm_release(pVm);
ph7_release(pEngine);
return 0;
return status;
}