diff --git a/profiles/input/suspend-dummy.c b/profiles/input/suspend-dummy.c
index 33b790a..43384c0 100644
--- a/profiles/input/suspend-dummy.c
+++ b/profiles/input/suspend-dummy.c
if (mkfifo(HOG_SUSPEND_FIFO, S_IRWXU) < 0) {
int err = -errno;
+
+ if (err == -EEXIST) {
+ DBG("FIFO (%s) already exists, trying to remove",
+ HOG_SUSPEND_FIFO);
+
+ /* remove pre-existing FIFO and retry */
+ if (remove(HOG_SUSPEND_FIFO) < 0) {
+ err = -errno;
+ error("Failed to remove FIFO (%s): %s (%d)",
+ HOG_SUSPEND_FIFO, strerror(-err), -err);
+ return err;
+ }
+
+ return suspend_init(suspend, resume);
+ }
+
error("Can't create FIFO (%s): %s (%d)", HOG_SUSPEND_FIFO,
strerror(-err), -err);
return err;