From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10872d,d4c1f7c0fe672a4 X-Google-Attributes: gid10872d,public X-Google-Thread: 111731,d4c1f7c0fe672a4 X-Google-Attributes: gid111731,public X-Google-Thread: fcda7,d4c1f7c0fe672a4 X-Google-Attributes: gidfcda7,public X-Google-Thread: 1164f8,d4c1f7c0fe672a4 X-Google-Attributes: gid1164f8,public X-Google-Thread: 1020c6,d4c1f7c0fe672a4 X-Google-Attributes: gid1020c6,public X-Google-Thread: 1070f0,d4c1f7c0fe672a4 X-Google-Attributes: gid1070f0,public From: damercer@mmm.com (Dan A. Mercer) Subject: Re: Different UNIX pro's and con's. Date: 1998/09/23 Message-ID: <6ubd52$rvi$3@sulu.mmm.com>#1/1 X-Deja-AN: 394075041 References: <6u9p11$2ns$1@Venus.mcs.net> Organization: 3M - St. Paul, MN 55144-1000 US Followup-To: comp.unix.advocacy,comp.unix.admin,comp.sys.hp.hpux,comp.sys.sgi.admin,comp.sys.sun.admin,comp.sys.dec Newsgroups: comp.unix.advocacy,comp.unix.admin,comp.sys.hp.hpux,comp.sys.sgi.admin,comp.sys.sun.admin,comp.sys.dec Leslie Mikesell (les@MCS.COM) wrote: : In article , : Bill Vermillion wrote: : >>> : >>>/etc/rc2.d/S05RMTMPFILES doesn't do anything useful if /tmp is a mount point. : > : >>Running a script that blindly does an rm -rf /tmp/* is a lot less : >>damaging than rebooting the entire system. : > : >About 1990 or so, there was one of the SysV.3's on iNTEL that had : >a broken bourne shell. That,in addition to a poorly written : >script, that changed to the directory and then rm -r *'ed the files, : >caused total wipeout on more than one machine. : > : >The shell is supposed to fail and exit if something goes wrong. : >However this implementation - as I recall it - would continue : >to the next line even with the prior "cd" failed. The : >program then rm -r *'ed the entire root directory. Such an : >interesting way to start off your Monday. : Blame posix for re-defining the way the shell should handle : failed cd's in non-interactive mode. The scripts were correct : when written. The shell just became posixly correct - they : all work that way now and you have to write "cd somewhere || exit". : >That was discovered and fixed within a month or so, but too late : >help some people. It was an automatic cleanup script distributed : >with the OS. It's bring back the old TRUST NOTHING/NO-ONE rule. : Especially standards committees... : Les Mikesell : les@mcs.com cd was the only command with that behavior (exitting on failure). Which meant that you had to code around it, which was a major pain. But it does point out that there is no such thing as a truly portable shell. /bin/sh on HP-UX 9 will take you to a shell (Bourne) which error exits, while /bin/sh on HP-UX 10.20 will take you to one (POSIX) which won't. -- Dan Mercer Reply To: damercer@mmm.com Opinions expressed herein are my own and may not represent those of my employer.