diff options
author | Lluís Batlle i Rossell <viric@viric.name> | 2017-03-11 09:21:17 +0100 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@viric.name> | 2017-03-11 10:00:06 +0100 |
commit | a2737b1fdfc5e31285c709c444410e9696226f35 (patch) | |
tree | b810f07a829bf366de49acb950e24a6c0063d7ec /pkgs/misc/screensavers/vlock | |
parent | a5f4e22289229a5f6b7341d17c45db98be84d479 (diff) |
vlock: improve eintr patch
Diffstat (limited to 'pkgs/misc/screensavers/vlock')
-rw-r--r-- | pkgs/misc/screensavers/vlock/eintr.patch | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/pkgs/misc/screensavers/vlock/eintr.patch b/pkgs/misc/screensavers/vlock/eintr.patch index e33b52228fc3..64f432434324 100644 --- a/pkgs/misc/screensavers/vlock/eintr.patch +++ b/pkgs/misc/screensavers/vlock/eintr.patch @@ -4,11 +4,13 @@ vlock-start[14567]: vlock-new: could not activate new terminal: Interrupted syst I think this should fix that. +Also on github: https://github.com/viric/vlock/commit/781a26087f83c7247601b6f82f784cca9266694e + diff --git a/modules/new.c b/modules/new.c -index e9b15fb..1f692fd 100644 +index e9b15fb..7aed640 100644 --- a/modules/new.c +++ b/modules/new.c -@@ -103,7 +103,10 @@ static char *get_console_name(int n) +@@ -103,9 +103,19 @@ static char *get_console_name(int n) * file descriptor. */ static int activate_console(int consfd, int vtno) { @@ -18,5 +20,15 @@ index e9b15fb..1f692fd 100644 + c = ioctl(consfd, VT_ACTIVATE, vtno); + } while(c != 0 && errno == EINTR); - return c < 0 ? c : ioctl(consfd, VT_WAITACTIVE, vtno); +- 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; } + + struct new_console_context { |