From mboxrd@z Thu Jan 1 00:00:00 1970 From: stardiviner Subject: Re: How to set time limit and memory limit for execution of source blocks Date: Wed, 05 Feb 2020 13:16:13 +0800 Message-ID: <87blqdboma.fsf@gmail.com> References: Reply-To: numbchild@gmail.com Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:49455) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izD30-00027B-8A for emacs-orgmode@gnu.org; Wed, 05 Feb 2020 00:16:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izD2z-0000e3-55 for emacs-orgmode@gnu.org; Wed, 05 Feb 2020 00:16:22 -0500 Received: from [112.17.238.191] (port=30686 helo=dark.localdomain) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1izD2y-0000P2-Jj for emacs-orgmode@gnu.org; Wed, 05 Feb 2020 00:16:21 -0500 In-reply-to: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Anoop GR writes: > Dear Emacs hackers, > > Like all of you, I think orgmode is the best way to organise study notes. > > I am solving competitive programming questions from Topcoder.com > There are strict guidelines on memory limit of 256MB and time limit of 2sec for solutions > > How do I enforce the same on my orgmode source blocks. > I want the execution to stop whenever it exceeds the above limits on memory and time. > > Long live Emacs, > Anoop Just an possible solution, use Emacs advice on org-babel-execute: to modify the language execute command. Prepend with Linux commands which can limit process resources. -- [ stardiviner ] I try to make every word tell the meaning what I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3