Re: [AD] No more END_OF_MAIN on *nix!

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


> This patch gets rid of the magic_main mangling in UNIX, using procfs if
> available to grab a copy of the running program.
> If procfs is not available, it tries to shell out and get the name of the
> executable from the pid by querying the ps command. This is not as good as
> using procfs, but in my tests not less reliable than depending on argv[0].

Hum... procfs is a Linux-ism.  And invoking an external program is IMHO both
dangerous (what happens if 'ps' is not there?) and expensive.

I think that adding OS-specific methods is fine, but you can't get rid of
the portable method until all major Unices are covered.

--
Eric Botcazou





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