opening pps file blocks the process

139 views Asked by At

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?

1

There are 1 answers

0
BTR Naidu On BEST ANSWER

Apparently this was due to not opening all the declared resource files. System process monitoring the launch of your app sees this as a failure and so reports an error after a timeout. When I made sure that all declared resources were opened, the problem was gone.