uterm: vt: avoid blocking SIGUSR1/2 twice

eloop does already block signals that we register callbacks for so we do
not have to block it manually here.
Note that the signal-handlers are registered _before_ doing the backend
initialization so we also avoid the previously fixed race-condition.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-11-05 14:52:25 +01:00
parent 614fe3dc81
commit a9b12b22ac

View File

@ -316,7 +316,6 @@ static int real_open(struct uterm_vt *vt, const char *vt_for_seat0)
struct vt_mode mode;
struct vt_stat vts;
int ret;
sigset_t mask;
log_debug("open vt %p", vt);
@ -361,16 +360,6 @@ static int real_open(struct uterm_vt *vt, const char *vt_for_seat0)
goto err_reset;
}
sigemptyset(&mask);
sigaddset(&mask, SIGUSR1);
sigaddset(&mask, SIGUSR2);
ret = sigprocmask(SIG_BLOCK, &mask, NULL);
if (ret) {
log_error("cannot block SIGUSR1/2 (%d): %m", errno);
ret = -EFAULT;
goto err_text;
}
memset(&mode, 0, sizeof(mode));
mode.mode = VT_PROCESS;
mode.acqsig = SIGUSR1;