在bash和linux内核的家当行限制 [英] Shebang line limit in bash and linux kernel

查看:140
本文介绍了在bash和linux内核的家当行限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图执行由zc.buildout自动生成的Python脚本,所以我没有对它们的控制。我的问题是shebang行(#!)是不是庆典(80个字符的限制)或直接执行(有些Linux内核不变,我不知道)太长。

这是一个示例脚本来帮助你重现我的问题:

<$p$p><$c$c>#!/././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././bin/bash
回声霍拉!

如何才能bash或配置为允许更大的家当行内核?


解决方案

它在内核受限于 BINPRM_BUF_SIZE 设置在include / linux / binfmts.h

I'm trying to execute python scripts automatically generated by zc.buildout so I don't have control over them. My problem is that the shebang line (#!) is too long for either bash (80 character limit) or direct execution (some Linux kernel constant I don't know).

This is an example script to help you reproduce my problem:

#!/././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././bin/bash
echo Hola!

How can be bash or the kernel configured to allow for bigger shebang lines?

解决方案

It's limited in the kernel by BINPRM_BUF_SIZE, set in include/linux/binfmts.h.

这篇关于在bash和linux内核的家当行限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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