本文介绍了执行 argc=0 的进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以执行 argc = 0 的进程?我需要执行一个程序,但它的 argc 等于 0 非常重要.有没有办法做到这一点?我试图在命令行中放入 2^32 个参数,使其看起来好像 argc = 0 但参数数量有最大限制.

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 tried to put 2^32 arguments in the command line so that it appears as if argc = 0 but there is a maximum limit to the number of arguments.

推荐答案

您可以编写一个调用 直接执行;允许您指定命令行参数(包括程序名称)和缺少参数.

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.

这篇关于执行 argc=0 的进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-13 00:00