executing a process with argc=0

后端 未结 3 1902
遥遥无期
遥遥无期 2021-01-11 17:09

Is it possible to execute a process whose argc = 0? I need to execute a program but it is extremely important for its argc to be equal to 0. Is there a way to do that? I tri

3条回答
  •  无人及你
    2021-01-11 17:46

    You can write a program that calls exec directly; that allows you to specify the command-line arguments (including the program name) and lack thereof.

提交回复
热议问题