32 if ((read || write) && fd >= 0 && file_spec) {
60 if (fd >= 0 && dup_fd >= 0) {
81 stream.
Printf(
"open fd %d with '%s', OFLAGS = 0x%x",
m_fd,
void Clear()
Reset this FileAction to its default state.
bool Duplicate(int fd, int dup_fd)
Configure this action to duplicate a file descriptor.
void Dump(Stream &stream) const
Action m_action
The action for this file.
int m_fd
The file descriptor this action applies to.
int m_arg
oflag for eFileActionOpen, dup_fd for eFileActionDuplicate.
const FileSpec & GetFileSpec() const
Get the file specification for open actions.
bool Open(int fd, const FileSpec &file_spec, bool read, bool write)
Configure this action to open a file.
bool Close(int fd)
Configure this action to close a file descriptor.
FileSpec m_file_spec
File spec to use for opening after fork or posix_spawn.
A stream class that can stream formatted output to a file.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
A class that represents a running process on the host machine.