How does execve know how many arguments are passed in argv? -


In the C program, the main function knows how many arguments in argv are seen in ARV, it seems unclear to me how syscall Execve knows how many logic passes can help someone understand how execve handles logic?

execve on my close Linux system says: < Blockquote>

argv is an array of logic strings passed in the new program. Envp string array, traditionally form key = value, which are passed as new environment in the new program. Both argv and envp should be terminated by a null pointer. The argument is called vector and the environment, whose main function is when it is defined:

  int main (int argc, char * argv [], char * Envp [])    

I bold the important part. At the end of the list, there should be an empty pointer. Colonel will count the arguments and calculate the count as argc .

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -