1 Star 0 Fork 5.1K

乱雪丶 / docs

forked from OpenHarmony / docs 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
exec.md 2.13 KB
Copy Edit Raw Blame History
wenjun authored 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/Luanxue1999/docs.git
git@gitee.com:Luanxue1999/docs.git
Luanxue1999
docs
docs
master

Search