pipe: Add notification lossage handling
Add handling for loss of notifications by having read() insert a loss-notification message after it has read the pipe buffer that was last in the ring when the loss occurred. Lossage can come about either by running out of notification descriptors or by running out of space in the pipe ring. Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
@ -120,6 +120,9 @@ static void consumer(int fd)
|
||||
(n.n.info & WATCH_INFO_ID) >>
|
||||
WATCH_INFO_ID__SHIFT);
|
||||
break;
|
||||
case WATCH_META_LOSS_NOTIFICATION:
|
||||
printf("-- LOSS --\n");
|
||||
break;
|
||||
default:
|
||||
printf("other meta record\n");
|
||||
break;
|
||||
|
Reference in New Issue
Block a user