10#include <cosmos/BitMask.hxx>
13#include <clues/items/fcntl.hxx>
14#include <clues/items/items.hxx>
15#include <clues/SystemCallItem.hxx>
16#include <clues/types.hxx>
18namespace clues::item {
21class CLUES_API PipeEnds :
22 public PointerOutValue {
26 PointerOutValue{
"pipefd",
"pointer to array pipefd[2]"} {
29 std::string
str()
const override;
31 cosmos::FileNum readEnd()
const {
35 cosmos::FileNum writeEnd()
const {
45 return m_read_end != cosmos::FileNum::INVALID && m_write_end != cosmos::FileNum::INVALID;
51 m_read_end = cosmos::FileNum::INVALID;
52 m_write_end = cosmos::FileNum::INVALID;
59 void updateData(
const Tracee &proc)
override;
63 cosmos::FileNum m_read_end = cosmos::FileNum::INVALID;
64 cosmos::FileNum m_write_end = cosmos::FileNum::INVALID;
68class CLUES_API PipeFlags :
69 public ValueInParameter {
72 enum class Flag :
int {
75 NONBLOCK = O_NONBLOCK,
76 NOTIFICATION_PIPE = O_EXCL
81 using Flags = cosmos::BitMask<Flag>;
85 explicit PipeFlags() :
86 ValueInParameter{
"flags"} {
93 std::string
str()
const override;
Base class for traced processes.
bool haveEnds() const
Returns whether valid read and write end file numbers are stored.
void processValue(const Tracee &) override
Processes the value stored in m_val acc. to the actual item type.
std::string str() const override
Returns a human readable string representation of the item.
void processValue(const Tracee &proc) override
Processes the value stored in m_val acc. to the actual item type.
std::string str() const override
Returns a human readable string representation of the item.