C++ Linux named pipe hanging on open() with O_WRONLY
This is my simple code that opens a named pipe, writes a string to it, and then closes the pipe. The pipe is created in a another function, as mentioned below. char * ipcnm = "./jobqueue"; std::cout << "opening job queue" << std::endl; //ensure the jobqueue is opened if ((jobq = open(ipcnm, O_WRONLY)) < 0) { perror("open"); exit(-1); } std::cout << "queue opened" << std::endl; // record the number of bytes written to the queue size_t written = write(jobq, ptr, size*nmemb); // close fifo if (close(jobq) < 0) { perror("close"); exit(-1); } // need to report to other agents the size of the job