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

Re: Intent to Rewrite: pwgen



Theodore Tso <tytso@mit.edu>:
> Actually, I've thought about this some more, and I think I can provide
> backwards compatibility at the command-line level, at least for
> scripts.  The trick will be using isatty(0) ala ls to provide
> different defaults dependin on whether it's being run interactively by
> a user or being run as a script.  (Of course, the paranoid script
> writer can use options to force a particular set of behaviours if
> he/she doesn't want to depend on isatty() working correctly.)

This is quite non-intuitive, complicated and strange behavior, please
don't do it.  If nothing else, it makes it harder to debug things by
testing them out on the command line. (Not that I can see how isatty(0)
can be used to test interactive use.)

Inventing a new name for the inompatible version is a much better way
to deal with it.

-- 
Lars Wirzenius <liw@wapit.com>
Architect, Kannel WAP and SMS Gateway project, Wapit Ltd, http://www.kannel.org



Reply to: