Skip to content

Fix math module crash and lock file descriptor leak - #1

Open
IovAnto wants to merge 1 commit into
F-4Dev:masterfrom
IovAnto:fix-math-and-lock
Open

Fix math module crash and lock file descriptor leak#1
IovAnto wants to merge 1 commit into
F-4Dev:masterfrom
IovAnto:fix-math-and-lock

Conversation

@IovAnto

@IovAnto IovAnto commented May 1, 2026

Copy link
Copy Markdown

This PR fixes crashes and instance-locking issues in the math module.

Key changes:

  • Fix "Instance already running": Added O_CLOEXEC to the lock file to prevent background child processes (like wl-copy) from keeping the application locked after exit.

  • Fix Crashes: Added safety checks for popen results to prevent Segfaults if qalc fails or is missing.

  • Code Cleanup: Replaced unsafe strncat with snprintf, fixed a logic fallthrough in module execution, and stripped trailing newlines from calculator results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant