$OpenBSD: patch-src_commands_c,v 1.11 2014/07/11 15:49:58 dcoppa Exp $

commit c159fc4197ad06d603ba404add501ac02d76c64f
Author: Michael Stapelberg <michael@stapelberg.de>
Date:   Fri Jun 27 09:04:51 2014 +0200

Bugfix: create the directory for storing the restart state

--- src/commands.c.orig	Sun Jun 15 19:12:43 2014
+++ src/commands.c	Fri Jul 11 16:39:36 2014
@@ -201,7 +201,7 @@ void cmd_MIGRATION_start_nagbar(void) {
     /* child */
     if (migration_pid == 0) {
         char *pageraction;
-        sasprintf(&pageraction, "i3-sensible-terminal -e i3-sensible-pager \"%s\"", errorfilename);
+        sasprintf(&pageraction, "${X11BASE}/bin/xterm -e /usr/bin/less \"%s\"", errorfilename);
         char *argv[] = {
             NULL, /* will be replaced by the executable path */
             "-t",
@@ -1685,13 +1685,10 @@ void cmd_reload(I3_CMD) {
 void cmd_restart(I3_CMD) {
     LOG("restarting i3\n");
     ipc_shutdown();
+    unlink(config.ipc_socket_path);
     /* 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
