about summary refs log tree commit diff
path: root/pkgs/misc/screensavers/vlock
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@viric.name>2017-03-04 09:18:56 +0100
committerLluís Batlle i Rossell <viric@viric.name>2017-03-04 09:19:20 +0100
commit1bd3fa6210743928ca6a92f1d7f14a6d28a66232 (patch)
tree30e17e950d43989ad6fa01920aa5ff27f91f1289 /pkgs/misc/screensavers/vlock
parentda3c0ac19c7b0de26a27c162f61dc2f75c115be1 (diff)
downloadnixlib-1bd3fa6210743928ca6a92f1d7f14a6d28a66232.tar
nixlib-1bd3fa6210743928ca6a92f1d7f14a6d28a66232.tar.gz
nixlib-1bd3fa6210743928ca6a92f1d7f14a6d28a66232.tar.bz2
nixlib-1bd3fa6210743928ca6a92f1d7f14a6d28a66232.tar.lz
nixlib-1bd3fa6210743928ca6a92f1d7f14a6d28a66232.tar.xz
nixlib-1bd3fa6210743928ca6a92f1d7f14a6d28a66232.tar.zst
nixlib-1bd3fa6210743928ca6a92f1d7f14a6d28a66232.zip
vlock: fix ENOPATCH
Thanks, @dtzWill.

Signed-off-by: Lluís Batlle i Rossell <viric@viric.name>
Diffstat (limited to 'pkgs/misc/screensavers/vlock')
-rw-r--r--pkgs/misc/screensavers/vlock/eintr.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/pkgs/misc/screensavers/vlock/eintr.patch b/pkgs/misc/screensavers/vlock/eintr.patch
new file mode 100644
index 000000000000..e33b52228fc3
--- /dev/null
+++ b/pkgs/misc/screensavers/vlock/eintr.patch
@@ -0,0 +1,22 @@
+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.
+
+diff --git a/modules/new.c b/modules/new.c
+index e9b15fb..1f692fd 100644
+--- a/modules/new.c
++++ b/modules/new.c
+@@ -103,7 +103,10 @@ static char *get_console_name(int n)
+  * 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);
+ 
+   return c < 0 ? c : ioctl(consfd, VT_WAITACTIVE, vtno);
+ }