From patchwork Tue Sep 1 12:14:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yousong Zhou X-Patchwork-Id: 512797 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B1F4114056B for ; Tue, 1 Sep 2015 22:19:38 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=QWwVcT/E; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id E561B28C17B; Tue, 1 Sep 2015 14:17:48 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 028CC28BFE9 for ; Tue, 1 Sep 2015 14:17:36 +0200 (CEST) X-policyd-weight: using cached result; rate: -8.5 Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Tue, 1 Sep 2015 14:17:36 +0200 (CEST) Received: by pader10 with SMTP id er10so5161776pad.3 for ; Tue, 01 Sep 2015 05:18:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sQ6zJeY19fBmjn7E3SgKIYEOYnBHPittEx7mVBkwOSA=; b=QWwVcT/EksDdKpY86CslLCIbyraq2DSYVwNYmDAxO5CYEzxGv2x1L4QSRD7nWuBA27 1Bg6JmNtaY8AKBD9ugmiiQM5eWTcI9NcL+emytvX/01wileKoPeVJB2ZLW802kj4/iJg wkTMDk5aJYg5ApOfH7op1tB5p/a8R8Z1Uttuul6lxhJlGRsCmc2SBDz+UY6CWtF+3ZqM R53m2iXf4hTAcj4WHhuy96DW4Yiu5afwyJm9H50OGaQGbswfg8h/4MIbZkB7Q+VYN3Vs An0boL1k8iYLqRd2MpATUA7fgbHUbU/FjnCg5YycetzwaEQYhEK4uwtK3w2P4rODA9N2 mMcw== X-Received: by 10.68.244.34 with SMTP id xd2mr45486440pbc.50.1441109913398; Tue, 01 Sep 2015 05:18:33 -0700 (PDT) Received: from debian.corp.sankuai.com ([103.29.140.57]) by smtp.gmail.com with ESMTPSA id qc2sm17967378pbc.79.2015.09.01.05.18.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Sep 2015 05:18:32 -0700 (PDT) From: Yousong Zhou To: openwrt-devel@lists.openwrt.org Date: Tue, 1 Sep 2015 20:14:42 +0800 Message-Id: <1441109686-27796-2-git-send-email-yszhou4tech@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1441109686-27796-1-git-send-email-yszhou4tech@gmail.com> References: <1441109686-27796-1-git-send-email-yszhou4tech@gmail.com> Subject: [OpenWrt-Devel] [PATCH 2/6] util-linux: add prlimit command. X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Signed-off-by: Yousong Zhou --- package/utils/util-linux/Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/package/utils/util-linux/Makefile b/package/utils/util-linux/Makefile index cf80012..f037e6a 100644 --- a/package/utils/util-linux/Makefile +++ b/package/utils/util-linux/Makefile @@ -303,6 +303,17 @@ define Package/namei/description files, directories, and so forth) endef +define Package/prlimit +$(call Package/util-linux/Default) + TITLE:=get and set process resource limits + DEPENDS:= +libsmartcols +endef + +define Package/prlimit/description + Given a process id and one or more resources, prlimit tries to retrieve + and/or modify the limits. +endef + define Package/rename $(call Package/util-linux/Default) TITLE:=rename files @@ -534,6 +545,11 @@ define Package/namei/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/namei $(1)/usr/bin/ endef +define Package/prlimit/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/prlimit $(1)/usr/bin/ +endef + define Package/rename/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/rename $(1)/usr/bin/ @@ -614,6 +630,7 @@ $(eval $(call BuildPackage,lsblk)) $(eval $(call BuildPackage,mcookie)) $(eval $(call BuildPackage,mount-utils)) $(eval $(call BuildPackage,namei)) +$(eval $(call BuildPackage,prlimit)) $(eval $(call BuildPackage,rename)) $(eval $(call BuildPackage,partx-utils)) $(eval $(call BuildPackage,script-utils))