[openib-general] RE: Re[PATCH] Opensm - clean exit on ^C
Hal Rosenstock
halr at voltaire.com
Wed Jan 11 06:07:34 PST 2006
On Wed, 2006-01-11 at 02:17, Yael Kalka wrote:
> Hi Hal,
> In revision 3526 you've added a patch that opensm will not handle SIGINT.
> This patch is an addition to that patch. If OpenSM doesn't handle SIGINT,
> then none of its threads should handle it either.
You're right. Thanks. Applied.
-- Hal
> Yael
>
>
> -----Original Message-----
> From: Hal Rosenstock [mailto:halr at voltaire.com]
> Sent: Monday, January 09, 2006 4:56 PM
> To: Yael Kalka
> Cc: openib-general at openib.org; Eitan Zahavi
> Subject: Re: Re[PATCH] Opensm - clean exit on ^C
>
>
> Hi Yael,
>
> On Thu, 2006-01-05 at 07:16, Yael Kalka wrote:
> > Hi Hal,
> >
> > I've noticed that sometimes when killing OpenSM using ^C not all
> > threads are killed.
> > The reason for that is that there are threads that mask the
> > signalling, and when removing the ^C handling from OpenSM, these
> > threads still mask the signalling and stay alive as a result.
> > The following patch fixes this.
>
> Is there one other piece to this ? Doesn't osm_opensm.c need to be
> modified to handle SIGINT for OSM_VENDOR_INTF_OPENIB ? Thanks.
>
> void
> osm_reg_sig_handler(
> IN osm_opensm_t * const p_osm )
> {
> __p_osm_to_signal = p_osm;
> #ifndef OSM_VENDOR_INTF_OPENIB
> cl_reg_sig_hdl( SIGINT, __sig_handler );
> #endif
>
> -- Hal
>
>
> > Thanks,
> > Yael
> >
> > Signed-off-by: Yael Kalka <yael at mellanox.co.il>
> >
> > Index: include/complib/cl_signal_osd.h
> > ===================================================================
> > --- include/complib/cl_signal_osd.h (revision 4760)
> > +++ include/complib/cl_signal_osd.h (working copy)
> > @@ -148,12 +148,14 @@ cl_sig_mask_sigint(void)
> > #ifdef __WIN__
> > /* we do not mask kill */
> > #else
> > +#ifndef OSM_VENDOR_INTF_OPENIB
> > sigset_t sigs;
> >
> > sigemptyset(&sigs);
> > sigaddset(&sigs, SIGINT);
> > pthread_sigmask(SIG_BLOCK, &sigs, NULL);
> > - #endif
> > +#endif /* OSM_VENDOR_INTF_OPENIB */
> > +#endif /* __WIN__ */
> > }
> > /*
> > *********/
> > Index: libvendor/osm_vendor_ibumad.c
> > ===================================================================
> > --- libvendor/osm_vendor_ibumad.c (revision 4760)
> > +++ libvendor/osm_vendor_ibumad.c (working copy)
> > @@ -244,10 +244,6 @@ umad_receiver(void *p_ptr)
> >
> > OSM_LOG_ENTER( p_ur->p_log, umad_receiver );
> >
> > - sigemptyset(&sigs);
> > - sigaddset(&sigs, SIGINT);
> > - pthread_sigmask(SIG_BLOCK, &sigs, NULL);
> > -
> > for (;;) {
> > if (!umad &&
> > !(umad = umad_alloc(1, umad_size() + MAD_BLOCK_SIZE))) {
> >
More information about the general
mailing list