X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=audioc.c;h=0c2049ad71cb06a77297d502d7acae7b3265e79e;hp=aa7184e09070d4742650cc7b72904ab066ebc482;hb=8221397af24a2df3c2edbc889847ce0ab15eb3e0;hpb=7a0852896a75d852dbd2ac848ec5c0be3b5dea71 diff --git a/audioc.c b/audioc.c index aa7184e0..0c2049ad 100644 --- a/audioc.c +++ b/audioc.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2007 Andre Noll + * Copyright (C) 2005-2009 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -106,7 +106,12 @@ int main(int argc, char *argv[]) if (ret < 0) goto out; fd = ret; - + ret = mark_fd_nonblocking(fd); + if (ret < 0) + goto out; + ret = mark_fd_nonblocking(STDOUT_FILENO); + if (ret < 0) + goto out; ret = send_cred_buffer(fd, args); if (ret < 0) goto out; @@ -150,6 +155,6 @@ out: if (!ret && loaded && buf) ret = write(STDOUT_FILENO, buf, loaded); if (ret < 0) - PARA_ERROR_LOG("%s\n", PARA_STRERROR(-ret)); + PARA_ERROR_LOG("%s\n", para_strerror(-ret)); return ret < 0? EXIT_FAILURE : EXIT_SUCCESS; }