Terminals do not inherit file descriptors
Submitted by Christian Marillat
Description
Hi,
- This simple script called test
#!/bin/sh
set -e
XTERM=$1
3<&0 $XTERM -x sh -c "sensible-pager <&3"
- Using this script like:
./test gnome-terminal < /etc/motd
Doesn't work at all. A strace show a lot of "Bad file descriptor" when sh is try to load /etc/motd
Resolution: RESOLVED FIXED