Commit graph

106 commits

Author SHA1 Message Date
sithlord48
c15214aee7 refactor: use std::scoped_lock inplace of std::lock_guard 2025-06-17 10:23:42 +01:00
sithlord48
5fd4d93f7f refactor: replace ARCH->sleep(...) calls with Arch::sleep(...) 2025-06-17 10:23:42 +01:00
sithlord48
84e289bc30 refactor: replace ARCH->time() with Arch::time() 2025-06-17 10:23:42 +01:00
sithord48
a31cff0225 chore: Cleanup windows includes 2025-06-02 21:55:36 +01:00
Povilas Kanapickas
5ee3fc41bd chore: arch: Remove XArch exception class
XArch no longer contains any extra functionality in addition to what
std::runtime_error nor it signifies a particular type of error.
based-on: 5b991692af
ported-by: sithlord48
2025-05-28 14:00:18 +01:00
Povilas Kanapickas
314899ac7d chore: arch, Remove support for lazy error code to string evaluations
This functionality is not needed because in all code paths the error
code is immediately converted to string without actually using the lazy
evaluation functionality.

based-on: 53dff5b803
ported and expanded by sithlord48
2025-05-28 14:00:18 +01:00
Nick Bolton
35f0e9e6e4 feat(gui): Retry mechanism for Windows Daemon IPC client 2025-04-29 13:13:07 +01:00
sithlord48
71b6f07220 feat: remove stopOnDeskSwitch, its broken 2025-04-22 10:00:45 +01:00
Nick Bolton
1202145bb8 fix(daemon): Use scheduled state when start is scheduled 2025-04-16 05:28:23 -07:00
Nick Bolton
abc963f886 fix(daemon): Only log XArchEvalWindows result when GetExitCodeProcess fails 2025-04-16 05:28:23 -07:00
sithlord48
8b5a61f07f refactor: remove ArchFile, move only use of getInstallDir to MSWindowsWatchdog 2025-03-25 08:39:05 +00:00
sithlord48
0138372871 chore: rename lib/base/log_outputters => lib/base/LogOutputters 2025-03-20 13:06:45 +00:00
Nick Bolton
16517ca541 refactor(daemon): More helpful and less noisy logging 2025-03-14 14:19:46 +00:00
Nick Bolton
e8ea9f53ee refactor(daemon): Separate arg parsing from program control flow 2025-03-14 14:19:46 +00:00
Nick Bolton
a099276e4e refactor: Move Windows SendSAS call to new thread
Moving the SAS event wait and SendSAS call prevents blocking the main thread allowing for more responsive watchdog (e.g. faster restart Core client/server on session switch).
2025-03-12 12:18:32 -04:00
Nick Bolton
b9017de881 refactor: Use simpler lock_guard for Windows daemon set process config 2025-03-12 12:18:32 -04:00
Nick Bolton
3bcc1e11ed chore: Move Windows event constants to constants file 2025-03-12 12:18:32 -04:00
Nick Bolton
5b091dee56 refactor: Rename SAS IPC event name to be more specific 2025-03-12 12:18:32 -04:00
Nick Bolton
5eac984757 chore: Add mutex for process state management in MSWindowsWatchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
997d4a9473 chore: Move free functions to top of Windows watchdog source 2025-03-03 14:33:46 +00:00
Nick Bolton
0f11b61576 chore: Reduce complexity of outputLoop in Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
98aba612c0 chore: Improve loop stop log line in Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
b0547f6713 chore: Use ref to const for openProcessForKill arg in Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
40fefb9369 chore: Use string_view for MSWindowsWatchdog::setProcessConfig 2025-03-03 14:33:46 +00:00
Nick Bolton
d8d022e9fe chore: Scope constants in Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
84194cf5ef chore: Use default init instead of ctor init Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
cd5ba1382d chore: Clean up shutdownExistingProcesses (unused var and use if-init) in Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
c84b4e3f00 refactor: Reduce complexity of mainLoop in Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
be8029deb6 chore: Remove unused g_activeDesktop from Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
dbb9b3bf5a chore: Remove unused trimDesktopName from Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
32bf9aa02a chore: Use const auto instead of enum for kOutputBufferSize in Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
0891afdd63 chore: Use nullptr instead of NULL in Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
f7ab6aba58 chore: Remove unused includes from Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
74e8a63dcd chore: Remove unused getCommand from Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
475172597a chore: Remove unused m_ready from Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
8c30ed7a59 chore: Remove unused m_autoDetectCommand and ctor arg from Windows watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
44f72a29e9 refactor: Use state machine for Windows daemon watchdog 2025-03-03 14:33:46 +00:00
Nick Bolton
f0c60f5ca9 chore: Improve logging for pipe readers in Windows watchdog 2025-02-28 17:58:16 +00:00
Nick Bolton
a99d408be1 chore: Improve logging related to Windows daemon start/stop/install/uninstall 2025-02-28 17:58:16 +00:00
Nick Bolton
19c41e2ac5 fix: Improve Windows daemon stop speed by using non-blocking pipes and shorter sleep times 2025-02-28 17:58:16 +00:00
Nick Bolton
5a7f6bd1c0 refactor: Remove old Windows TCP IPC implementation (replaced by Qt equivalent) 2025-02-28 17:58:16 +00:00
Nick Bolton
a3b0ec28fc refactor: Improve logging message for process backoff and reset failure count when no command is set 2025-02-28 17:58:16 +00:00
Nick Bolton
e07a2efbcc refactor: Implement Windows event loop in AppUtilWindows for graceful shutdown handling 2025-02-28 17:58:16 +00:00
Nick Bolton
e967944c1e fix: Strip line endings for Windows daemon file logging
Windows file logger and `OutputDebugString` already add new lines, so remove the ones added by the Core.
2025-02-28 17:58:16 +00:00
Nick Bolton
80cc323f5a refactor: Improve logging and error handling for SendSAS function in Windows watchdog 2025-02-28 17:58:16 +00:00
Nick Bolton
90e63e2e9e refactor: Exclude current process when killing existing process from Windows daemon 2025-02-28 17:58:16 +00:00
Nick Bolton
0d2d9f385d feat: Implement basic IPC connection between Daemon and GUI 2025-02-28 17:58:16 +00:00
Nick Bolton
e808eed413 refactor: Improve Windows daemon failure backoff for faster client restarts on first fail 2025-02-19 18:23:10 +00:00
Nick Bolton
c9a360a144 fix: Restore active desktop name check in Windows daemon
- Use `PIPE_NOWAIT` to skip empty stderr output on process output reading from Windows daemon watchdog
- Use `CreateProcess` result to determine when to call `CloseHandle` in Windows daemon watchdog
- Trim output from active desktop process in Windows daemon watchdog
- Improve error logging in Windows daemon watchdog
2025-02-19 18:23:10 +00:00
Nick Bolton
524c3b0e7b refactor: Change log level for active desktop query to debug 2025-02-11 13:06:51 +00:00