Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When scsynth is terminated, the PRU keeps running #11

Closed
giuliomoro opened this issue Aug 11, 2016 · 4 comments
Closed

When scsynth is terminated, the PRU keeps running #11

giuliomoro opened this issue Aug 11, 2016 · 4 comments

Comments

@giuliomoro
Copy link

This probably means that the PRU cleanup is not performed

@sensestage
Copy link

maybe related to #9 ?

@sensestage
Copy link

I think it is definately related to #9.

@giuliomoro
Copy link
Author

giuliomoro commented Oct 8, 2016

So this happens only when you SIGINT scsynth.
It does not happen when using s.quit;, as far as I can tell.

This happens because - afaict - there is no signal handler installed, os none of the cleanup functions gets called. Ideally you would want to install a signal handler in main() in scsynth_main.cpp that makes some magic to properly stop the server.
Therefore I'd say this is unrelated from #9

For instance, would it be possible to emulate a the equivalent s.quit sent from sclang ? That's probably the cleanest way of dying.

e.g.:

// at the top of `scsynth_main.cpp`:

#ifdef BELA
// Handle Ctrl-C by requesting that the audio rendering stop

void interrupt_handler(int signal)
{
    // do magic to gracefully stop the server 
}
#endif

// and then later in main() ...

#ifdef BELA
    // Set up interrupt handler to catch Control-C and SIGTERM
    signal(SIGINT, interrupt_handler);
    signal(SIGTERM, interrupt_handler);
#endif

@giuliomoro
Copy link
Author

@apmcpherson

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

No branches or pull requests

2 participants