Commit Graph

24 Commits

Author SHA1 Message Date
Martynas Maciulevičius c8dc3e7024 Remove unused import 2025-06-27 09:31:51 +03:00
Martynas Maciulevičius aaea814217 Idempotent bar show/hide via configurable user kill signals 2025-06-27 09:31:51 +03:00
literallyvoid 517eb7651e Run `clang-format` on main.cpp 2025-04-14 12:31:23 -07:00
literallyvoid dbd3ffd732 Convert `reload` to a local 2025-04-12 17:54:10 -07:00
literallyvoid 97591c825a Remove `signalThread` and move reaping to `catchSignals` 2025-04-12 17:52:37 -07:00
literallyvoid b03ecb3d74 Move signal handling to main thread 2025-04-12 17:52:37 -07:00
Lars Niesen 1e481b7ac0
fix broken clang-format to run pipeline 2024-11-20 00:00:51 +01:00
Christian Fillion 0e03c7a811
fix a segfault on signals received after main returns
The waybar process does not exit instantaneously.
Signals may be recevied after main has started freeing resources.

When a worker thread is in `fgets` this time window can last forever.
An easy way to duplicate the crash is pressing ^C twice with a Hyprland module.

    Thread 1 "waybar" received signal SIGSEGV, Segmentation fault.
    spdlog::sinks::sink::should_log (this=0x5f620b542ca5,
        msg_level=spdlog::level::info)
        at /usr/src/debug/spdlog/spdlog-1.14.1/include/spdlog/sinks/sink-inl.h:13
    13	  return msg_level >= level_.load(std::memory_order_relaxed);
    (gdb) p $_siginfo._sifields._sigfault.si_addr
    $1 = (void *) 0x5f620b542cad
2024-10-16 10:04:04 -04:00
Austin Horstman 14c3235c12
src: clang-tidy 2024-07-02 10:38:58 -05:00
Bryan Waite 67ab269706
Fixing memory leak on update UPower tooltip 2023-02-08 17:19:51 +11:00
Alex f2fcadbf62 refactor: lint 2022-04-06 08:37:19 +02:00
Renee D'Netto 943b6bc51b Implement support for reloading of config files.
Fixes #759.
2020-08-28 22:34:24 +10:00
excellentname c3359dec1b Replace signal handler with signal handling thread 2020-07-25 21:02:59 +10:00
excellentname 246f7bf555 Handle SIGCHLD for exec/forkExec
When forkExec is called it begins to ignore all SIGCHLD signals for
the rest of the progam's execution so that they are automatically
reaped. However, this means that subsequent waitpid calls in the exec
function will always fail. So instead handle SIGCHLD by reaping any
processes created by forkExec and ignoring all others so that they can be
handled directly by the exec function.
2020-07-21 12:36:48 +10:00
Lucas Lazare 51be97f9aa Adding spdlog 2019-05-18 19:44:45 -04:00
Alex 807ef32357 refactor: format && better output management 2019-04-18 17:47:40 +02:00
Alex 346ec68578 refactor: format tray && partial fix for #235 2019-04-17 14:19:04 +02:00
hoellen 38fa7ceab1 add signalhandler for module update 2019-03-18 18:46:44 +01:00
Alexis baa7f52e21 refactor(network): wait for new address 2018-11-23 16:04:29 +01:00
Alexis 0abaaf2f7f
style: fix 2018-09-10 11:16:57 +02:00
Alex 6635548d3e
Style code (#25) 2018-08-16 14:29:41 +02:00
Alexis 01894f18cd chore: clean headers 2018-08-12 20:25:19 +02:00
Alexis 6ff296a4b0 refactor(bar): prefer standard unique_ptr 2018-08-11 12:49:28 +02:00
Alexis fcb6a9aa8b feat: init repo 2018-08-08 23:54:58 +02:00