From owner-freebsd-questions@freebsd.org Tue Jan 23 08:07:27 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41450EBA255 for ; Tue, 23 Jan 2018 08:07:27 +0000 (UTC) (envelope-from Olivier.Nicole@cs.ait.ac.th) Received: from mail.cs.ait.ac.th (mail.cs.ait.ac.th [192.41.170.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E352F6A8A3 for ; Tue, 23 Jan 2018 08:07:26 +0000 (UTC) (envelope-from Olivier.Nicole@cs.ait.ac.th) Received: from mail.cs.ait.ac.th (localhost [127.0.0.1]) by mail.cs.ait.ac.th (Postfix) with ESMTP id 4687461F83 for ; Tue, 23 Jan 2018 12:40:20 +0700 (+07) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cs.ait.ac.th; h= content-type:content-type:mime-version:message-id:date:date :subject:subject:from:from:received:received:received; s= selector1; t=1516686019; x=1518500420; bh=MMJiHQjh/ZdaCmK98568DX 2s7rEXtRrl1TPaYhH0hUg=; b=HRuDrUN/1MJtxJ3O8za81NEQGd2xWnphXV/xyE jXIV2GcnwF49Z2Mt2EBBb6FKX8xb9GIBeVcmW98uKHtGYZD9WOQ4T7wITzo76d8O zCNJq7VbViXnUm5ZbsL8tStW3PECCOF+zQVarT8rM+bdcRBEGwETMeHIYE5u+eNg CTD20= X-Virus-Scanned: amavisd-new at cs.ait.ac.th Received: from mail.cs.ait.ac.th ([127.0.0.1]) by mail.cs.ait.ac.th (mail.cs.ait.ac.th [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id jY0d4tQFW8Ly for ; Tue, 23 Jan 2018 12:40:19 +0700 (+07) Received: from banyan.cs.ait.ac.th (banyan.cs.ait.ac.th [192.41.170.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.cs.ait.ac.th (Postfix) with ESMTPS id 997BA61F81 for ; Tue, 23 Jan 2018 12:40:19 +0700 (+07) Received: (from on@localhost) by banyan.cs.ait.ac.th (8.15.2/8.15.2/Submit) id w0N5eIH4019871; Tue, 23 Jan 2018 12:40:18 +0700 (ICT) (envelope-from on@banyan.cs.ait.ac.th) From: Olivier To: freebsd-questions@freebsd.org Subject: Limit resources for a given program Date: Tue, 23 Jan 2018 12:40:17 +0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2018 08:07:27 -0000 Hi, Is there a way, in FreeBSD, to limit the clocktime for a given command? I use LibreOffice to automatically convert many types of documents to PDF. When it is an HTML document with external links, it will run indefinitely, trying to access the external resources. It will not use much CPU but mostly sits idled, so limits(8) -t is not the solution, nor is rctl(8) that needs a process ID (but I only have the command name) or a user ID (but I don't want to limit a user, just that program). Any idea how I can solve that? Thanks in advance, Olivier --