summaryrefslogtreecommitdiffstats
path: root/ucad.c
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2017-10-13 17:02:25 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2017-10-13 17:02:25 +0200
commitb4ba5c023eb7349589faf5f4a8eb41479d24a95c (patch)
tree876ed620d35bae3d9149533a7be402ac2f745a99 /ucad.c
parent34d038113b623b6f4ee460a2b09891a6181e23b3 (diff)
downloaduca-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.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/ucad.c b/ucad.c
index 48b62cf..7467906 100644
--- a/ucad.c
+++ b/ucad.c
@@ -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);
}