[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
howto /dev/stderr [from python]
From: |
Jan Nieuwenhuizen |
Subject: |
howto /dev/stderr [from python] |
Date: |
Fri, 22 Aug 2003 20:07:55 +0200 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) |
Hi,
LilyPond uses a python script that redirects to stderr in os.system ()
This breaks if /bin/sh happens not to be bash (why would anyone want
not to have bash there?), *and* the /dev directory does not exist.
$ ls -l /bin/sh /bin/bash
-rwxr-xr-x+ 1 root Geen 531968 Mar 13 10:29 /bin/bash
-rwxr-xr-x 1 root Geen 69632 Aug 22 19:48 /bin/sh
$ python -c "import os; os.system ('echo fubar >/dev/stderr')" cannot
create /dev/stderr: directory nonexistent
$ mv /bin/sh /bin/sh-fubar; cp /bin/bash /bin/sh
mv: preserving times for `/bin/sh-fubar': No such file or directory
mv: preserving ownership for `/bin/sh-fubar': No such file or directory
mv: cannot unlink `/bin/sh': No such file or directory
mv: cannot remove `/bin/sh': No such file or directory
$ ls -l /bin/sh /bin/bash
-rwxr-xr-x+ 1 root Geen 531968 Mar 13 10:29 /bin/bash
-rwxr-xr-x 1 root Geen 531968 Aug 22 19:51 /bin/sh
$ python -c "import os; os.system ('echo fubar >/dev/stderr')"
fubar
So, depending on what /bin/sh is, it may or may not work. We are
telling users not to install ash, but what is the right solution for
this?
Jan.
--
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- howto /dev/stderr [from python],
Jan Nieuwenhuizen <=