chiark / gitweb /
journalctl: reset cached column count on SIGWINCH
authorDave Reisner <dreisner@archlinux.org>
Sat, 22 Sep 2012 16:50:27 +0000 (12:50 -0400)
committerDave Reisner <dreisner@archlinux.org>
Mon, 24 Sep 2012 12:38:03 +0000 (08:38 -0400)
commit585314e84c1a2e8941309874088963985e063213
treebdedaa2f07bc52ff5b02d6f51b3dde8f3e727d52
parentdd144c63e285e35149f80b1a41af548ad040c037
journalctl: reset cached column count on SIGWINCH

This requires a little bit of tip-toeing around to explicitly avoid
touching the environment from a sig handler. Instead, simply create a
function to reset the var to its "unset" state, allowing the next call
to columns() to recalculate and cache the new value.
src/journal/journalctl.c
src/shared/util.c
src/shared/util.h