How to start a C# executable, which imports a C++ DLL , as a service from a Ubuntu Linux 16.04 C++ program?

Frank Chang frankchang91 at gmail.com
Mon May 16 14:53:11 UTC 2016


I need to start a C# executable, AudioRecorder.exe , as a service from a
Ubuntu Linux 16.04 C++ program . AudioRecorder.exe uses DLLImport for a DLL
named AudioControlLibrary64.dll. As a result, at runtime, AudioRecorder.exe
searches for AudioControlLibrary64.dll in the directories specified by the
Linux environment variable LD_LIBRARY_PATH.

>From my limited exposure to mono-service , I believe mono-service must be
used to start the C# executable, AudioRecorder.exe , as a service from a
Ubuntu Linux 16.04 C++ program.

In order to this programmatically, should I mimic the process for starting
a Linux service to do mono-service ./AudioRecorder.exe by tacking it onto
the end of /etc/init.d/rc.local or running it as a systemd service?
Alternatively, should I avoid reinventing the wheel mimicking the process
for starting a Linux service to do mono-service ./AudioRecorder.exe?

As @0xC0000022L wrote on February 2 2015 at 10:48 A.M, "on Linux the
concept closest to what I am looking for may be programs running as a
daemon. Any program can opt to detach from its parent (by double-forking)
and can also detach from the terminal. This is essentially the gist of a
daemon on Unix in general. It's a background process, but unlike on Windows
there is no special third party involved.". So should I consider double
forking?

Any help is greatly appreciated. If requested , I can do tests requested by
anyone in this newsgroup who wishes to learn more about this topic which is
increasingly important in the enteprise computing applications industry.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20160516/a8431300/attachment.html>


More information about the ubuntu-users mailing list