-
Anonymous
Труба прочитала максимальное количество элементов?
Сообщение
Anonymous »
Я пытался написать простую программу чтения и записи.
читатель:
Код: Выделить всё
#include
#include
#include
#include
#include
#include
#include
#define BUFFSIZE 65600 //921600 // 640*480*3
#define err(mess) { fprintf(stderr,"Error: %s.", mess); exit(1); }
int main()
{
int fd;
ssize_t n;
char buf[BUFFSIZE];
long int i;
if ( (fd = open("./shared/test", O_RDONLY)) < 0)
err("open")
while( (n = read(fd, buf, BUFFSIZE) ) > 0) {
printf("Read (%d): ", n);
for (i=0; i
Подробнее здесь: [url]https://stackoverflow.com/questions/79203606/pipe-read-maximum-number-of-elements[/url]
1732022896
Anonymous
Я пытался написать простую программу чтения и записи.
читатель:
[code]#include
#include
#include
#include
#include
#include
#include
#define BUFFSIZE 65600 //921600 // 640*480*3
#define err(mess) { fprintf(stderr,"Error: %s.", mess); exit(1); }
int main()
{
int fd;
ssize_t n;
char buf[BUFFSIZE];
long int i;
if ( (fd = open("./shared/test", O_RDONLY)) < 0)
err("open")
while( (n = read(fd, buf, BUFFSIZE) ) > 0) {
printf("Read (%d): ", n);
for (i=0; i
Подробнее здесь: [url]https://stackoverflow.com/questions/79203606/pipe-read-maximum-number-of-elements[/url]