ClusterLabs / ClusterLabs/libqb
Review code regarding `write` and the like unsuccessful because interrupted by a signal
- Dominant language
- C
- Stars
- 171
- Forks
- 103
- PR merge metrics
- No merged PRs in 30d
Description
E.g., `lib/ringbuffer.c`:
```
748 ssize_t
749 qb_rb_write_to_file(struct qb_ringbuffer_s * rb, int32_t fd)
750 {
[...]
760
761 /*
762 * 1. word_size
763 */
764 result = write(fd, &rb->shared_hdr->word_size, sizeof(uint32_t));
765 if (result != sizeof(uint32_t)) {
766 return -errno;
767 }
768 written_size += result;
```
It should be decided for cases when `errno == EINTR` whether:
- function should retry autonomously
- callsites (if any) still within `libqb` boundary should retry
- user's code should retry (requires this possibility documented
properly at the respective `libqb` functions)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.