summaryrefslogtreecommitdiff
path: root/src/lnx_kbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lnx_kbd.c')
-rw-r--r--src/lnx_kbd.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lnx_kbd.c b/src/lnx_kbd.c
index 811a7d7..c221194 100644
--- a/src/lnx_kbd.c
+++ b/src/lnx_kbd.c
@@ -187,8 +187,17 @@ OpenKeyboard(InputInfoPtr pInfo)
s = xf86SetStrOption(pInfo->options, "Device", NULL);
if (s == NULL) {
+ int rc;
pInfo->fd = xf86Info.consoleFd;
pKbd->isConsole = TRUE;
+
+ rc = tcsetpgrp(pInfo->fd, getpgid(0));
+ if (rc < 0) {
+ xf86IDrvMsg(pInfo, X_ERROR,
+ "failed to set us as foreground pgrp (%s)\n",
+ strerror(errno));
+ }
+
} else {
pInfo->fd = open(s, O_RDONLY | O_NONBLOCK | O_EXCL);
if (pInfo->fd == -1) {