On 04.07.2014 02:14, Gabriela Gibson wrote:
> I also looked at the C90 standard because I thought maybe they defined
> argv as immutable (since it should not complain about being const with
> this type of main declaration I think) and this is what is says: 
>
> "The parameters argc and argv and the strings pointed to by the argv
> array shall 
>  be modifiable by the program, and retain their last-stored values
> between program        
>  startup and program termination." 
>
> This seems a bit ambiguous --- so it's changeable, but between start
> up and termination they retain their value?

Read your quote again. "they retain the *last-stored* value".

> So, that is maybe why the kernel's info isn't changing but the args
> can be modified?

I must point out that "the" (Linux?) kernel does not have to comply with
the C language standard. The info that the kernel stores may have
exactly nothing to do with the argument array that's in the process
memory space.

-- Brane

-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. br...@wandisco.com

Reply via email to