www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/02/16:32:59

Sender: nate AT cartsys DOT com
Message-ID: <370537AD.9ED95C67@cartsys.com>
Date: Fri, 02 Apr 1999 13:33:33 -0800
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.5 i586)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: setrlimit & setrusage
References: <3704D9A8 DOT C2D70354 AT mrg DOT dist DOT unige DOT it>
Reply-To: djgpp AT delorie DOT com

Claudio Castellini wrote:
> 
> Hello everyone.
> 
> I need desperately to put a timeout on my program, compiled under DJGPP. I
> looked at the online documentation and found that setrlimit is, by now,
> implemented as a dummy.
> 
> (a) does the DJGPP staff plan to fully implement it in the near future?

No, AFAIK.  I can't see any use for it on a single-user, unsecured
system.

You are welcome to work on this if you want, however.

> (b) if not, d'ya know any other way to stop a program still running after n
>     seconds without using setrlimit() ?

Use `alarm', or if you need more precision, `setitimer'.

> (c) in the 2.02 "what's new" section, it is stated that getrusage and setrusage
>     have been implemented. What is "setrusage" (couldn't find it in any gcc
>     documentation)?

That would appear to be a bug in the manual.  `setrusage' doesn't exist.
-- 

Nate Eldredge
nate AT cartsys DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019