/*
- * Copyright (C) 2005-2007 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2008 Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
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;
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;
}