Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 (Tek) 9/28/84 based on 9/17/84; site tekcrl.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!vax135!cornell!uw-beaver!tektronix!tekcrl!terryl From: terryl@tekcrl.UUCP () Newsgroups: net.bugs.4bsd Subject: /bin/sh might not work for complex commands with background processes Message-ID: <238@tekcrl.UUCP> Date: Wed, 28-Aug-85 00:24:53 EDT Article-I.D.: tekcrl.238 Posted: Wed Aug 28 00:24:53 1985 Date-Received: Fri, 30-Aug-85 08:05:30 EDT Lines: 54 I ran across a peculiar problem the other day that took a day and a half to track down. All of a sudden, /etc/rlogind would not get started up by /etc/rc when the system was rebooted. Below is an excerpt of our /etc/rc: ( /etc/cron; /etc/doroutes if [ -f /etc/arp.hosts ]; then /etc/arp -f /etc/arp.hosts & fi if [ -f /etc/ftpd ]; then /etc/ftpd & fi if [ -f /etc/rlogind ]; then /etc/rlogind & fi if [ -f /etc/telnetd ]; then /etc/telnetd & fi if [ -f /etc/rexecd ]; then /etc/rexecd & fi ....... ) & Through some simple experimentation by moving around the startups of daemons in our rc, I tracked it down to the second daemon getting started after the /etc/arp command. What had happened is that a bogus entry in /etc/arp.hosts was causing /etc/arp to exit with a non-zero exit status. A little more debugging with a special version of test ( [ in the above examples) showed that test was indeed returning a real zero exit status, but /etc/rlogind did not show up in a ps. With a little more debugging I found out that /etc/arp was returning a non-zero exit status right after test returned a zero exit status, and it was the non-zero exit status of /etc/arp that was used to determine if /etc/rlogind should be run or not. I do believe that this is a bona-fide /bin/sh bug, but I really don't want to track it down (I cry every time I have to look at the sources....(-: ). Also note that all of the daemons are started up in a parenthesized list that is run in the background, so I don't know if this has anything to do with it. Comments, anyone???? Bug fixes, anyone????? Terry Laskodi of Tektronix "There is no conflict between capitalism and spiritualism."