Open intr-cx opened 1 year ago
Does it also hang if you replace [[/usr/bin/find /home/intr/.local/share/mail/*/[Ii][Nn][Bb][Oo][Xx]/new/* -type f | wc -l]]
with echo test
?
What versions of Lua, luastatus and lemonbar are you using?
Can you please add io.stderr:write('cb called\n')
to the beginning of cb
?
Can you run luastatus under strace -f
(LUASTATUS="strace -f luastatus" luastatus-lemonbar-launcher …
) and paste the full output?
Anyway, I can’t reproduce it here with /tmp/luastatus-test
as the file to be watched and the command replaced to date +%s.%N
.
@shdown Thanks for your reply. The issue seems to happen when using both the cpu-temperature widget (which also uses io.popen) and the mail widget (same with the bluetooth widget.) Below is the output from strace. Perhaps it's related to concurrent calls to popen?
What versions of Lua, luastatus and lemonbar are you using?
Does it also hang if you replace [[/usr/bin/find /home/intr/.local/share/mail/*/[Ii][Nn][Bb][Oo][Xx]/new/* -type f | wc -l]]
with 'date +%s.%N'
?
Can you please add io.stderr:write('cb called\n')
to the beginning of cb
and io.stderr:write('popen done\n')
after popen
?
Sorry! I forgot to mention those details.
Replacing popen with the date command will spawn the bar showing the date, everything remains responsive until I touch
the mailsynclastrun file.
I have also tried switching from the inotify plugin to a simple timer, which will also hang after the second time cb is called.
Adding the io.stderr:write before & after popen will print the first error as follows;
luastatus: error: (lua) mail.lua:8: attempt to call field 'stderr' (a userdata value)
stack traceback:
mail.lua:8: in function <mail.lua:7>
I've also tried different variants of luastatus & lemonbar, namely the vanilla variants without any patches, but the result remains the same.
One thing I noticed is that it's only cpu and mem which end up freezing, the rest (bspwm, pulse, date/time) remains active. Any help would still be appreciated.
I've been trying to write a widget for displaying the amount of new unread emails. It successfully calculates the number of new mail, but when running it with the lemonbar wrapper and other widgets like cpu-temperature (which also invokes io.popen) the bar will freeze and no longer update. Here's the script in question;
Strangely, the same thing happens when trying to use the bluetooth example widget. I'm positive that io.popen is the function causing it to hang, as I've added a boatload of print statements to narrow it down. I'm not a lua dev by any means, but I'd love to get this to work. Googling has brought me basically nowhere, so I was wondering if you could explain what I'm doing wrong (or if it's some sort of bug in luastatus.) Thanks in advance.