mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Add support for re-exec'ing with SIGHUP; equivalent to the already built-in
'restart' function.
This commit is contained in:
parent
3d7c82936e
commit
156681f0a5
5
calmwm.c
5
calmwm.c
@ -82,6 +82,8 @@ main(int argc, char **argv)
|
||||
|
||||
if (signal(SIGCHLD, sighdlr) == SIG_ERR)
|
||||
err(1, "signal");
|
||||
if (signal(SIGHUP, sighdlr) == SIG_ERR)
|
||||
err(1, "signal");
|
||||
|
||||
Conf.homedir = getenv("HOME");
|
||||
if ((Conf.homedir == NULL) || (Conf.homedir[0] == '\0')) {
|
||||
@ -221,6 +223,9 @@ sighdlr(int sig)
|
||||
(pid < 0 && errno == EINTR))
|
||||
;
|
||||
break;
|
||||
case SIGHUP:
|
||||
cwm_status = CWM_EXEC_WM;
|
||||
break;
|
||||
}
|
||||
|
||||
errno = save_errno;
|
||||
|
8
cwm.1
8
cwm.1
@ -184,6 +184,14 @@ List all available items.
|
||||
.It Ic [Esc]
|
||||
Cancel.
|
||||
.El
|
||||
.Pp
|
||||
.Nm
|
||||
rereads its configuration file when it receives a hangup signal,
|
||||
.Dv SIGHUP ,
|
||||
by executing itself with the name and arguments with which it was started.
|
||||
This is equivilant to the
|
||||
.Ar restart
|
||||
function.
|
||||
.Sh SEARCH
|
||||
.Nm
|
||||
features the ability to search for windows by their current title,
|
||||
|
Loading…
Reference in New Issue
Block a user