[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pwd with safety belts removed

From: Dan Jacobson
Subject: Re: pwd with safety belts removed
Date: 21 May 2002 03:10:38 +0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

Dan> Gentlemen, let's look at an average pwd error message,
Dan> $ /bin/pwd preposterous_word
Dan> /bin/pwd: ignoring non-option arguments
Dan> /tmp

Dan> Now let's try, you guessed it, bash:
Dan> $ pwd preposterous_word
Dan> /tmp

Ts'o in Risks Digest 22.07 says
T> In addition, the reason why people get into trouble when trying to run
T> "killall -HUP inetd" on a Solaris machine is because the Solaris version
T> doesn't check the arguments it was passed; a well designed and robust
T> program should check the validity of its arguments, and fail if they are not
T> what was expected --- and this includes the presence of arguments when none
T> are supported.

like pwd or cd

$ cd .. phony_arguments1 2 3 4

which not only give no warnings, but also a "success" return code.
Ok, but you could at least print warnings.
http://jidanni.org/ Taiwan(04)25854780

reply via email to

[Prev in Thread] Current Thread [Next in Thread]