diff options
author | jvoung@google.com <jvoung@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-31 22:54:42 +0000 |
---|---|---|
committer | jvoung@google.com <jvoung@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-31 22:54:42 +0000 |
commit | 577661ca4ef3719ce0733fd2eb9998cc15364c13 (patch) | |
tree | 5eb9bb67e222349002c5d4355d505eac0a5bc497 /chrome/test/nacl_security_tests | |
parent | f02640dd4aaf6495eb03b77702cbf813df9001f2 (diff) | |
download | chromium_src-577661ca4ef3719ce0733fd2eb9998cc15364c13.zip chromium_src-577661ca4ef3719ce0733fd2eb9998cc15364c13.tar.gz chromium_src-577661ca4ef3719ce0733fd2eb9998cc15364c13.tar.bz2 |
* Fix style issues in nacl_sandbox_test (http://codereview.chromium.org/1549046/show).
* Use base/native_library instead of dlopen, LoadLibrary, etc.
* Change error path so that it does not simply fail a CHECK.
BUG=none
TEST=Manually test success/fail case (force failure by passing -no-sandbox flag).
Review URL: http://codereview.chromium.org/3008024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58090 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/nacl_security_tests')
-rw-r--r-- | chrome/test/nacl_security_tests/commands_posix.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/test/nacl_security_tests/commands_posix.cc b/chrome/test/nacl_security_tests/commands_posix.cc index 79bcde7..29ba436 100644 --- a/chrome/test/nacl_security_tests/commands_posix.cc +++ b/chrome/test/nacl_security_tests/commands_posix.cc @@ -4,6 +4,7 @@ #include "chrome/test/nacl_security_tests/commands_posix.h" +#include <errno.h> #include <fcntl.h> #include <netdb.h> #include <stdio.h> @@ -45,7 +46,6 @@ SboxTestResult TestOpenWriteFile(const char *path) { SboxTestResult TestCreateProcess(const char *path) { pid_t pid; int exec_res; - int child_stat; pid = fork(); if (0 == pid) { @@ -57,7 +57,10 @@ SboxTestResult TestCreateProcess(const char *path) { } return SBOX_TEST_SUCCEEDED; } else if (0 < pid) { - waitpid(pid, &child_stat, WNOHANG); + pid_t w_pid; + do { + w_pid = waitpid(pid, NULL, WNOHANG); + } while (w_pid != -1 && errno != EINTR); return SBOX_TEST_SUCCEEDED; } else { return SBOX_TEST_DENIED; |