blob: a767e37b1f49e376765566215c92f166e301a4ac (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/vespalib/util/guard.h>
namespace vespalib {
/**
* A thin wrapper around a pipe between two file-descriptors.
**/
struct Pipe {
FileDescriptor read_end;
FileDescriptor write_end;
bool valid() const { return (read_end.valid() && write_end.valid()); }
static Pipe create();
~Pipe();
};
} // namespace vespalib
|