summaryrefslogtreecommitdiffstats
path: root/src/subprocess_test.cc
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2013-05-01 18:03:27 (GMT)
committerMatthew Dempsky <mdempsky@google.com>2013-05-01 18:09:38 (GMT)
commit65a58e37a7dd48cb336668351d1cab3db0e4d5fe (patch)
tree7c3658339ed087b0d9d078a37867b81be3dc372a /src/subprocess_test.cc
parent4c552c2c3cbc07acce9c1a379fee054a3f680100 (diff)
downloadNinja-65a58e37a7dd48cb336668351d1cab3db0e4d5fe.zip
Ninja-65a58e37a7dd48cb336668351d1cab3db0e4d5fe.tar.gz
Ninja-65a58e37a7dd48cb336668351d1cab3db0e4d5fe.tar.bz2
Add support for OpenBSD.
Use ppoll() on OpenBSD. Also, fix interrupt handling to recognize that on FreeBSD and OpenBSD, an interrupt might have been delivered even if pselect()/ppoll() don't return -1/EINTR.
Diffstat (limited to 'src/subprocess_test.cc')
-rw-r--r--src/subprocess_test.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/subprocess_test.cc b/src/subprocess_test.cc
index c3175da..afd9008 100644
--- a/src/subprocess_test.cc
+++ b/src/subprocess_test.cc
@@ -152,7 +152,7 @@ TEST_F(SubprocessTest, SetWithMulti) {
// OS X's process limit is less than 1025 by default
// (|sysctl kern.maxprocperuid| is 709 on 10.7 and 10.8 and less prior to that).
-#ifdef linux
+#if defined(linux) || defined(__OpenBSD__)
TEST_F(SubprocessTest, SetWithLots) {
// Arbitrary big number; needs to be over 1024 to confirm we're no longer
// hostage to pselect.
@@ -179,7 +179,7 @@ TEST_F(SubprocessTest, SetWithLots) {
}
ASSERT_EQ(kNumProcs, subprocs_.finished_.size());
}
-#endif // linux
+#endif // linux || __OpenBSD__
// TODO: this test could work on Windows, just not sure how to simply
// read stdin.