Add interruptible function to read from pipe
This will avoid to block Ctrl+c if the process the pipe is read from takes too much time.
This commit is contained in:
@@ -10,4 +10,12 @@ bool
|
||||
sc_process_check_success_intr(struct sc_intr *intr, sc_pid pid,
|
||||
const char *name, bool close);
|
||||
|
||||
ssize_t
|
||||
sc_pipe_read_intr(struct sc_intr *intr, sc_pid pid, sc_pipe pipe, char *data,
|
||||
size_t len);
|
||||
|
||||
ssize_t
|
||||
sc_pipe_read_all_intr(struct sc_intr *intr, sc_pid pid, sc_pipe pipe,
|
||||
char *data, size_t len);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user