Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ucbvax!hplabs!felix!zemon From: zemon@felix.UUCP Newsgroups: comp.os.minix Subject: Re: Hard Disk Problem ( and some more bugs ) Message-ID: <2371@felix.UUCP> Date: Mon, 2-Mar-87 16:14:30 EST Article-I.D.: felix.2371 Posted: Mon Mar 2 16:14:30 1987 Date-Received: Tue, 3-Mar-87 23:00:18 EST References: <496@ubu.warwick.UUCP> Sender: root@felix.UUCP Reply-To: zemon@felix.UUCP (Art Zemon) Organization: FileNet Corp., Costa Mesa, CA Lines: 49 In article <496@ubu.warwick.UUCP> arthur@ubu.UUCP (John Vaudin) writes: > >2) If the argument list to a program gets too long the shell complains >that it cannot excecute the program. I understand that exec is meant to >return some error status telling it that the arg list was too big. I guess >this is a kernel problem(?) This is a design limitation. If I remember correctly, there is a buffer in one of the routines in the memory manager called by do_exec() which is large enough to contain the initial stack for a new program. Since the command line and the environment are pushed onto the stack, I am not surprised that you overflowed the buffer. When this happens, the exec() fails. There is a single constant to change in one of the MM's header files and then recompile. That should solve your problem at the expense of a slightly larger MM task. >5) C programs must expicitly flush all buffers before exiting. I don't if >this a V7ism or if it is a bug as I don't have access to a V7 system. This is a designed-in incompatibility with Unix and is mentioned in the appendix for Minix implementors. C programs must either flush all standard I/O buffers or call cleanup() before calling exit(). The reason exit() doesn't call cleanup() like on a Unix system is that most of the utilities don't use standard I/O. Did you ever wonder how AST got most of the utilities down to just a few hundred bytes? You can remove this incompatibility by changing exit() to call cleanup() and then rebuilding libc.a You might want to keep the old libc.a around, though, in case you ever want to write small programs. Let me wind up by telling you that all of my comments are based on reading the book. I'm still waiting for my diskettes. I'm sure no saint when it comes to reading all the documentation before plunging head first into a neat new program. But when all I have is the documentation.... :-) Cheers, -- -- Art Zemon FileNet Corporation Costa Mesa, California ...!hplabs!felix!zemon