diff options
author | okan | 2015-09-16 17:58:25 +0000 |
---|---|---|
committer | okan | 2015-09-16 17:58:25 +0000 |
commit | ea3954427e3e3453eba49e302bf4e3a0272b172e (patch) | |
tree | 6c8c6c794afa080f95f35faa5c8ba69a756d4a90 /kbfunc.c | |
parent | 7d8a5a92b3e6bba227470f31a83772cf42b00fa9 (diff) | |
download | cwm-ea3954427e3e3453eba49e302bf4e3a0272b172e.tar.gz |
On execwm, we should properly release resources before exec'ing into a
new window manager; so allow CWM_EXEC_WM to assign new wm to wm_argv and
pass through cwm_status (now EXECWM) so that x_teardown() gets called
before exec'ing the new window manager. Removes the need for a separate
x_restart() now, using new wm_argv; and consolidates errno for execvp.
Diffstat (limited to '')
-rw-r--r-- | kbfunc.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: kbfunc.c,v 1.117 2015/08/28 12:07:28 okan Exp $ + * $OpenBSD: kbfunc.c,v 1.118 2015/09/16 17:58:25 okan Exp $ */ #include <sys/types.h> @@ -325,8 +325,9 @@ kbfunc_exec(struct client_ctx *cc, union arg *arg) u_spawn(mi->text); break; case CWM_EXEC_WM: - u_exec(mi->text); - warn("%s", mi->text); + cwm_status = CWM_EXECWM; + free(wm_argv); + wm_argv = xstrdup(mi->text); break; default: errx(1, "kb_func: egad, cmd changed value!"); |