1 Star 0 Fork 4.9K

罗小黑 / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
exec.md 2.13 KB
一键复制 编辑 原始数据 按行查看 历史
wenjun 提交于 2020-09-08 10:08 . add OpenHarmony 1.0 baseline

exec

命令功能

exec命令属于shell内置命令,目前实现最基础的执行用户态程序的功能。

命令格式

exec <executable-file>

参数说明

表 1 参数说明

参数

参数说明

取值范围

executable-file

有效的可执行文件。

N/A

使用指南

该命令当前仅支持执行有效的二进制程序,程序成功执行,默认后台运行,但与Shell共用终端,可能会导致程序打印输出与Shell输出交错显示。

使用实例

举例:

输入exec helloworld。

输出说明

OHOS # exec helloworld
OHOS # hello world!

说明: 可执行文件执行后,先打印“OHOS #”提示符原因:目前Shell “exec”命令执行均为后台执行,结果可能导致提示符提前打印。

1
https://gitee.com/lawguiren/docs.git
git@gitee.com:lawguiren/docs.git
lawguiren
docs
docs
master

搜索帮助