X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=grab_client.c;h=926f47927c7617f0aa53cae4eeec7f42026ce9f6;hp=f4bcbb79d104a4752a8a5fa22df2c3a5cc6515fe;hb=ae73007aa7c147660f204c96b6d18edf71bd393d;hpb=4d9d588c5df359c3c5f279fbfd4ea51d3a2afc87 diff --git a/grab_client.c b/grab_client.c index f4bcbb79..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;