可以作为命令行参数传递多少数据? [英] How much data can be passed as command line arguments?

查看:158
本文介绍了可以作为命令行参数传递多少数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Linux下生成进程时,可以作为命令行参数发送多少字节?

How many bytes can be sent as command-line argument when spawning a process under Linux?

推荐答案

gahooa表示一个不错的选择http://www.in-ulm.de/~mascheck/various/ argmax / ,但是如果有一天该页面消失了,这就是问题所在:要找到命令行参数的最大长度,请尝试以下操作之一

gahooa suggests a good article at http://www.in-ulm.de/~mascheck/various/argmax/, but if that page disappears someday, here's the meat of the matter: to find the max length of your command line arguments try one of the following

* command: getconf ARG_MAX
* system call: sysconf(_SC_ARG_MAX)
* system header: ARG_MAX in e.g. <[sys/]limits.h>

这篇关于可以作为命令行参数传递多少数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆