aboutsummaryrefslogtreecommitdiff
path: root/src/self_pipe.cc
blob: 42e61d87927fee11e518afe2866ff657cddaaf02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

#include "pipe.h"

#include <unistd.h>
#include <cstdlib>
#include <fcntl.h>

#include "error.h"

namespace ov4
{

void self_pipe_init()
{
    int ret = pipe2(self_pipe_fd, O_NONBLOCK);
    if (ret != 0)
    {
        throw T_error(error_code::FAIL_TO_OPEN_PIPE, "Fail to open self pipe");
    }
}

}