aboutsummaryrefslogtreecommitdiff
path: root/marsond.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-05-06 15:07:32 -0400
committerB. Watson <urchlay@slackware.uk>2025-05-06 15:07:32 -0400
commitf0377a641080105502bcd77d059ec698c25f8769 (patch)
treed2034a48b3d085b65650ae5621f40df1a2e10a32 /marsond.c
parent03664eefad6bdfc0e420b33800ff245edb5c2242 (diff)
downloadmarsond-f0377a641080105502bcd77d059ec698c25f8769.tar.gz
add multiple instance warning if the device is busy.
Diffstat (limited to 'marsond.c')
-rw-r--r--marsond.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/marsond.c b/marsond.c
index f872baf..b94883b 100644
--- a/marsond.c
+++ b/marsond.c
@@ -235,6 +235,8 @@ int main(int argc, char **argv) {
if(ioctl(infd, EVIOCGRAB, 1) >= 0) {
debug("grabbed %s", keyboard_dev);
} else {
+ if(errno == EBUSY)
+ warn("is an instance of %s already running?", self);
die("failed to grab %s: %s", keyboard_dev, strerror(errno));
}
@@ -272,7 +274,6 @@ int main(int argc, char **argv) {
die("UI_DEV_CREATE failed: %s", strerror(errno));
}
-
/* this must be done while still running as root... */
if(foreground) {
lock_memory();