Commit Graph

14 Commits

Author SHA1 Message Date
Patrick Ziegler
444120e664
script: Fix concurrency issues (#2518)
Fixes #1978

* Move tail and non-tail handler to method

Defining them in the constructor is ugly.

* script: Iterate over defined actions instead of fixed list

* Separate running logic and lock m_output

* Include POLYBAR_FLAGS in linker flags

* Stop using m_prev in script_runner

* Join module threads in stop function

Joining in the destructor may lead to UB because the subclass is already
deconstructed but the threads may still require it to be around (e.g.
for calling any functions on the instance)

* Cleanup script module

* Update changelog

* Remove AfterReturn class

* Remove m_stopping from script module

* Fix polybar not reading the entire line from child process.

For every `readline` call we created a new fd_streambuf. This means once
`readline` returns, the streambuf is destructed and and pending data in
its temporary buffer discarded and we never actually read it.

* Remove unused includes
2021-10-03 01:27:11 +02:00
Michael Carlberg
5773b08cf8 fix(script): Poll file descriptors 2017-01-11 18:21:58 +01:00
Michael Carlberg
ccddf052ec refactor(script): Split non-/tail logic
Split the script module into one tailing output module and
one exec once module.

Refs #281
2017-01-01 09:05:18 +01:00
Michael Carlberg
3681247dc1 refactor(file_util): Move block mode helpers 2016-12-25 19:58:52 +01:00
Michael Carlberg
ff9be848c7 refactor(clang-tidy): Apply fixes 2016-11-25 21:58:49 +01:00
Michael Carlberg
fd57ab0f3d fix: project rename 2016-11-19 06:26:07 +01:00
Michael Carlberg
d74dd7f3ef fix(build): Remove disabled libs 2016-11-03 19:01:45 +01:00
Michael Carlberg
e7cb345cec wip: Separate source from definitions 2016-11-03 12:54:32 +01:00
Michael Carlberg
d23119e24e fix(build): Make project compile using gcc5/gcc6 2016-10-11 12:58:26 +02:00
Michael Carlberg
d359ab6057 refactor: Application rewrite 2016-10-10 14:52:57 +02:00
Michael Carlberg
e1f8c001dd refactor: Pass by value 2016-06-21 04:23:23 +02:00
Michael Carlberg
6cae06c4dc refactor(script): Better handling of tail scripts 2016-06-14 12:15:22 +02:00
Michael Carlberg
39d3f61497 refactor(core): Clean-up
- use "#pragma once" instead of the regular include guard
- fix errors and warnings reported by cppcheck
2016-06-02 01:32:06 +02:00
Michael Carlberg
eeefb3c610 init(git): Base commit 2016-05-19 20:23:45 +02:00