mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-01 12:40:36 +00:00
Fixed the SHELL() function to return correct values on Linux (and presumably OSX).
This commit is contained in:
parent
c98a4529f6
commit
9595dd37e6
|
@ -18208,8 +18208,7 @@ int64 func_shell(qbs *str){
|
||||||
if (new_error) return 1;
|
if (new_error) return 1;
|
||||||
if (cloud_app){error(262); return 1;}
|
if (cloud_app){error(262); return 1;}
|
||||||
|
|
||||||
static int64 return_code;
|
int64 return_code;
|
||||||
return_code=0;
|
|
||||||
|
|
||||||
//exit full screen mode if necessary
|
//exit full screen mode if necessary
|
||||||
static int32 full_screen_mode;
|
static int32 full_screen_mode;
|
||||||
|
@ -18440,6 +18439,10 @@ int64 func_shell(qbs *str){
|
||||||
shell_call_in_progress=1;
|
shell_call_in_progress=1;
|
||||||
return_code = system((char*)strz->chr);
|
return_code = system((char*)strz->chr);
|
||||||
shell_call_in_progress=0;
|
shell_call_in_progress=0;
|
||||||
|
if (return_code == -1) {/* do nothing */}
|
||||||
|
else {
|
||||||
|
return_code = WEXITSTATUS(return_code);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -33188,4 +33191,4 @@ sub__limit( 10 );
|
||||||
sub__display();
|
sub__display();
|
||||||
}while(1);
|
}while(1);
|
||||||
//infinite loop (this function never exits)
|
//infinite loop (this function never exits)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue