From: alain AT qnx DOT com (Alain Magloire) Newsgroups: comp.os.msdos.djgpp Subject: Re: `void main' in Gnu packages---?! Date: 14 Jan 2000 21:48:23 GMT Organization: QNX Software Systems Lines: 22 Message-ID: <85o5j7$bjb$1@gateway.qnx.com> References: <200001141504 DOT JAA08686 AT darwin DOT sfbr DOT org> NNTP-Posting-Host: qnx.com X-Trace: gateway.qnx.com 947886503 11883 209.226.137.1 (14 Jan 2000 21:48:23 GMT) X-Complaints-To: usenet AT qnx DOT com NNTP-Posting-Date: 14 Jan 2000 21:48:23 GMT X-Newsreader: TIN [version 1.2 PL2] To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Jeff Williams (jeffw AT darwin DOT sfbr DOT org) wrote: : -: I'm certainly curious to know in which program/package, since most of the : -: GNU *utils are design to be use with Unix shells so the return : -: value of main is important when doing shell scripts. : One place I found it was in time.c of the GNU time-1.7.tar.gz archive. : This compiled right out of the box (well, almost), but when I ran the : executable I got a brutal reminder that DOS can't fork(). Duh. [:-/ 8-) time as not been maintained for a long long time. But I suspect you could use spawn () to emulate the fork (). My guest is that time probably call time () or gettimeofday() and fork ()/ exec () and wait () till completion to recall time()/gettimeofday() and then show you the stats. This is a good approximation, for OS who do not support fully getrusage (). Does DJGPP support getrusage () ? -- au revoir, alain ---- Aussi haut que l'on soit assis, on est toujours assis que sur son cul !!!