cleanup temporary directory when restarting and not using XDG_RUNTIME_DIR
fixes #1253
This commit is contained in:
@ -1682,6 +1682,14 @@ void cmd_reload(I3_CMD) {
|
||||
*/
|
||||
void cmd_restart(I3_CMD) {
|
||||
LOG("restarting i3\n");
|
||||
ipc_shutdown();
|
||||
/* We need to call this manually since atexit handlers don’t get called
|
||||
* when exec()ing */
|
||||
purge_zerobyte_logfile();
|
||||
/* The unlink call is intentionally after the purge_zerobyte_logfile() so
|
||||
* that the latter does not remove the directory yet. We need to store the
|
||||
* restart layout state in there. */
|
||||
unlink(config.ipc_socket_path);
|
||||
i3_restart(false);
|
||||
|
||||
// XXX: default reply for now, make this a better reply
|
||||
|
Reference in New Issue
Block a user