[PATCH] main: The normal way to stop an application is to send SIGTERM, handle it

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-net-gprs@lists.osmocom.org/.

Ivan Kluchnikov Ivan.Kluchnikov at fairwaves.ru
Tue Mar 19 14:40:35 UTC 2013


Patch was committed to master.

2013/3/17 Holger Hans Peter Freyther <hfreyther at sysmocom.de>:
> From: Holger Hans Peter Freyther <zecke at selfish.org>
>
> Make the code handle SIGTERM. This way the pcu can be easily stopped
> with a sysvinit script.
> ---
>  src/pcu_main.cpp |    1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp
> index f135cfd..4fae14b 100644
> --- a/src/pcu_main.cpp
> +++ b/src/pcu_main.cpp
> @@ -114,6 +114,7 @@ void sighandler(int sigset)
>
>         switch (sigset) {
>         case SIGINT:
> +       case SIGTERM:
>                 /* If another signal is received afterwards, the program
>                  * is terminated without finishing shutdown process.
>                  */
> --
> 1.7.10.4
>
>



-- 
Regards,
Ivan Kluchnikov.
http://fairwaves.ru




More information about the osmocom-net-gprs mailing list