fs/FileSystem: OpenFile() returns UniqueFileDescriptor

This commit is contained in:
Max Kellermann
2017-08-10 19:32:17 +02:00
parent eb0ff32efb
commit df5cc3f0f6
5 changed files with 13 additions and 16 deletions

View File

@@ -153,12 +153,12 @@ FifoOutput::OpenFifo()
try {
Check();
input = OpenFile(path, O_RDONLY|O_NONBLOCK|O_BINARY, 0);
input = OpenFile(path, O_RDONLY|O_NONBLOCK|O_BINARY, 0).Steal();
if (input < 0)
throw FormatErrno("Could not open FIFO \"%s\" for reading",
path_utf8.c_str());
output = OpenFile(path, O_WRONLY|O_NONBLOCK|O_BINARY, 0);
output = OpenFile(path, O_WRONLY|O_NONBLOCK|O_BINARY, 0).Steal();
if (output < 0)
throw FormatErrno("Could not open FIFO \"%s\" for writing",
path_utf8.c_str());