g++ Ärger

Jan 'Red Bully' Seiffert redbully at cc.fh-luh.de
Mon Apr 18 16:24:05 CEST 2005


Jan-Benedict Glaw schrieb:
> 
[snip-snap unsere Privatdiskussion ueber EXIT_{WAS_AUCH_IMMER}]
> 
> Siehe oben. Nicht zwischen return und exit zu unterscheiden _mindert_
> hier die Portabilität. Denn zu schnell hat man da mal ein
> 
> 	if (! some_function ())
> 		printf ("hat geklappt\n");
> 
OK, ich hab mich wohl zu Kurz ausgedrueckt...
Ich benutze es ja *nicht* als return-Wert von irgentwelchen meiner
"inneren" Funktionen (die sind meist nur bool (C99)).
Ich meinte _nur_ das return aus main(). Ich dachte, du meintest das
gleiche return.
exit() benutzte ich so gut wie nie, ausser im Notfall:

if(pthread_mutex_unlock(&my_epoll_mutex))
{
	logg_errno(LOGF_CRIT, "unlocking my_epoll mutex");
	exit(EXIT_FAILURE);
}

Wens da knallt, hilft halt nichts mehr...

> MfG, JBG
> 
> 
Gruss
	Jan

-- 
"Don't open the gates. Who the hell needs a wooden horse THAT size ?"
(unknown inhabitant of Troja)



More information about the Linux mailing list