19 if (fh != INVALID_HANDLE_VALUE && dup_fh != INVALID_HANDLE_VALUE) {
30 if ((read || write) && fh != INVALID_HANDLE_VALUE && file_spec) {
47 if (
m_handle != INVALID_HANDLE_VALUE)
51 return GetStdHandle(STD_INPUT_HANDLE);
53 return GetStdHandle(STD_OUTPUT_HANDLE);
55 return GetStdHandle(STD_ERROR_HANDLE);
57 return INVALID_HANDLE_VALUE;
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.
FileSpec m_file_spec
File spec to use for opening after fork or posix_spawn.
HANDLE GetHandle() const
Get the Windows HANDLE for this action's file.
HANDLE GetActionArgumentHandle() const
Get the Windows HANDLE argument for eFileActionDuplicate actions.
bool Open(HANDLE fh, const FileSpec &file_spec, bool read, bool write)
Configure this action to associate a Windows file handle with a file.
WindowsFileAction()=default
bool Duplicate(HANDLE fh, HANDLE dup_fh)
Configure this action to duplicate a Windows file handle.
A class that represents a running process on the host machine.