# Gst\_bus\_add\_signal\_watch confusion

**URL:** https://discourse.gstreamer.org/t/gst-bus-add-signal-watch-confusion/3446
**Category:** Application Development
**Created:** [October 24, 2024, 5:33am UTC](https://discourse.gstreamer.org/t/gst-bus-add-signal-watch-confusion/3446 "2024-10-24T05:33:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rottnest](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/rottnest/32/136_2.png) [@rottnest](https://discourse.gstreamer.org/u/rottnest)
#### Post date: [October 24, 2024, 5:33am UTC](https://discourse.gstreamer.org/t/gst-bus-add-signal-watch-confusion/3446/1 "2024-10-24T05:33:14Z")

</div>

I have a pipeline that overlays GPS data on a video display triggered by a SIGUSR1 every 30s

All runs in a main loop. My handler is NOT signal safe, so I

gst\_bus\_add\_signal\_watch (mainBus);  
g\_unix\_signal\_add (SIGUSR1, (GSourceFunc) workHandler, mainPipe);

every 5 or so ticks the displayProgram is killed without leaving any messages or trace. core shows it was in the interrupt handler and died from SEGV.

I (unsafely) use signal (SIGUSR1, workHandler);

Next day my displayProgram is happly ticking along

My only change is to comment in and out the lines shown.

Can anyone offer insight?  
Thanks  
James
