Re: Mass bugfiling potential: 'rules' with space
On Fri, Oct 11, 2002 at 10:08:34AM -0400, Nathan Hawkins wrote:
> 2. Survey a handful of other Unices. I'd suggest checking OpenBSD,
> Solaris, AIX, HPUX, etc. as many as can be arranged. (I know there are
> people on this list with access to some of these systems.) It would be
> useful to know if Linux or NetBSD behaviour is common. And helpful in
> determining the right thing to do about it.
With '#!/home/colinw/test-argv -f ' in ./t.sh, and modifying your
test-argv in the obvious way to avoid segfaulting when elements of argv
are null:
AIX (4.3, 5.1):
$ ./t.sh
argv[0]:test-argv,argv[1]:-f ,argv[2]:./t.sh,argv[3]:;
FreeBSD (3.4-RELEASE, 4.2-RELEASE, 5.0-CURRENT):
$ ./t.sh
argv[0]:/home/colinw/test-argv,argv[1]:-f,argv[2]:./t.sh,argv[3]:(null);
HP-UX (10.20):
$ ./t.sh
argv[0]:./t.sh,argv[1]:-f,argv[2]:./t.sh,argv[3]:(null);
Linux (2.2.5):
$ ./t.sh
argv[0]:test-argv,argv[1]:-f,argv[2]:./t.sh,argv[3]:(null);
Linux (2.4.18):
$ ./t.sh
argv[0]:/home/colinw/test-argv,argv[1]:-f,argv[2]:./t.sh,argv[3]:(null);
OpenBSD (2.8, 2.9):
$ ./t.sh
argv[0]:/home/colinw/test-argv,argv[1]:-f ,argv[2]:./t.sh,argv[3]:(null);
Solaris (2.6, 2.7, 2.9):
$ ./t.sh
argv[0]:/home/colinw/test-argv,argv[1]:-f,argv[2]:./t.sh,argv[3]:(null);
Tru64 (T4.0):
$ ./t.sh
argv[0]:test-argv,argv[1]:-f ,argv[2]:./t.sh,argv[3]:(null);
UnixWare (7.1.1):
$ ./t.sh
argv[0]:/home/colinw/test-argv,argv[1]:-f,argv[2]:./t.sh,argv[3]:(null);
I can check other cases if that would be useful.
> It'd be nice to able to say: Everything but NetBSD does it this way,
> rather than, this problem breaks some files from Linux.
At least AIX, OpenBSD, and Tru64 agree with NetBSD, so using trailing
spaces is clearly not portable.
--
Colin Watson [cjwatson@flatline.org.uk]
Reply to: