mirror of https://gitee.com/bigwinds/arangodb
Use execvp instead of execv and handle error. (#10103)
This commit is contained in:
parent
0757cf2b92
commit
587cead36f
|
@ -416,6 +416,8 @@ int main(int argc, char* argv[]) {
|
|||
if (res != 0) {
|
||||
std::cerr << "WARNING: could not change into directory '" << workdir << "'" << std::endl;
|
||||
}
|
||||
execv(argv[0], argv);
|
||||
if (execvp(argv[0], argv) == -1) {
|
||||
std::cerr << "WARNING: could not execp ourselves, restore will not work!" << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue