[Pkg-kbd-devel] Bug#190387: openvt ignores its own syscall errors

Ian Jackson ian at chiark.greenend.org.uk
Wed Aug 13 21:11:07 UTC 2008


reopen 190387
found 190387 1.14.1-4
tags 190387 + patch
thanks

Michael Schutte writes ("Re: Bug#190387: openvt ignores its own syscall errors"):
> I cannot reproduce this old bug with the version of kbd currently in
> unstable.  Can you confirm that it’s gone?

Sorry for the delay replying.  But then after 5 years perhaps there is
no hurry :-).

One can't any longer test for the bug with the recipe I gave for the
reasons explained by Jim Paris: one only gets a problem from my recipe
if one also suffers from #190385, which is now fixed.

However, I have checked the code and the specific calls to dup now
have proper error handling.

While I was there I took the opportunity to give the code in openvt.c
a quick eyeball.  Mostly it looks OK except that there is no message
reported anyway if openvt fails to exec the program you wanted to run.

This patch against 1.14.1-4, which I have just tested, does the trick:

--- src/openvt.c~	2008-08-13 22:00:27.000000000 +0100
+++ src/openvt.c	2008-08-13 22:03:51.000000000 +0100
@@ -294,6 +294,7 @@
          execlp(cmd, def_cmd, NULL);
       else
 	 execvp(cmd, &argv[optind]);
+      perror("openvt: exec failed");
       _exit(127);		/* exec failed */
    }

Regards,
Ian.





More information about the Pkg-kbd-devel mailing list