If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
On windows, I'm trying to simulate a Linux named pipe. But instead of blocking on the read from an empty file, the application is saturating one core of the CPU furiously reading NULL from the empty file (drive light lights up brightly too). I determined this with gdb. My research has not revealed how to set the file read mode to blocking. I'd rather not use sockets because of the need to determine a safe port number.
As from my former experience with a big software project we too chose Named pipes at first. As it turned out to be present on multiple platforms (Windows, Unix, linux). However later on we discovered that what MS understands as Named Pipes is not what unix Named Pipes are. And as such you end up with code that is loaded with #ifdef... So we had to turn to sockets for communication.
I don't quite get what you mean with not using sockets because of the need of a safe port number. It's not the port that makes you application/communication safe. It's the protocol you design/use to do your communication that makes up for your safety tmho.
Thanks to all. What I meant by "safe port number" was a port number not used by another program. I implemented the program with sockets, the daemon listening for connections on localhost (and blocking! Whew!), opening the connection, reading a single character, then closing the connection. There are, at present, only two messages, "(u)update", and "(s)shutdown", actual data transmission being via a shared database. The user program notifys the daemon, via "update' that it has made a change to the database. "Shutdown" is used by OpenRC to stop the daemon on shutdown. The same code works on Windows and Linux, but I do have the problem of finding a unique port number. I would have preferred reading a string, but that entails allocating a buffer and dealing with possible buffer overflow.
It appears that Windows continually polls, there is no blocking read.
May be handy when you would consider using sockets. This is a list with all TCP ports currently known to be used. Anything below 1024 is reserved and may not be used by you as an application programmer. Anything above 1024 up to 65535 is at your disposal. However you could easily use the same port of another application, providing that application is not on your pc. Nor will ever be.