Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!mcsun!hp4nl!utrcu1!mi.eltn.utwente.nl!klamer From: klamer@mi.eltn.utwente.nl (Klamer Schutte) Newsgroups: comp.os.minix Subject: Re: #! in MM -- take 2 Message-ID: Date: 27 May 91 08:54:34 GMT References: <10033@star.cs.vu.nl> <10050@star.cs.vu.nl> Sender: news@utrcu1.UUCP Organization: University of Twente, BSC-El Lines: 47 In <10050@star.cs.vu.nl> philip@cs.vu.nl (Philip Homburg) writes: >In article klamer@mi.eltn.utwente.nl (Klamer Schutte) writes: >First of all POSIX doesn't specify bit patterns but the C-functions to access >certain features of the operating system. I can't find an initial stack layout >in IEEE Std 1003.1-1988. But I might have overlooked it. I checked IEEE 1003.1-1986. Didn't mention it either. >mm/exec.c doesn't specify the exec format either, it just copies some data from >the old process' image to the new ones. Why isn't the source of execve.c, >crtso.s, and ps.c enough for you. 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 assumtions aren't supported by a manual or standard. What i did check was the POSIX standard (OK, an old one) for execve(). This one states that the main() function gets a pointer to an array of pointers which point to the data. And my implementation does that... 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 will destroy alignment of the strings pointed by by argv[] and envp[]. >%I must say this kind of bug finding is a good way to get rid of them. >%But must this be on news? Private mail should be appropriate. >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. Klamer -- Klamer Schutte Tel: +31-53-892786 Fax: +31-53-340045 Faculty of electrical engineering -- University of Twente, The Netherlands preferred: klamer@mi.eltn.utwente.nl SMTP: klamer@utelmi01.el.utwente.nl