summaryrefslogtreecommitdiffhomepage
path: root/test/util/multiprocess_util.h
diff options
context:
space:
mode:
authorDean Deng <deandeng@google.com>2019-10-23 22:21:33 -0700
committergVisor bot <gvisor-bot@google.com>2019-10-23 22:23:05 -0700
commit7ca50236c42ad1b1aa19951815d03b62c0c722ed (patch)
tree586fa422b8447eb441e58deb521c74884dad9a6d /test/util/multiprocess_util.h
parent072af49059a1818e0e06188be81fe425363acf55 (diff)
Handle AT_EMPTY_PATH flag in execveat.
PiperOrigin-RevId: 276419967
Diffstat (limited to 'test/util/multiprocess_util.h')
-rw-r--r--test/util/multiprocess_util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/util/multiprocess_util.h b/test/util/multiprocess_util.h
index c413d63ea..61526b4e7 100644
--- a/test/util/multiprocess_util.h
+++ b/test/util/multiprocess_util.h
@@ -109,6 +109,15 @@ PosixErrorOr<Cleanup> ForkAndExecveat(int32_t dirfd, const std::string& pathname
const std::function<void()>& fn,
pid_t* child, int* execve_errno);
+inline PosixErrorOr<Cleanup> ForkAndExecveat(int32_t dirfd,
+ const std::string& pathname,
+ const ExecveArray& argv,
+ const ExecveArray& envv, int flags,
+ pid_t* child, int* execve_errno) {
+ return ForkAndExecveat(
+ dirfd, pathname, argv, envv, flags, [] {}, child, execve_errno);
+}
+
// Calls fn in a forked subprocess and returns the exit status of the
// subprocess.
//