#include <config.h>#include "sbuild-ctty.h"#include <cerrno>#include <cstring>#include <ext/stdio_filebuf.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>Include dependency graph for sbuild-ctty.cc:

Typedefs | |
| typedef std::pair< ctty_error_code, const char * > | emap |
Functions | |
| void | set_cloexec (int fd) |
| Set close-on-exec flag. | |
| int | open_ctty () |
| Open the controlling terminal and return its file descriptor. | |
| const int | sbuild::CTTY_FILENO (open_ctty()) |
| int | cttybuf_fd () |
| Get the file descriptor for cttybuf. | |
| __gnu_cxx::stdio_filebuf< char > | cttybuf (cttybuf_fd(), std::ios::in|std::ios::out) |
| A streambuf for cctty. | |
| std::iostream | sbuild::cctty (&cttybuf) |
Variables | |
| emap | init_errors [] |
| This is a list of the supported error codes. | |
typedef std::pair<ctty_error_code,const char *> emap [static] |
| __gnu_cxx::stdio_filebuf<char> @26::cttybuf | ( | cttybuf_fd() | , | |
| std::ios::in|std::ios::out | ||||
| ) | [static] |
A streambuf for cctty.
| int @26::cttybuf_fd | ( | ) | [static] |
Get the file descriptor for cttybuf.
An error will be thrown on failure.
| int @26::open_ctty | ( | ) | [static] |
Open the controlling terminal and return its file descriptor.
| void @26::set_cloexec | ( | int | fd | ) | [static] |
Set close-on-exec flag.
An error will be thrown on failure.
| fd | the file descriptor to set. |
emap init_errors[] [static] |
Initial value:
{
emap(CTTY_CLOEXEC, N_("The CTTY FD_CLOEXEC flag could not be set")),
emap(CTTY_DUP, N_("The CTTY file descriptor could not be duplicated"))
}
It's used to construct the real error codes map.
1.5.2