Skip to content

Fix SoundBridgeHost signal handler lifetime - #4

Open
rustydomino wants to merge 1 commit into
chenjy16:mainfrom
rustydomino:fix/host-signal-handlers
Open

Fix SoundBridgeHost signal handler lifetime#4
rustydomino wants to merge 1 commit into
chenjy16:mainfrom
rustydomino:fix/host-signal-handlers

Conversation

@rustydomino

Copy link
Copy Markdown
  • Fid DSP test runner path
  • Fix host signal handler lifetime

Summary

Fixes SoundBridgeHost not responding to SIGINT or SIGTERM when run standalone.

Problem

The DispatchSourceSignal instances created in setupSignalHandlers() were local variables. After the function returned, they were released while SIGINT and SIGTERM remained configured with SIG_IGN.

As a result, Ctrl+C and normal SIGTERM termination had no effect on the running host.

Fix

Retain the signal dispatch sources for the lifetime of the host process.

Testing

Verified that:

  • Ctrl+C now triggers the existing SIGINT handler and cleanup path.
  • SIGTERM now triggers the existing SIGTERM handler and cleanup path.
  • SoundBridgeHost exits after cleanup in both cases.

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