[systemd-devel] [patch] job: print colored status message at the right spot
Jan Engelhardt
jengelh at medozas.de
Wed Dec 21 10:46:10 PST 2011
On Wednesday 2011-12-21 15:08, Zbigniew Jędrzejewski-Szmek wrote:
> On 12/21/2011 02:23 PM, Jan Engelhardt wrote:
>> +unsigned int console_width(void)
>> +{
>> ...
>> +}
>> +
>
> Hi,
> there already is columns() in src/util.c :)
It gets the #columns from stdout rather than /dev/console to
which the status string is to be written, and keeps the value around
forever without updating even if stdout changes its terminal size.
Speaking of which, SIGWINCH is abused in that regard...
More information about the systemd-devel
mailing list