[fpc-devel] serial under linux, SerOpen blocks

Henry Vermaak henry.vermaak at gmail.com
Thu Aug 18 11:51:32 CEST 2011


On 18/08/11 10:34, Armin Diehl wrote:
> Hi Peter,
>
> that is the same as in the standard serial.pp:
>
> Result := fpopen(DeviceName, O_RDWR or O_NOCTTY);
>
> and this fpopen will block as long as minicom is not started on that
> device.

Try to add O_NONBLOCK to the flags with fpopen.  Then set CLOCAL like 
Peter suggested.  Then disable O_NONBLOCK again with fcntl if you want 
blocking I/O back.

Henry



More information about the fpc-devel mailing list