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 mode = (mode&~M_NONBLOCK);
47 mode = (mode|M_NONBLOCK);
49 sys_set_blocking(read_handle, b);
50 sys_set_blocking(write_handle, b);
53 unsigned Pipe::do_write(const char *buf, unsigned size)
58 return sys_write(write_handle, buf, size);
61 unsigned Pipe::do_read(char *buf, unsigned size)
66 unsigned ret = reader.read(buf, size);
73 const Handle &Pipe::get_handle(Mode m)
80 throw invalid_argument("Pipe::get_handle");