The execve () man page says argv is a list of string arguments that ends with a null pointer. But why do we need NP? I mean, the number of arguments is stored in argc, so what's the point of the null pointer?
execvedoes not accept argcas a parameter, it manually counts the arguments that you give as argv, to determine itself argc.
execve
argc
argv
This is for compatibility with execl, which takes a variable number of arguments instead of an array argv.
execl
The counter for is argccalculated by searching for this NULL.
Source: https://habr.com/ru/post/1733817/More articles:The problem of adapting MSVC ++ code for C ++ Builder -__ declspec (align (n)) - alignmentMaking mp3 with midi - c #Does anyone have a url shortening T-Sql code? - tsqlImplementing vote_fu in a rails application (or alternatives) - ruby-on-railsbest way to save my stats (ruby) - ruby | fooobar.comExisting type of routine for messaging routine in Delphi? - delphiTeamCity: launch FxCop after build - teamcityFloating-point exception thrown by rand () In C ++ - c ++Tip: creating a simple database-based CMS in PHP - phpIs depreciation really desirable? - algorithmAll Articles