List Info

Thread: Re: Manage SIGHUP




Re: Manage SIGHUP
country flaguser name
Uganda
2007-08-29 05:15:28
Applied to CVS. Thanks

P.

On Aug 29, 2007, at 11:24, emnuele wrote:

> Hi all,
>
> usually SIGHUP is used in order to close and to reopen
the log  
> files (with logrotate for example). Mbuni manage the
SIGHUP as  
> SIGTERM and quit the application.
> I attach my patch that manage the SIGHUP signal.
>
> --- mmsbox/mmsbox.c     17 Jul 2007 08:26:36 -0000     
1.35
> +++ mmsbox/mmsbox.c     28 Aug 2007 13:29:57 -0000
>  -40,6 +40,15 
>                http_close_port(mmc->incoming.port);
>
>  }
>
> +//manage the SIGHUP signal
> +static void relog_now(int notused)
> +{
> +     warning(0, "SIGHUP received, catching and
re-opening logs");
> +     log_reopen();
> +     alog_reopen();
> +}
> +
>
> +
>  /* Finds text part, returns copy. */
>  static MIMEEntity *find_textpart(MIMEEntity *m)
>  {
>  -555,7 +564,7 
>
>       mms_cfg_destroy(cfg);
>
> -     signal(SIGHUP, quit_now);
> +     signal(SIGHUP, relog_now);
>
>       signal(SIGTERM, quit_now);
>       signal(SIGPIPE,SIG_IGN); /* Ignore pipe errors.
They kill us  
> sometimes for nothing*/
>
> _______________________________________________
> Devel mailing list
> Develmbuni.org
> http://
lists.mbuni.org/mailman/listinfo/devel

_______________________________________________
Devel mailing list
Develmbuni.org
http://
lists.mbuni.org/mailman/listinfo/devel

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )