2017-03-04 09:18:56 +01:00
|
|
|
In systemd I have seen this error, using it as a service:
|
|
|
|
|
|
|
|
vlock-start[14567]: vlock-new: could not activate new terminal: Interrupted system call
|
|
|
|
|
|
|
|
I think this should fix that.
|
|
|
|
|
2017-03-11 09:21:17 +01:00
|
|
|
Also on github: https://github.com/viric/vlock/commit/781a26087f83c7247601b6f82f784cca9266694e
|
|
|
|
|
2017-03-04 09:18:56 +01:00
|
|
|
diff --git a/modules/new.c b/modules/new.c
|
2017-03-11 09:21:17 +01:00
|
|
|
index e9b15fb..7aed640 100644
|
2017-03-04 09:18:56 +01:00
|
|
|
--- a/modules/new.c
|
|
|
|
+++ b/modules/new.c
|
2017-03-11 09:21:17 +01:00
|
|
|
@@ -103,9 +103,19 @@ static char *get_console_name(int n)
|
2017-03-04 09:18:56 +01:00
|
|
|
* file descriptor. */
|
|
|
|
static int activate_console(int consfd, int vtno)
|
|
|
|
{
|
|
|
|
- int c = ioctl(consfd, VT_ACTIVATE, vtno);
|
|
|
|
+ int c;
|
|
|
|
+ do {
|
|
|
|
+ c = ioctl(consfd, VT_ACTIVATE, vtno);
|
|
|
|
+ } while(c != 0 && errno == EINTR);
|
|
|
|
|
2017-03-11 09:21:17 +01:00
|
|
|
- return c < 0 ? c : ioctl(consfd, VT_WAITACTIVE, vtno);
|
|
|
|
+ if (c < 0)
|
|
|
|
+ return c;
|
|
|
|
+
|
|
|
|
+ do {
|
|
|
|
+ c = ioctl(consfd, VT_WAITACTIVE, vtno);
|
|
|
|
+ } while(c != 0 && errno == EINTR);
|
|
|
|
+
|
|
|
|
+ return c;
|
2017-03-04 09:18:56 +01:00
|
|
|
}
|
2017-03-11 09:21:17 +01:00
|
|
|
|
|
|
|
struct new_console_context {
|