9 reader(read_handle, 1024)
22 signal_flush_required.emit();
23 sys_close(read_handle);
24 sys_close(write_handle);
27 void Pipe::set_mode(Mode m)
31 throw invalid_argument("Pipe::set_mode");
35 Mode close = mode&M_RDWR&~m;
37 sys_close(read_handle);
39 sys_close(write_handle);
40 mode = (mode&~M_RDWR)|m;
43 void Pipe::set_block(bool b)
45 adjust_mode(mode, M_NONBLOCK, !b);
46 sys_set_blocking(read_handle, b);
47 sys_set_blocking(write_handle, b);
50 void Pipe::set_inherit(bool i)
52 adjust_mode(mode, M_INHERIT, i);
53 sys_set_inherit(read_handle, i);
54 sys_set_inherit(write_handle, i);
57 unsigned Pipe::do_write(const char *buf, unsigned size)
62 return sys_write(write_handle, buf, size);
65 unsigned Pipe::do_read(char *buf, unsigned size)
70 unsigned ret = reader.read(buf, size);
77 const Handle &Pipe::get_handle(Mode m)
84 throw invalid_argument("Pipe::get_handle");