[fpc-devel] TProcess empty parameter

Michael Van Canneyt michael at freepascal.org
Thu May 7 14:37:22 CEST 2015



On Thu, 7 May 2015, Henry Vermaak wrote:

> On Thu, May 07, 2015 at 01:55:37PM +0200, Michael Van Canneyt wrote:
>> On Thu, 7 May 2015, Henry Vermaak wrote:
>>> On Thu, May 07, 2015 at 12:59:52PM +0200, Michael Van Canneyt wrote:
>>>> if that were the case, argc would not have been introduced, which is
>>>> why I doubt the use of this argument ?
>>>>
>>>> C code that regards nil as the last element of the argv array is just wrong.
>>>
>>> The C standard says that argv[argc] shall be a null pointer.
>>
>> So if argc is 15, there should be no problem to have a Nil at position 5 ?
>
> The standard also says that argv[0] to argv[argc-1] shall contain
> pointers to strings.  NULL is not a pointer to a string, so that would
> be a problem.

Indeed. 
So, in any case, we'll need to adapt TProcess.

Michael.



More information about the fpc-devel mailing list