basename() returns a string sometimes.. go shaleh. but this makes it work both ways.

This commit is contained in:
Dana Jansens 2002-08-15 19:10:55 +00:00
parent 02d144a891
commit 41a38bbdaf

View file

@ -112,7 +112,8 @@ bool epist::handleSignal(int sig) {
case SIGHUP: case SIGHUP:
cout << "epist: Restarting on request.\n"; cout << "epist: Restarting on request.\n";
execvp(_argv[0], _argv); execvp(_argv[0], _argv);
execvp(basename(_argv[0]), _argv); string base(basename(_argv[0]));
execvp(base.c_str(), _argv);
return false; // this should be unreachable return false; // this should be unreachable
case SIGTERM: case SIGTERM: