Commit 9fa858b2 authored by Sebastian Ramacher's avatar Sebastian Ramacher
Browse files

don't hardcode stdin fileno

parent ff0adf4d
......@@ -1421,7 +1421,8 @@ open_stdin(gchar* password)
// read from stdin and dump to temporary file
char buffer[BUFSIZ];
ssize_t count = 0;
while ((count = read(0, buffer, BUFSIZ)) > 0)
int stdinfno = fileno(stdin);
while ((count = read(stdinfno, buffer, BUFSIZ)) > 0)
{
if (write(handle, buffer, count) != count)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment