Implementation exec-alike function #30

開放中
建立於 2018-07-29 13:57:36 +02:00likoski · 5 comment
擁有者

Aer misses some kind of exec() or system(). It might be very useful, especially on embedded devices to interact with system and other software. I think we should implements it before 1.0.

Aer misses some kind of exec() or system(). It might be very useful, especially on embedded devices to interact with system and other software. I think we should implements it before 1.0.
likoski 加入了
enhancement
idea
標籤 2018-07-29 13:57:36 +02:00
擁有者

Generally speaking, I think this is good idea.

int exec(string $cmd, [string &$output]);

First argument contains command to execute, second parameter will contains output from command execution if passed by reference.

Function returns -1 if any error ocurred, or command return value.

Some other ideas?

Generally speaking, I think this is good idea. int exec(string $cmd, [string &$output]); First argument contains command to execute, second parameter will contains output from command execution if passed by reference. Function returns -1 if any error ocurred, or command return value. Some other ideas?
普通成員

Should we get also a potential error reason ? (like from errno for example)

Should we get also a potential error reason ? (like from errno for example)
擁有者

What kind of error do we expect? If application launched throw error it should be saved in $output and its return code should be returned by exec() function. Do we need something more?

What kind of error do we expect? If application launched throw error it should be saved in $output and its return code should be returned by exec() function. Do we need something more?
普通成員

All exec* sets errno internally, was just wondering if we should return the string error as third parameter (optional).

Not forcing anything here, it is good as is too.

All exec* sets errno internally, was just wondering if we should return the string error as third parameter (optional). Not forcing anything here, it is good as is too.
擁有者

This is true. I just wonder in which case it could be useful, because actually I don't find a reason why it might fail, except when exec() would be disabled.

This is true. I just wonder in which case it could be useful, because actually I don't find a reason why it might fail, except when exec() would be disabled.
登入 才能加入這對話。
未選擇里程碑
沒有負責人
3 參與者
通知
截止日期
截止日期無效或超出範圍,請使用「yyyy-mm-dd」的格式。

未設定截止日期。

先決條件

未設定先決條件。

參考: aerscript/Aer#30
No description provided.