aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl
diff options
context:
space:
mode:
authorColin Snover2017-12-14 14:30:16 -0600
committerColin Snover2017-12-14 14:30:16 -0600
commit008149e3576aa8d13c6831ee0c1d25c3c23deb83 (patch)
treed7e3a1853013e546e94f1a650fd6c680c9ac4e20 /backends/platform/sdl
parent7aaac1dfba22d2e70b33b2cf856d7885944d4a6e (diff)
downloadscummvm-rg350-008149e3576aa8d13c6831ee0c1d25c3c23deb83.tar.gz
scummvm-rg350-008149e3576aa8d13c6831ee0c1d25c3c23deb83.tar.bz2
scummvm-rg350-008149e3576aa8d13c6831ee0c1d25c3c23deb83.zip
POSIX: Do not hang ScummVM when opening a browser
If the call used to open the browser does not return until the browser is closed, this would previously cause ScummVM to hang. Since we are using waitpid now, we can avoid hanging by telling waitpid to not block on a child which has not exited.
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r--backends/platform/sdl/posix/posix.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/backends/platform/sdl/posix/posix.cpp b/backends/platform/sdl/posix/posix.cpp
index 60f85efc2f..b01de2d240 100644
--- a/backends/platform/sdl/posix/posix.cpp
+++ b/backends/platform/sdl/posix/posix.cpp
@@ -320,7 +320,7 @@ bool OSystem_POSIX::launchBrowser(const Common::String &client, const Common::St
if (posix_spawnp(&pid, client.c_str(), NULL, NULL, const_cast<char **>(argv), environ) != 0) {
return false;
}
- return (waitpid(pid, NULL, 0) != -1);
+ return (waitpid(pid, NULL, WNOHANG) != -1);
}
AudioCDManager *OSystem_POSIX::createAudioCDManager() {