[Mono-list] Mono: TLS. normal versus __thread
Michael Rasmussen
mir@miras.org
Thu, 24 Mar 2005 15:16:12 +0100
--=-Oyft0E1ZNkJVMO4aZgRW
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
tor, 24 03 2005 kl. 07:28 -0500, skrev Jonathan Pryor:
> Don't call Syscall.fork unless you really know what you're doing...
>=20
> (Someone correct me if the following is wrong...)
>=20
> The problem is that Mono is implemented in terms of the Win32 API. This
> allows portability between Windows and Unix (io-layer implements a Win32
> subset for Unix platforms). But in order to be efficient at some tasks,
> some data must be shared between all mono tasks. This data is in the
> ~/.wapi directory.
>=20
Well in my case the hole point is to be able to start an application and
the be able to fork it to the background running as a daemon. I find it
hard to see this as a dangerous task?
The problem occurs when mono is compiled with the option TLS normal.
When mono is compiled with the option TLS __thread it works as expected.
> PS: lupus: Is there any scenario where it's actually *safe* to call
> fork? I'm wondering if I should remove fork(2) and exec(2) from
> Mono.Unix.Syscall... Alternatively, is there someway to protected
> ~/.wapi so that fork(2) can be safely called?
Forking as process to run as daemon should in my opinion be a safe task.
Hilsen/Regards
Michael Rasmussen
Get my public GnuPG keys:
michael rasmussen cc
http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xD3C9A00E
mir datanom net
http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xE501F51C
mir miras org
http://keyserver.veridis.com:11371/pks/lookup?op=3Dget&search=3D0xE3E80917
--------------------------------------------------------------
I'll burn my books.
-- Christopher Marlowe
--=-Oyft0E1ZNkJVMO4aZgRW
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Dette er en digitalt underskrevet brevdel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQBCQsusVErYVePoCRcRAjZnAJ4opQ/vvT2Ah7hGM2tQFyvuX+EOZwCgmAfV
h691ebQg3FJS9BBWWhdcU1k=
=H2mm
-----END PGP SIGNATURE-----
--=-Oyft0E1ZNkJVMO4aZgRW--