|
Hi Markus,
Hmm, this implies that ioctl(fd,FIONBIO) is failing. Try replacing it with this, which should be equivalent:
fcntl (fd, F_SETFL, O_NONBLOCK)
A different approach that would eliminate the need to do either of these would be to perform the open() in nonblocking mode in the first place:
if (!blocking)
mode |= O_NONBLOCK;
fd = open(szName,mode);
The only reason for all this nonblocking effort in the first place is just in case the lx200xed gets way ahead of XEphem's ability to show the marker, it won't cause lx200xed to hang and potentially not track a moving target reliably. A long shot to be sure, so commening out the die() is not such a bad approach in practice!
Elwood |