Implementation exec-alike function #30
ラベル
マイルストーンなし
担当者なし
3 人の参加者
通知
期日
期日は未設定です。
依存関係
依存関係が設定されていません。
リファレンス: aerscript/Aer#30
読み込み中…
新しいイシューから参照
説明はありません。
ブランチ "%!s(<nil>)" の削除
ブランチの削除は恒久的です。 実際に削除されるまでの短い期間、ブランチが存在したままになることもありますが、たいていは元に戻すことはできません。 続行しますか?
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.
Generally speaking, I think this is good idea.
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)
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.
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.