Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 34 lines 902 B view raw
1In systemd I have seen this error, using it as a service: 2 3vlock-start[14567]: vlock-new: could not activate new terminal: Interrupted system call 4 5I think this should fix that. 6 7Also on github: https://github.com/viric/vlock/commit/781a26087f83c7247601b6f82f784cca9266694e 8 9diff --git a/modules/new.c b/modules/new.c 10index e9b15fb..7aed640 100644 11--- a/modules/new.c 12+++ b/modules/new.c 13@@ -103,9 +103,19 @@ static char *get_console_name(int n) 14 * file descriptor. */ 15 static int activate_console(int consfd, int vtno) 16 { 17- int c = ioctl(consfd, VT_ACTIVATE, vtno); 18+ int c; 19+ do { 20+ c = ioctl(consfd, VT_ACTIVATE, vtno); 21+ } while(c != 0 && errno == EINTR); 22 23- return c < 0 ? c : ioctl(consfd, VT_WAITACTIVE, vtno); 24+ if (c < 0) 25+ return c; 26+ 27+ do { 28+ c = ioctl(consfd, VT_WAITACTIVE, vtno); 29+ } while(c != 0 && errno == EINTR); 30+ 31+ return c; 32 } 33 34 struct new_console_context {