This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/13712] Add Type Cast to Main and Exec Calls


http://sourceware.org/bugzilla/show_bug.cgi?id=13712

--- Comment #1 from oiaohm at gmail dot com 2012-02-20 23:38:51 UTC ---
I have come up with a worse/better example of problem.

File -rf exists in a directory as first file. You do a rm -i * on that
directory everything bar -rf gets deleted without asking you a question once.

rm saw.  rm -i -rf <list of file>  Yes -rf overrides -i so delete everything
without telling the user because that is what force is tell it.  Worse r is
telling it to delete every directory in the * list as well.  Something person
shell was never telling rm todo.

Really this can of worms is kinda huge.  Anything you do command * on shell
that can take a directive might not do what you are intending.

How to fix this is the problem.

Reason why this problem exists. The "int main(int argc, char *argv[])" was
designed before shells got wildcards when users had to fill everything in.

If you were designing with the presume that the argv data might be filled in
with wildcards you need types.  So the applications know the difference between
user instructions.  Not like the -- solution everywhere will work

gcc *.c -o program is a valid call.

Shells would either need a huge rule set that most likely will be wrong.  Or we
provide some structure here.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]