[haiku-3rdparty-dev] Re: Any good sample code available for demonstrating various Haiku APIs, etc...?

  • From: Dario Casalinuovo <b.vitruvio@xxxxxxxxx>
  • To: haiku-3rdparty-dev <haiku-3rdparty-dev@xxxxxxxxxxxxx>
  • Date: Mon, 10 Oct 2016 13:44:40 +0200

Hi,


"Shell out"? I'm not sure what you mean here. Shell as in "Terminal", or
... ?



You hit the nail on the head.  Basically be able to execute BASH commands
directly from a Haiku developed app.  I figure it has to be pretty
straightforward, but wasn't sure where to look and thought someone might be
able to point me to the right place.


As general rule keep in mind the Haiku API exists for advanced and/or
specific OS functions (GUI, threading, multimedia). Haiku is also a POSIX
system, so you can rely on this :

http://pubs.opengroup.org/onlinepubs/009695399/functions/system.html

You can easily mix C and C++ code too, so it's at your own option.

Alternatively for a more advanced class but overlooked for your purpose
take a look at the BRoster::Launch function in the bebook.

Bye,
Dario

Other related posts: