Open fifo buffers in non block mode
This commit is contained in:
parent
abfc016321
commit
4051534b83
|
@ -37,7 +37,7 @@ namespace
|
||||||
|
|
||||||
Buffer* open_fifo(StringView name, StringView filename, bool scroll)
|
Buffer* open_fifo(StringView name, StringView filename, bool scroll)
|
||||||
{
|
{
|
||||||
int fd = open(parse_filename(filename).c_str(), O_RDONLY);
|
int fd = open(parse_filename(filename).c_str(), O_RDONLY | O_NONBLOCK);
|
||||||
fcntl(fd, F_SETFD, FD_CLOEXEC);
|
fcntl(fd, F_SETFD, FD_CLOEXEC);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
throw runtime_error("unable to open " + filename);
|
throw runtime_error("unable to open " + filename);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user