From 09592e294300150a2c627a176bdbec0fedf4e1d9 Mon Sep 17 00:00:00 2001 From: okan Date: Wed, 31 Oct 2012 19:30:19 +0000 Subject: replace 'reload' with 'restart', which merely re-exec's cwm using the existing argv; same idea with respect to argv saving as Alexander Polakov. reload support was half-complete and is getting in the way. agreed to by many --- kbfunc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'kbfunc.c') diff --git a/kbfunc.c b/kbfunc.c index 7754492..67f7a21 100644 --- a/kbfunc.c +++ b/kbfunc.c @@ -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.63 2012/09/09 19:47:47 okan Exp $ + * $OpenBSD: kbfunc.c,v 1.64 2012/10/31 19:30:19 okan Exp $ */ #include @@ -35,6 +35,7 @@ #define KNOWN_HOSTS ".ssh/known_hosts" #define HASH_MARKER "|1|" +extern char **cwm_argv; extern sig_atomic_t xev_quit; void @@ -490,7 +491,8 @@ kbfunc_quit_wm(struct client_ctx *cc, union arg *arg) } void -kbfunc_reload(struct client_ctx *cc, union arg *arg) +kbfunc_restart(struct client_ctx *cc, union arg *arg) { - conf_reload(&Conf); + (void)setsid(); + (void)execvp(cwm_argv[0], cwm_argv); } -- cgit v1.2.3-2-gb3c3