Commit 41bb91b5 authored by Benoît Minisini's avatar Benoît Minisini
Browse files

Remove the 'glib' workaround of commit 'c8fe917e', it breaks 'gb.web.gui',...

Remove the 'glib' workaround of commit 'c8fe917e', it breaks 'gb.web.gui', that needs true read-only pipes.

[INTERPRETER]
* BUG: Remove the 'glib' workaround of commit 'c8fe917e', it breaks 'gb.web.gui', that needs true read-only pipes.
parent cba7b188
Pipeline #340764338 passed with stage
in 24 minutes and 17 seconds
......@@ -56,7 +56,7 @@ static int stream_open(STREAM *stream, const char *path, int mode)
switch (mode & GB_ST_MODE)
{
case GB_ST_READ: fmode |= O_RDWR; break;
case GB_ST_READ: fmode |= O_RDONLY; break;
case GB_ST_WRITE: fmode |= O_WRONLY; break;
case GB_ST_READ_WRITE: fmode |= O_RDWR; break;
default: fmode |= O_RDWR;
......@@ -68,7 +68,7 @@ static int stream_open(STREAM *stream, const char *path, int mode)
if ((mode & GB_ST_MODE) == GB_ST_READ)
fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) & ~O_NONBLOCK);
stream->pipe.can_write = mode & GB_ST_WRITE;
stream->pipe.can_write = ((mode & GB_ST_MODE) & GB_ST_WRITE) != 0;
FD = fd;
return FALSE;
......
Markdown is supported
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