Hi all!
I am running into a strange problem. I create a pipe with mkfifo() call and
when I try to open it with fopen() or open(), my process gets hange on reply
state waiting for pipe process to respond. What give?
Note: In the dubugger I am seing the same thing. Using QNX 6.1A
Here is the code I use.
**
// 1. Setup the PIPE for download base on the path and name file from
CALIB_DOA_PARMS
strcpy( cPath, &(m_sCalibDOAParms.cPathName[0]) );
strcat( cPath , &(m_sCalibDOAParms.cFileName[0]) );
if( mkfifo( cPath, S_IRUSR|S_IWOTH|S_IROTH|S_IWUSR ) == -1 ) // Give
permission to owner to read and other write
{
printf(“CDOADownload::Run()->Error creating pipe: %d\n”, errno);
exit( EXIT_FAILURE ); // we getting out since we couldn’t open the pipe
file
}
// 2. Send a message back to SW telling them we are ready to receive
//SendSWReadyMsg( fw_true );
// 3. Setup timeout timer
m_pTimerSignal = new CSignalTimer( SignalHandler, SIGRTMIN,
(DOA_SIG_CODE1) );
//m_pTimerSignal->startTimer(0, 0, 30, 0 , CLOCK_REALTIME); // Thirdy
seconds
// 4. Open the pipe for reading
filedesc = open( cPath, O_RDONLY );
if ( filedesc == -1 )
{
printf(“CDOADownload::Run()->Error openning pipe file: %d\n”, errno);
m_pTimerSignal->stopTimer();
exit( EXIT_FAILURE ); // we getting out since we couldn’t open the pipe
file
}
printf(“openning pipe was good\n”);
**
Any help or insight would be appreciated!!
Cheers and Thanks!
Stephane Grenier
Lead Firmware Engineer
Excalibur Systems Limited
Electronic Warfare Simulation & Training
Tel: +1 613 591 6000 x207
Fax: +1 613 591 6001
mailto:sgrenier@excalibur-idt.com