add example with read/write interrupted by signal

Signed-off-by: Barry Song <21cnbao@gmail.com>