]> git.lyx.org Git - features.git/commitdiff
lyxpaperview - fix redirection
authorPavel Sanda <sanda@lyx.org>
Fri, 24 Feb 2023 19:44:37 +0000 (20:44 +0100)
committerPavel Sanda <sanda@lyx.org>
Fri, 24 Feb 2023 19:44:37 +0000 (20:44 +0100)
Any time pdfviewer process write anything to stderr it's killed,
most probably due to not existing pipe to proper stderr file descriptor.
/dev/null redirection fixes the issue.

lib/scripts/lyxpaperview.py

index 19d9955156a3f4ffb5f7dc9bda6340daf34103c1..32f83ead3b90d3f5c1060755006653ca4451ed1b 100755 (executable)
@@ -143,7 +143,7 @@ def main(argv):
     if len(cmdline) == 1:
         subprocess.call([viewer, result])
     elif len(cmdline) == 2:
-        subprocess.Popen([cmdline[0], "-" + cmdline[1] , result])
+        subprocess.Popen([cmdline[0], "-" + cmdline[1] , result], stderr=subprocess.DEVNULL, stdout=subprocess.DEVNULL)
     
     exit(0)