[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] NULL-terminate list of arguments in server-mode
From: |
Larry Jones |
Subject: |
Re: [PATCH] NULL-terminate list of arguments in server-mode |
Date: |
Mon, 1 Oct 2001 16:00:54 -0400 (EDT) |
Derek R. Price writes:
>
> Well, the change doesn't really bother me then, though it probably
> deserves a comment to the effect that we are imitating the ISO standard if
> the change is going to be made. Hopefully that way future code readers
> won't be baffled and perhaps register consistency complaints.
I probably should have mentioned that it's in the ISO C standard
because, as Alexey said, it's traditional, if not well known. In Unix,
the way to execute a new program is with the execve() system call, and
it takes a null-terminated array of pointers to strings. Why the C
runtime library decided to count them and pass the count as well as the
array rather than relying on the null terminator, I do not know.
-Larry Jones
When you're as far ahead of the class as I am, it doesn't take much time.
-- Calvin