I use a named pipe for communication between a PHP script and a C ++ daemon on Linux. The daemon sits and watches the pipe, processing the commands when the script is called, and generates them. The system is a small embedded device, and the only thing it launches is a web server and a daemon.
Should I delete the named pipe when I close the program, or is it acceptable to leave it in the file system? An embedded device often gets a hard shutdown, so even if I close it correctly when it comes out nicely, in any case it will be left at almost any time. Am I going to end up with unknown data in the pipe, when will I open it, when will the system restart? If so, should I just delete it and redo it every time I reboot, or is it too much?
source
share