|
|
Re: return value from PPS file read() incorrect
|
|
06/14/2011 1:59 PM
post86606
|
Re: return value from PPS file read() incorrect
Code:
int fd;
int size_read;
char buffer[8];
/* Open a file for input */
fd = open("/pps/ppsfile?wait", O_RDONLY | O_LARGEFILE, 0666);
while (1) {
size_read = read(fd, buffer, 5);
printf("sizeread %d \n",size_read);
}
/* Close the file */
close(fd);
PPS file:
@ppsfile
attr::01234
Execution results:
sizeread 21
|
|
|
|
|