Don't die if status FIFO exists

This commit is contained in:
Mahesh Asolkar 2023-10-14 10:41:30 -07:00
parent 7b6e33ff43
commit 6e2dd755d0

View File

@ -318,7 +318,7 @@ void onReady()
bool createFifo(std::string path)
{
auto result = mkfifo(path.c_str(), 0666);
if (result == 0) {
if ((result == 0) || (errno == EEXIST)) {
auto fd = open(path.c_str(), O_CLOEXEC | O_NONBLOCK | O_RDONLY);
if (fd < 0) {
diesys("open status fifo reader");