From 15ee8ca67b071259a1ec065dd4b6552ccf6ca86d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Sat, 12 Jan 2008 15:51:02 +0000 Subject: [PATCH] system() should continue to wait when wait_for_thread returns B_INTERRUPTED fixes bug #1707 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23439 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/libroot/posix/unistd/system.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/system/libroot/posix/unistd/system.cpp b/src/system/libroot/posix/unistd/system.cpp index fd756851e2..bf156e7e43 100644 --- a/src/system/libroot/posix/unistd/system.cpp +++ b/src/system/libroot/posix/unistd/system.cpp @@ -27,7 +27,11 @@ system(const char *command) } status_t returnValue; - status_t error = wait_for_thread(thread, &returnValue); + status_t error; + do { + error = wait_for_thread(thread, &returnValue); + } while (error == B_INTERRUPTED); + if (error != B_OK) { errno = error; return -1;