reload on signal
This commit is contained in:
parent
3dfd694642
commit
ca5774d6ff
16
x.c
16
x.c
|
@ -3097,6 +3097,21 @@ config_init(void)
|
||||||
for (p = resources; p < resources + LEN(resources); p++)
|
for (p = resources; p < resources + LEN(resources); p++)
|
||||||
resource_load(db, p->name, p->type, p->dst);
|
resource_load(db, p->name, p->type, p->dst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
reload(int sig)
|
||||||
|
{
|
||||||
|
config_init();
|
||||||
|
|
||||||
|
xloadcols();
|
||||||
|
xunloadfonts();
|
||||||
|
|
||||||
|
cresize(win.w, win.h);
|
||||||
|
redraw();
|
||||||
|
|
||||||
|
ttywrite("\033[O", 3, 1);
|
||||||
|
signal(SIGUSR1, reload);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -3196,6 +3211,7 @@ run:
|
||||||
|
|
||||||
#if USEXRESOURCES
|
#if USEXRESOURCES
|
||||||
config_init();
|
config_init();
|
||||||
|
signal(SIGUSR1, reload);
|
||||||
#endif
|
#endif
|
||||||
cols = MAX(cols, 1);
|
cols = MAX(cols, 1);
|
||||||
rows = MAX(rows, 1);
|
rows = MAX(rows, 1);
|
||||||
|
|
Loading…
Reference in a new issue