8 #include "JackALSARawMidiUtil.h"
11 Jack::CreateNonBlockingPipe(int *fds
)
13 if (pipe(fds
) == -1) {
14 throw std::runtime_error(strerror(errno
));
17 SetNonBlocking(fds
[0]);
18 SetNonBlocking(fds
[1]);
27 Jack::DestroyNonBlockingPipe(int *fds
)
34 Jack::SetNonBlocking(int fd
)
36 int flags
= fcntl(fd
, F_GETFL
);
38 throw std::runtime_error(strerror(errno
));
40 if (fcntl(fd
, F_SETFL
, flags
| O_NONBLOCK
) == -1) {
41 throw std::runtime_error(strerror(errno
));