Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!pacbell.com!ucsd!ucbvax!CURTA.CC.COLUMBIA.EDU!alan From: alan@CURTA.CC.COLUMBIA.EDU (Alan Crosswell) Newsgroups: comp.protocols.iso.dev-environ Subject: Re: Log-files in ISODE 6.8 Message-ID: Date: 23 Apr 91 14:28:39 GMT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 51 The way the ISODE servers work is that if their stdout is non-existent, they assume that they are running as background daemons and write to their configured log file. If they have a stdout, they assume they are running from the command line (e.g. because they are being debugged) and they write to stdout/stderr and to log files in the connected directory. Some genius at Sun decided that they should change the way /etc/rc* scripts work. Back in the good old days(:-) it used to be that they had no controlling terminal and programs that wanted one had to explicitly redirect output (e.g. to /dev/console). So, you would see things like: if [-f /etc/foo ]; then echo -n 'starting foo server: ' >/dev/console /etc/foo >/dev/console fi if [ -f /usr/local/etc/tsapd ]; then echo -n 'starting ISODE: ' >/dev/console /usr/local/etc/tsapd & echo -n 'tsapd ' >/dev/console fi This causes stdout to go to /dev/console and also makes /dev/console the controlling tty for the /etc/foo process. And the tsapd runs without a controlling tty, figures this out, and writes to logdir. Somewhere along the line, this behavior changed such that all the /etc/rc scripts run with a controlling tty of /dev/console and stdin/out/err redirected there. So now you see scripts like this: if [-f /etc/foo ]; then echo -n 'starting foo server: ' /etc/foo fi if [ -f /usr/local/etc/tsapd ]; then echo -n 'starting ISODE: ' /usr/local/etc/tsapd >/dev/null 2>&1 & echo -n 'tsapd ' fi In other words, to get the "correct" behavior in an /etc/rc script you have to explicitly redirect stdout/stderr to /dev/null. We reported this to Sun as a bug and were rebuffed. It was certainly an undocumented change which broke many of our programs that relied on not having a controlling tty. /a