From owner-svn-src-head@freebsd.org Thu Jun 25 16:46:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2D50D35F2CC; Thu, 25 Jun 2020 16:46:28 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49t5WS0PPpz4Jj8; Thu, 25 Jun 2020 16:46:28 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 08BAF25DF2; Thu, 25 Jun 2020 16:46:28 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PGkRxF073089; Thu, 25 Jun 2020 16:46:27 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PGkRG5073088; Thu, 25 Jun 2020 16:46:27 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202006251646.05PGkRG5073088@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Thu, 25 Jun 2020 16:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362615 - head/usr.bin/limits X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/limits X-SVN-Commit-Revision: 362615 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 16:46:28 -0000 Author: fernape (ports committer) Date: Thu Jun 25 16:46:27 2020 New Revision: 362615 URL: https://svnweb.freebsd.org/changeset/base/362615 Log: limits(1): Add EXAMPLES section * Add four examples showing flags -e, -b, -d, -s * Remove extra space at the end of the line reported by igor Approved by: bcr@ Differential Revision: https://reviews.freebsd.org/D25426 Modified: head/usr.bin/limits/limits.1 Modified: head/usr.bin/limits/limits.1 ============================================================================== --- head/usr.bin/limits/limits.1 Thu Jun 25 15:25:00 2020 (r362614) +++ head/usr.bin/limits/limits.1 Thu Jun 25 16:46:27 2020 (r362615) @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 26, 2020 +.Dd June 25, 2020 .Dt LIMITS 1 .Os .Sh NAME @@ -376,6 +376,44 @@ exits with a status of .Dv EXIT_SUCCESS . When run in command mode and execution of the command succeeds, the exit status will be whatever the executed program returns. +.Sh EXAMPLES +Show current stack size limit: +.Bd -literal -offset indent +$ limits -s +Resource limits (current): + stacksize 524288 kB +.Ed +.Pp +Try to run +.Xr ls 1 +with 1 byte of +.Va datasize +limit: +.Bd -literal -offset indent +$ limits -d 1b ls +Data segment size exceeds process limit +Abort trap +.Ed +.Pp +Produce +.Ql eval mode +output to limit +.Va sbsize +to 1 byte. +Output obtained when command is run from +.Xr sh 1 : +.Bd -literal -offset indent +$ limits -e -b 1b +ulimit -b 512; +.Ed +.Pp +Same as above from +.Xr csh 1 +.Bd -literal -offset indent +% limits -e -b 1b +limit -h sbsize 512; +limit sbsize 512; +.Ed .Sh SEE ALSO .Xr csh 1 , .Xr env 1 , @@ -396,7 +434,7 @@ utility first appeared in The .Nm utility was written by -.An David Nugent Aq Mt davidn@FreeBSD.org . +.An David Nugent Aq Mt davidn@FreeBSD.org . .Sh BUGS The .Nm