2017
[folly.git] / folly / test / SubprocessTestParentDeathHelper.cpp
index fd1d42ea29220cb9c2b3d47414a3169bc12edc5c..2cfe95f086f2afe36344592c9c503333a419f764 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2014 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 // worked as intended.
 
 #include <sys/types.h>
-#include <sys/stat.h>
 #include <fcntl.h>
 #include <signal.h>
-#include <unistd.h>
 
-#include <gflags/gflags.h>
 #include <glog/logging.h>
 
 #include <folly/Conv.h>
 #include <folly/Subprocess.h>
+#include <folly/portability/GFlags.h>
+#include <folly/portability/Unistd.h>
 
 using folly::Subprocess;
 
@@ -60,7 +59,7 @@ void runChild(const char* file) {
   CHECK_ERR(creat(file, 0600));
 }
 
-void runParent(const char* file) {
+[[noreturn]] void runParent(const char* file) {
   std::vector<std::string> args {"/proc/self/exe", "--child", file};
   Subprocess proc(
       args,
@@ -83,4 +82,3 @@ int main(int argc, char *argv[]) {
   }
   return 0;
 }
-