diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2017-10-13 17:02:25 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2017-10-13 17:02:25 +0200 |
commit | b4ba5c023eb7349589faf5f4a8eb41479d24a95c (patch) | |
tree | 876ed620d35bae3d9149533a7be402ac2f745a99 /ucad.c | |
parent | 34d038113b623b6f4ee460a2b09891a6181e23b3 (diff) | |
download | uca-net-b4ba5c023eb7349589faf5f4a8eb41479d24a95c.tar.gz uca-net-b4ba5c023eb7349589faf5f4a8eb41479d24a95c.tar.bz2 uca-net-b4ba5c023eb7349589faf5f4a8eb41479d24a95c.tar.xz uca-net-b4ba5c023eb7349589faf5f4a8eb41479d24a95c.zip |
ucad: use GIO way to listen to signals
Diffstat (limited to 'ucad.c')
-rw-r--r-- | ucad.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -415,12 +415,6 @@ run_callback (GSocketService *service, GSocketConnection *connection, GObject *s } static void -sigint_handler (int unused) -{ - g_main_loop_quit (loop); -} - -static void serve (UcaCamera *camera, guint16 port, GError **error) { GSocketService *service; @@ -433,7 +427,7 @@ serve (UcaCamera *camera, guint16 port, GError **error) g_signal_connect (service, "run", G_CALLBACK (run_callback), camera); loop = g_main_loop_new (NULL, TRUE); - signal (SIGINT, sigint_handler); + g_unix_signal_add (SIGINT, g_main_loop_quit, loop); g_main_loop_run (loop); } |