Currently we set inotify_fd to the value 0 when inotify_fd hasn't been
created yet, or after we close it. But 0 is a valid fd, and we check
for the value -1 to see if it's been initialized. So, if inotify
support is compiled in, but we disable_auto_reload, we can end up
closing fd 0. This can screw up various other things in weird ways,
including that exec'd processes appear to have an invalid stdin.
So, set inotify_fd to -1 to clear all of this up.
(cherry picked from commit f670e70d7c)
This uses the POSIX.1-2008 function realpath; if it does not comply with
the standard, bad things will happen (unspecified behaviour). Linux does
it right from the beginning.
Fixes ${top cpu} when top_cpu_seperate is used in some cases.
info.cpu_count is filled lazily when objects that need it are used, but
this was not the case for $top.
Sometimes wlan related TEXT causes segment fault, and backtrace shows it's strtok in
iw_get_stats.
I read the code of wireless_tools, which says 'strtok not thread safe, not used in WE-12 and
later' for iw_get_stats. But it need to first check if has_range and then we_version_compiled.
In conky/src/linux.cc, iw_get_stats is called before iw_get_range_info, hence has_range is always
0 in iw_get_stats and strtok is used. I simply move iw_get_range_info before iw_get_stats and no
segfault up to now.
patch by ruikai
curl implements some of the timeouts using alarm(), where the alarm handler longjmp()s back into the
curl code. This is a bad idea in multi-threaded applications, since it is not guaranteed that
SIGALARM will be recieved by the correct thread. Therefore, we instruct curl to avoid using
signals.
Adds mpd_albumartist support as an object since mpd_artist lists all participating artists of the
current song and not the main album artist.
patch by Sébastien Lavoie-Courchesne
The leak was caused by commit 8827d61, attempting to solve a problem with top displaying 10th
process incorrectly.
I think there should be a more elegant solution to this, but I don't know how to find it atm
(it could be due the fact that it's 4am here).