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 (cloud_app){error(262); return 1;}
|
||||
|
||||
static int64 return_code;
|
||||
return_code=0;
|
||||
int64 return_code;
|
||||
|
||||
//exit full screen mode if necessary
|
||||
static int32 full_screen_mode;
|
||||
|
@ -18440,6 +18439,10 @@ int64 func_shell(qbs *str){
|
|||
shell_call_in_progress=1;
|
||||
return_code = system((char*)strz->chr);
|
||||
shell_call_in_progress=0;
|
||||
if (return_code == -1) {/* do nothing */}
|
||||
else {
|
||||
return_code = WEXITSTATUS(return_code);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue