Errores #107
Should terminate upon receipt of SIGINT signal (and un-register, un-susbcribe...)
| Status: | Rechazada | Start: | 08/04/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | % Done: | 0% |
||
| Category: | YASS - core | |||
| Target version: | 0.5.2 |
Description
If you run yass from console by typing "yassphone" and later press "Ctrl+C", the terminal sends a SIGINT to yass, but it doesn't react on it (the signal is ignored).
It seems that yass just reacts uponr receipt a SIGTERM signal. You can check it:
kill -s TERM $(pidof python2.5) # kills yass kill -s INT $(pidof python2.5) # doesn't kill yass
So I suggest that yass also terminates when receiving a SIGNINT signal.
Also, when receiving SIGTERM or SIGINT yass should un-register and un-subscribe properly, by following the same steps as when "Quit" button is pressed.
History
Updated by Saúl Ibarra Corretgé over 2 years ago
- Status changed from Nueva to Resuelta
- Target version changed from Nice to have to 0.5.2
Done! Check r164 :) Note there is some delay in the signal handling, possibly due to PJSIP threads priority.
Updated by Iñaki Baz Castillo over 2 years ago
Fixed "ni de coña" XD
If I send a INT or TERM signal nothing occurs, but YASS gets "frozen" and then I cannot terminate it even by pressing the "Quit" button.
Updated by Saúl Ibarra Corretgé over 2 years ago
Tested and working OK :-O
saghul@ironsaghul:~/src/yass/trunk$ ./yassphone
15:03:28.674 os_core_unix.c pjlib 1.0.3 for POSIX initialized
15:03:28.675 sip_endpoint.c Creating endpoint instance...
15:03:28.675 pjlib select() I/O Queue created (0x87360d8)
15:03:28.675 sip_endpoint.c Module "mod-msg-print" registered
15:03:28.675 sip_transport. Transport manager created.
^CStarting safe shutdown...
saghul@ironsaghul:~/src/yass/trunk$ ./yassphone
15:05:06.756 os_core_unix.c pjlib 1.0.3 for POSIX initialized
15:05:06.756 sip_endpoint.c Creating endpoint instance...
15:05:06.757 pjlib select() I/O Queue created (0x8a8c398)
15:05:06.757 sip_endpoint.c Module "mod-msg-print" registered
15:05:06.757 sip_transport. Transport manager created.
Starting safe shutdown...
As I told you before, there is a delay (sometimes it's 30s!) because that thread is from PJSIP, there is nothing we can do about it...
Please check it again :)
Updated by Iñaki Baz Castillo over 2 years ago
If it receives any SIP message (OPTIONS, NOTIFY) then it just doesn't terminate. Yes I see:
Starting safe shutdown...
but it's never terminated and I must kill it with -9. Sure. It's not correct as it is now.
Also, 30 seconds is not acceptable :(
Updated by Saúl Ibarra Corretgé over 2 years ago
- Status changed from Comentarios to Rechazada
I tried different approaches, but none of them is valid, because we have no control over pjsip worker thread. I'm reverting the changes I made before...
Thanks for the testing anyway...
Updated by Iñaki Baz Castillo over 2 years ago
Yes yes, you revert the changes... but, when will you revert my money?