I am trying to open a PPS file which blocks my process because the publisher process is not running yet. After much reading in QNX and Blackberry documentation, I am left with asking the experts. My code looks like below:
fd = open("pps/file/path", O_RDONLY | O_NONBLOCK);
if(fd >= 0)
{
fprintf(stdout, "SUCCESS\n");
}
else
{
perror("Error PPS open:");
}
What I want is, the open to return immediately if the publisher is not running yet. What is currently happening is, the open blocks my process until the publisher process associated with the pps file is launched.
Am I missing something here?