Skip to content

Commit

Permalink
Simplify comment
Browse files Browse the repository at this point in the history
  • Loading branch information
baskerville committed May 22, 2021
1 parent 6e9bbdc commit 20e808c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/subscribe.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,7 @@ void prune_dead_subscribers(void)
subscriber_list_t *sb = subscribe_head;
while (sb != NULL) {
subscriber_list_t *next = sb->next;
// To check if a subscriber's stream is still open and writable call
// write with an empty buffer and check the returned value. If the
// stream is not writable anymore (i.e. it has been closed because the
// process associated to this subscriber no longer exists) then write()
// will return -1.
// Is the subscriber's stream closed?
if (write(fileno(sb->stream), NULL, 0) == -1) {
remove_subscriber(sb);
}
Expand Down

0 comments on commit 20e808c

Please sign in to comment.