diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-11-04 06:45:06 -0800 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-11-04 06:45:06 -0800 |
commit | 67eae5724a8e1caa36ca492ebe5f7e0d01b42ce1 (patch) | |
tree | 59263c3f1f4060bc79954a0274aa21b052369e38 /test | |
parent | 75889d812402ac2b75d891576a1c37cb43c8eaf3 (diff) | |
download | qtlocation-mapboxgl-67eae5724a8e1caa36ca492ebe5f7e0d01b42ce1.tar.gz |
use execv and pass non-inline argument for gcc
Diffstat (limited to 'test')
-rw-r--r-- | test/headless.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/headless.cpp b/test/headless.cpp index 26aff177fc..361f3a9fc7 100644 --- a/test/headless.cpp +++ b/test/headless.cpp @@ -28,7 +28,8 @@ public: if (pid < 0) { throw std::runtime_error("Cannot create web server"); } else if (pid == 0) { - int ret = execve((base_directory + "bin/server.py").c_str(), { nullptr }, { nullptr }); + char *arg[] = { nullptr }; + int ret = execv((base_directory + "bin/server.py").c_str(), arg); // This call should not return. In case execve failed, we exit anyway. if (ret < 0) { fprintf(stderr, "Failed to start server: %s\n", strerror(errno)); |