Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!star.cs.vu.nl!philip From: philip@cs.vu.nl (Philip Homburg) Newsgroups: comp.os.minix Subject: Re: #! in MM -- take 2 Message-ID: <10095@star.cs.vu.nl> Date: 27 May 91 13:09:54 GMT References: <10050@star.cs.vu.nl> Sender: news@cs.vu.nl Organization: Fac. Wiskunde & Informatica, Vrije Universiteit, Amsterdam Lines: 47 In article klamer@mi.eltn.utwente.nl (Klamer Schutte) writes: %I checked crtso.s (implicit, by testing whether it worked. It did.) %Execve.c is just an implementation. And since i am changing the implementation, %i don't mind changing its produced output (because that was what i was doing). %I haven't checked ps.c, and i am not going to do it. I don't want system call %behaviour to be modelled after some assumptions that a utily program has made, %as long as these assumptions aren't supported by a manual or standard. Ok, there is no exact specification the initial stack layout other than in ps.c or implicit in the v7 manual. But this is not a permit to break existing code and history (look at older or other versions of ps) just because there was no committee to standardize it. It is very easy to change the implementation of Kees to supply alignment without breaking ps. The implementation is left as an exercise for the reader. I am not going to do it because string are NOT aligned. %The reason i wanted the alignment to be saved was that a char * is often used %were a void * is meant. And some people use void * to point to anything. %(See for instance the SunOs 4.1.1 manual page on malloc(), and you understand % what i mean.) %In this way one can let argv[1] point to a double in execve(), and let %main() read this double. This is absolutely ridiculous. Are you really talking about *(double *)argv[1] ? Are you sure that your doubles don't contain zero bytes? How do you exec your programs? a.out \x12\x3\0\4 ? In minix malloc returns a void *. Is the text you are referring to: malloc() returns a pointer to a block of at least size bytes, which is appropriately aligned. This is nothing special, ansi requires the same. But the strings of the arguments are really strings and not doubles, therefor require no alignment. %>Oh, why are public discussions not appropriate for shell scripts, or bugs? % %Hmmmm. Should have missed the shell script. %Bugs should be send. -pedantic searches not IMHO. I thought that #! was to implement some features of executing shell scripts (what do You call script starting with #!). And you call breaking ps pedantic? Philip