thenorm
Posts: 11
Joined: Mon Feb 24, 2014 2:05 am

problem with named pipe

Sat Jun 17, 2017 1:40 am

This returns -1 although it reads the file correctly.

Code: Select all

 
int rx_length = read(our_input_fifo_filestream, (void*) rx_buffer, 255);
printf("rx_length: %i %s\n", rx_length, rx_buffer);

User avatar
PeterO
Posts: 5152
Joined: Sun Jul 22, 2012 4:14 pm

Re: problem with named pipe

Sat Jun 17, 2017 6:08 am

Is errno being set ?

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Return to “Troubleshooting”