X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=grab_client.c;h=926f47927c7617f0aa53cae4eeec7f42026ce9f6;hp=7948c44957cdf7f8d28e40c7d3253b385969adf6;hb=ae73007aa7c147660f204c96b6d18edf71bd393d;hpb=879e52d49df6d00aa9eafe5cccb48bbd24ed4c81 diff --git a/grab_client.c b/grab_client.c index 7948c449..926f4792 100644 --- a/grab_client.c +++ b/grab_client.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2014 Andre Noll + * Copyright (C) 2006 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -14,7 +14,6 @@ #include "sched.h" #include "ggo.h" #include "buffer_tree.h" -#include "filter.h" #include "grab_client.h" #include "audiod.h" #include "error.h" @@ -284,7 +283,12 @@ int grab_client_new(int fd, int argc, char **argv, struct sched *s) ret = gc_check_args(argc, argv, gc); if (ret < 0) goto err_out; - gc->fd = fd; + ret = dup(fd); + if (ret < 0) { + ret = -ERRNO_TO_PARA_ERROR(errno); + goto err_out; + } + gc->fd = ret; para_list_add(&gc->node, &inactive_grab_client_list); gc_activate(gc, s); return 1;