31 #ifndef _SCC_UTIL_FILEDESC_H
32 #define _SCC_UTIL_FILEDESC_H
103 operator int()
const {
return m_fd; }
105 int fd()
const {
return m_fd; }
FileDesc(FileDesc &&other)
Move construct.
FileDesc(int fd)
Wrap an open file descriptor.
FileDesc(const FileDesc &other)
Copy construct by duplication.
FileDesc & operator=(const FileDesc &other)
Copy assign by duplication.
void close()
Signal safe close.
void dup(int)
Duplicate a file descriptor.
FileDesc & operator=(FileDesc &&other)
Move assign.
int fd() const
Return the file descriptor.