Re: [AD] Magic main in Windows

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On August 2, 2004 01:47 am, Thomas Fjellstrom wrote:
[snip]
>
> I just got a really evil idea.
>
> allegro_init(...)
> {
> 	if(fork() == 0) {
> 		setup stuff;
> 		return;
> 	}
> 	// else, do stuff, and not return
> }
>
> main()
> {
> 	allegro_init(...);
> }
>
> Now, getting info to and from the two procs is left as an excercise for the
> reader ;)
>
> j/k. If popen works, that could be usefull, also SHM/mapped files may be an
> option.
>
> Now, communication isn't the only problem I see ;) Synching between the
> two, and actually making the child wait and return some usefull info before
> returning from allegro_init ;)
>
> So yeah. evil. :)
>

Actually, its just silly ;) Noticed another problem last night while falling 
asleep that'll make it totally useless. :)

-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx
http://strangesoft.net




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/