mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-01 06:36:01 +01:00
don't hardcode stdin fileno
This commit is contained in:
parent
ff0adf4ddc
commit
9fa858b2ff
1 changed files with 2 additions and 1 deletions
|
@ -1421,7 +1421,8 @@ open_stdin(gchar* password)
|
||||||
// read from stdin and dump to temporary file
|
// read from stdin and dump to temporary file
|
||||||
char buffer[BUFSIZ];
|
char buffer[BUFSIZ];
|
||||||
ssize_t count = 0;
|
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)
|
if (write(handle, buffer, count) != count)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue