* Returns the fd of the entity (pipe or regular file ) that this object is * representing * * Returns -1 on error, the correct fd otherwise */
| 775 | * Returns -1 on error, the correct fd otherwise |
| 776 | */ |
| 777 | int |
| 778 | LogFile::get_fd() |
| 779 | { |
| 780 | if (m_file_format == LOG_FILE_PIPE) { |
| 781 | return m_fd; |
| 782 | } else if (m_log && m_log->m_fp) { |
| 783 | return fileno(m_log->m_fp); |
| 784 | } else { |
| 785 | return -1; |
| 786 | } |
| 787 | } |
no outgoing calls
no test coverage detected