[Mono-list] Deamonize. Running a Mono app. in the background

Jesse Pasichnyk jesse@pasichnyk.net
Tue, 15 Mar 2005 16:24:36 -0700


Are the execv, setuid and setgid methods working?

I wrote some stuff using those, and it did the execv fine, but didn't =
seem
to want to change the identity the application was running under.

The exe had permissions 6755.

Is this not possible since the application is run by the mono =
executable?

Thanks,

Jesse

-----Original Message-----
From: mono-list-admin@lists.ximian.com
[mailto:mono-list-admin@lists.ximian.com] On Behalf Of J=F6rg Rosenkranz
Sent: Tuesday, March 15, 2005 7:24 AM
To: Michael Rasmussen; mono-list@lists.ximian.com
Subject: RE: [Mono-list] Deamonize. Running a Mono app. in the =
background

Hello Michael,

> -----Original Message-----
> From: mono-list-admin@lists.ximian.com=20
> [mailto:mono-list-admin@lists.ximian.com] On Behalf Of=20
> Michael Rasmussen
>=20
> Hi List,
>=20
> How does one run a Mono app. as a deamon?
>=20
> In C/C++ I would do it this way:
>=20
> ...
> /* Fork off the parent process */
> pid =3D fork();

The standard Unix functions are implemented in namespace
Mono.Unix in assembly Mono.Posix, but the fork calls aren't=20
working from managed code.

I have done a C daemon using Embedded Mono to run a
Windows Service implemented in .NET on Linux. I have=20
sent a first proposal to Mono-Devel list some days ago:
http://article.gmane.org/gmane.comp.gnome.mono.devel/10777

You can take the attached daemon as starting point for=20
your own implementation or help promoting the inclusion=20
of something like that in Mono ;-)

Joerg.
_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list