]> Dogcows Code - chaz/openbox/blobdiff - util/epist/epist.cc
basename() returns a string sometimes.. go shaleh. but this makes it work both ways.
[chaz/openbox] / util / epist / epist.cc
index c10f5a8e6caaa7d83367e5d058ebd6815284eff7..f83059435edc458c8cd7edaf4c675cf7c3e71064 100644 (file)
@@ -1,5 +1,5 @@
 // -*- mode: C++; indent-tabs-mode: nil; -*-
-// epist.cc for Epistophy - a key handler for NETWM/EWMH window managers.
+// epist.cc for Epistrophy - a key handler for NETWM/EWMH window managers.
 // Copyright (c) 2002 - 2002 Ben Jansens <ben at orodu.net>
 //
 // Permission is hereby granted, free of charge, to any person obtaining a
@@ -112,7 +112,8 @@ bool epist::handleSignal(int sig) {
   case SIGHUP:
     cout << "epist: Restarting on request.\n";
     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
 
   case SIGTERM:
This page took 0.021678 seconds and 4 git commands to generate.