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.
This commit is contained in:
gambas 2021-07-21 18:57:40 +02:00
parent cba7b18844
commit 41bb91b512

View file

@ -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;