1 diff --git a/libqtile/core/lifecycle.py b/libqtile/core/lifecycle.py
2 index 0d4d119d..c37d1799 100644
3 --- a/libqtile/core/lifecycle.py
4 +++ b/libqtile/core/lifecycle.py
5 @@ -25,7 +25,7 @@ class LifeCycle:
7 def _atexit(self) -> None:
8 if self.behavior is Behavior.RESTART:
9 - argv = [sys.executable] + sys.argv
11 if "--no-spawn" not in argv:
12 argv.append("--no-spawn")
13 argv = [s for s in argv if not s.startswith("--with-state")]
14 @@ -33,7 +33,7 @@ class LifeCycle:
15 argv.append("--with-state=" + self.state_file)
16 logger.warning("Restarting Qtile with os.execv(...)")
17 # No other code will execute after the following line does
18 - os.execv(sys.executable, argv)
19 + os.execv(sys.argv[0], argv)
20 elif self.behavior is Behavior.TERMINATE:
21 logger.warning("Qtile will now terminate")
22 elif self.behavior is Behavior.NONE: