Date: Wed, 12 Feb 2003 15:28:46 -0800 From: Ross Lippert <ripper@eskimo.com> To: freebsd-questions@freebsd.org Subject: devfs and /dev/fd/3 Message-ID: <20030212152846.A21838@eskimo.eskimo.com>
next in thread | raw e-mail | index | archive | help
I just installed freebsd 5.0. One gotcha that got me was in my lpif filter, which used to use a clever set of redirects to send only the outputfile output of gs to stdout while the stdout output of gs was sent to stderr: exec 3>&1 1>&2 /usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=cdj550 \ -sOutputFile=/dev/fd/3 - && exit 0 However, with the new devfs, I seem to be short a file descriptor, namely, fd/3. So I must do /usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=cdj550 \ -sOutputFile=- - && exit 0 Which will work as long as gs doesn't decide to write something to stdout, at which point something bad will come out of my printer. Is there a better way to accomplish the above? -r To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030212152846.A21838>