Maybe in my old age (with possible onset of dementia!) I have forgotton some fundamentals of C and C++ behaviour.
Consider the following [very loose] code please:
int fd = open(“somefile”, O_WRONLY);
errno = EOK;
int l = write(fd, &counts, sizeof(counts));
printf(“errno = %d\n”, errno);
Assume the file opens OK (fd != -1) and that write() returns 7500 (5 x 1500) and not -1.
However, after the apparently successful write, errno is 3 “No such process”. Same occurs if I use fa file descriptor (fopen, fwrite, etc).
How is this? Is errno undefined on a successful file operation?
BTW, using QNX 6.5.0 SP1