Lines Matching refs:stream
520 std::unique_ptr<FILE, decltype(&fclose)> stream(nullptr, fclose);
527 // If fileno() is -2, stdout/stderr is not associated with an output stream, so we should read,
549 stream.reset(fdopen(fd, "wb"));
550 if (stream.get() == nullptr) {
551 fprintf(stderr, "Failed to open duplicate stream for %s: %s\n", output_name,
557 // Unbuffer the stream because it will be buffered by default and we want subprocess output
559 if (setvbuf(stream.get(), NULL, _IONBF, 0) == -1) {
564 // fd will be closed when stream is closed.
584 if (stream) {
586 const size_t bytes_written = fwrite(buf, 1, bytes_read, stream.get());