解释器文件(interpreter file)
来源:互联网 发布:达观数据 公众号 编辑:程序博客网 时间:2024/05/16 10:20
解释器文件(interpreter file)是以:
#! pathname [ optional-argument ]
作为起始行的文本文件,exec执行的不是解释器文件,而是解释器,即pathname.
简单来说,当以一个解释器文件作参数调用exec时,exec内部首先会得到错误,因为该文件
并非机器可执行,于是把它识别为解释器文件,调用pathname(那应该是execl啊,但书上说
是execlp),并传给它参数:
optional-argument, interpreter-file's path, arguments of the interpreter-file
可能与具体实现有些出入吧,但就此打住好了.
采用解释器文件比在shell中调用解释器减少了开销,在后一种情况,sh首先被执行,然后sh
会对解释器进行fork, exec, wait,而在前一种情况,只是直接执行解释器罢了.
*就算直接从shell中调用shell script,也是fork, exec, wait,不过exec执行的是sh.
- 解释器文件(interpreter file)
- unix学习笔记---解释器文件(interpreter file)
- 解析器文件--Interpreter File
- 解释器文件(Interpreter Files)
- /bin/bash^M: 坏的解释器: 没有那个文件或目录(bad interpreter: No such file or directory)
- /bin/bash^M: 坏的解释器: 没那个文件或目录(bad interpreter: No such file or directory)
- 解释器(Interpreter )模式
- Interpreter解释器模式
- Interpreter 解释器模式
- Interpreter 解释器模式
- 解释器模式(Interpreter)
- uva10033(Interpreter)解释器
- interpreter 解释器模式
- 解释器模式-interpreter
- Interpreter(解释器)
- Interpreter - 解释器模式
- 解释器(Interpreter)
- 解释器模式(Interpreter)
- 数据库范式
- 我的脑袋
- zzuli 1480 欧拉图
- 【gloomyfish】Box zoom on Category Plot in JFreeChart
- google map 离线数据
- 解释器文件(interpreter file)
- Android中有关Handler的使用(二)
- hibernate多对多更新丢失
- 数据库之间复制数据
- nyist 247 spfa算法
- LayoutInflater
- Fixup overflow in_vector 报错 飞思卡尔智能车
- syDataProcess项目
- Android开发之系统信息——获取Android手机中SD卡内存信息