feat(process,cclip): explicit kill Result + lockfile semantics; clean fullscreen; stable Kitty/Foot clearing; config error UX; v2.3.0-seedclay#17
Conversation
Change kill_process_sigterm from a void wrapper to return Result<(), std::io::Error>, checking libc::kill()'s return value and mapping failures with std::io::Error::last_os_error(). This exposes errno (ESRCH/EPERM/etc.) to callers, avoids silent failures and unsafe/manual errno access, and provides
|
thanks for the pr twin, i appreciate the effort and the intent to make kill() handling more explicit.
thanks again — the change makes sense and i'm happy to merge once the PR compiles cleanly in-tree, and either preserves backwards compatibility via a wrapper or updates all call sites and documents it. |
- Added kill_process_sigterm_result that returns Result<(), io::Error> - kill_process_sigterm now just wraps it and logs errors instead of propagating - Updated main.rs and app_launcher/run.rs to handle process kill errors explicitly - Makes process termination more reliable, especially when replacing old instances
…andling - Change `kill_process_sigterm_result` to return raw errno - Remove lockfile only after confirming process termination or staleness (ESRCH) - Propagate non-ESRCH errors when killing processes in cclip and app launcher modes
kill_process_sigterm now returns Result with errno. Fixes cclip lockfile race condition by handling ESRCH (no process) and preserving lock on EPERM. Improves app_launcher error handling.
|
@Mjoyufull review code |
…onfig error UX; add kill helper; v2.3.0-seedclay
- Process/locking
- Add kill_process_sigterm_result(pid) -> io::Result<()>, keep wrapper (Option A)
- Remove cclip lock only on Ok or ESRCH; preserve on EPERM/others
- Rendering/graphics
- Clean fullscreen (Alt+I): fully cleared background, cursor to (0,0)
- Kitty: centered display
- Foot/Sixel: true fullscreen
- Tag mode: clear image on entry; suspend inline preview during tag modes; resume on exit
- Foot/Sixel stability: pre-draw terminal.clear() on image state changes, then Clear all panels in-draw to re-sync ratatui buffer (fixes missing glyphs)
- Pipeline hygiene
- Compute layout/wrapping inside terminal.draw()
- Remove post-draw clearing; use in-draw Clear
- Config UX
- Enhanced duplicate key/table error with actionable guidance (root vs [dmenu] vs [cclip])
- Misc
- Collapse consecutive str::replace per clippy
- Bump version to 2.3.0-seedclay (MINOR, backward compatible)
Mjoyufull
left a comment
There was a problem hiding this comment.
clean as @emendoza2014 said. merged
kill_process_sigterm now returns Result with errno. Fixes cclip lockfile race condition by handling ESRCH (no process) and preserving lock on EPERM. Improves app_launcher error handling.… fullscreen; stable Kitty/Foot clearing; config error UX; v2.3.0-seedclay (#17) * process: make kill_process_sigterm return Result and surface OS errors Change kill_process_sigterm from a void wrapper to return Result<(), std::io::Error>, checking libc::kill()'s return value and mapping failures with std::io::Error::last_os_error(). This exposes errno (ESRCH/EPERM/etc.) to callers, avoids silent failures and unsafe/manual errno access, and provides * feat: make process kill return Result for better error handling - Added kill_process_sigterm_result that returns Result<(), io::Error> - kill_process_sigterm now just wraps it and logs errors instead of propagating - Updated main.rs and app_launcher/run.rs to handle process kill errors explicitly - Makes process termination more reliable, especially when replacing old instances * Fix cclip lockfile race condition and improve process killing error handling - Change `kill_process_sigterm_result` to return raw errno - Remove lockfile only after confirming process termination or staleness (ESRCH) - Propagate non-ESRCH errors when killing processes in cclip and app launcher modes * fixed small issues * feat(process,cclip,ui): clean fullscreen; stable Kitty/Foot clears; config error UX; add kill helper; v2.3.0-seedclay - Process/locking - Add kill_process_sigterm_result(pid) -> io::Result<()>, keep wrapper (Option A) - Remove cclip lock only on Ok or ESRCH; preserve on EPERM/others - Rendering/graphics - Clean fullscreen (Alt+I): fully cleared background, cursor to (0,0) - Kitty: centered display - Foot/Sixel: true fullscreen - Tag mode: clear image on entry; suspend inline preview during tag modes; resume on exit - Foot/Sixel stability: pre-draw terminal.clear() on image state changes, then Clear all panels in-draw to re-sync ratatui buffer (fixes missing glyphs) - Pipeline hygiene - Compute layout/wrapping inside terminal.draw() - Remove post-draw clearing; use in-draw Clear - Config UX - Enhanced duplicate key/table error with actionable guidance (root vs [dmenu] vs [cclip]) - Misc - Collapse consecutive str::replace per clippy - Bump version to 2.3.0-seedclay (MINOR, backward compatible) @Marbowls ---------
Change kill_process_sigterm from a void wrapper to return Result<(), std::io::Error>, checking libc::kill()'s return value and mapping failures with std::io::Error::last_os_error().
This exposes errno (ESRCH/EPERM/etc.) to callers, avoids silent failures and unsafe/manual errno access, and provides