summaryrefslogtreecommitdiff
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused headers.Xin LI2020-12-124-7/+0
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=368574
* Remove unneeded headers.Xin LI2020-12-125-6/+0
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=368573
* fts_read: Handle error from a NULL return better.Bryan Drewery2020-12-086-6/+9
| | | | | | | | | | | | | | | | | | | | This is addressing cases such as fts_read(3) encountering an [EIO] from fchdir(2) when FTS_NOCHDIR is not set. That would otherwise be seen as a successful traversal in some of these cases while silently discarding expected work. As noted in r264201, fts_read() does not set errno to 0 on a successful EOF so it needs to be set before calling it. Otherwise we might see a random error from one of the iterations. gzip is ignoring most errors and could be improved separately. Reviewed by: vangyzen Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D27184 Notes: svn path=/head/; revision=368467
* bin/setfacl: Little refactoring, no functional change.Gleb Popov2020-11-231-13/+13
| | | | | | | | | | | | | | | The acl_from_stat function accepts a stat_t * argument, but only uses its st_mode field. There is no reason to pass the whole struct, so make it accept a mode_t and rename the function to acl_from_mode. Linux has non-standard acl_from_mode function in its libacl, so naming the function this way may help discovering it during porting efforts. Reviewed by: tsoome, markj Approved by: markj Differential Revision: https://reviews.freebsd.org/D27292 Notes: svn path=/head/; revision=367958
* df: Remove support for mounting devicesMark Johnston2020-11-133-77/+5
| | | | | | | | | | | | This was marked deprecated in r329092, over two and a half years ago. This functionality is also buggy per PR 237368. PR: 237368 Reviewed by: brooks, cem, emaste, imp Differential Revision: https://reviews.freebsd.org/D27197 Notes: svn path=/head/; revision=367642
* Whitespace cleanupLi-Wen Hsu2020-10-291-5/+4
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=367136
* Remove superfluous `this` in commentLi-Wen Hsu2020-10-291-1/+1
| | | | | | | | | PR: 250721 Submitted by: Hiroya EBINE <hebiyan@protonmail.com> MFC after: 3 days Notes: svn path=/head/; revision=367134
* pwd(1): Add EXAMPLES sectionFernando Apesteguía2020-10-241-1/+21
| | | | | | | | | | | | Small EXAMPLES section. Add reference to realpath(1) due to similarity. Approved by: manpages (gbe@) Differential Revision: https://reviews.freebsd.org/D26862 Notes: svn path=/head/; revision=367012
* realpath(1): Add EXAMPLES section.Fernando Apesteguía2020-10-201-0/+8
| | | | | | | | | | Add a small example for this simple command. Approved by: manpages (gbe@) Differential Revision: https://reviews.freebsd.org/D26863 Notes: svn path=/head/; revision=366896
* ls(1): Use \& as an escape character for the ',' optionGordon Bergling2020-10-101-1/+1
| | | | | | | | Reported by: karels@, xtouqh at hotmail dot com MFC after: 1 day Notes: svn path=/head/; revision=366613
* pkill(1): Add EXAMPLES section to man pageFernando Apesteguía2020-10-051-1/+106
| | | | | | | | | | | | Add a dozen of examples to the EXAMPLES section for pgrep(1) and pkill(1). Flags covered: -f, -F, -n, -j, -l, -S, -x Approved by: mandoc (bcr@) Differential Revision: pkill(1): Add EXAMPLES section to man page Notes: svn path=/head/; revision=366448
* kenv(1): Add EXAMPLES to man pageFernando Apesteguía2020-10-051-1/+39
| | | | | | | | | | Add EXAMPLES section covering all the options Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D26664 Notes: svn path=/head/; revision=366447
* hostname(1): Add EXAMPLES to man pageFernando Apesteguía2020-10-051-1/+20
| | | | | | | | | | Add a very simple set of examples Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D26663 Notes: svn path=/head/; revision=366446
* df(1): Add EXAMPLES section to man pageFernando Apesteguía2020-10-051-11/+51
| | | | | | | | | | | | | * Add EXAMPLES section with four simple examples. * Simplify -H flag description. This makes easy to see the difference between this flag and -h * While here, fix .Tn deprecated macro. Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D26662 Notes: svn path=/head/; revision=366445
* pwait(1): Add EXAMPLES section to man pageFernando Apesteguía2020-10-051-2/+50
| | | | | | | | | | | | * Add small EXAMPLES section to the man page showing the different flags and exit codes. * Complete description for -v flag. Approved by: manpages (bcr@) Notes: svn path=/head/; revision=366444
* cp(1): Bugfixes for some issues reported by mandocGordon Bergling2020-10-031-3/+3
| | | | | | | | | - no blank before trailing delimiter MFC after: 1 week Notes: svn path=/head/; revision=366404
* ls(1): Bugfix for an issue reported by mandocGordon Bergling2020-10-031-1/+1
| | | | | | | | | - no blank before trailing delimiter MFC after: 1 week Notes: svn path=/head/; revision=366403
* cp: tests: fix weird 20 insertionKyle Evans2020-09-231-1/+2
| | | | | | | This slipped in at the last moment. =( Notes: svn path=/head/; revision=366060
* cp: add some basic testsKyle Evans2020-09-233-0/+75
| | | | | | | | | | | | | | | | | | | There are some tests available in the NetBSD test suite, but we don't currently pass all of those; further investigation will go into that. For now, just add a basic test as well as a test that copies from /dev/null to a file. The /dev/null test confirms that the file gets created if it's empty, then that it truncates the file if it's non-empty. This matches some usage that was previously employed in the build and was replaced in r366042 by a simpler shell construct. I will also plan on coming back to expand these in due time. MFC after: 1 week Notes: svn path=/head/; revision=366059
* build: provide a default WARNS for all in-tree buildsKyle Evans2020-09-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The current default is provided in various Makefile.inc in some top-level directories and covers a good portion of the tree, but doesn't cover parts of the build a little deeper (e.g. libcasper). Provide a default in src.sys.mk and set WARNS to it in bsd.sys.mk if that variable is defined. This lets us relatively cleanly provide a default WARNS no matter where you're building in the src tree without breaking things outside of the tree. Crunchgen has been updated as a bootstrap tool to work on this change because it needs r365605 at a minimum to succeed. The cleanup necessary to successfully walk over this change on WITHOUT_CLEAN builds has been added. There is a supplemental project to this to list all of the warnings that are encountered when the environment has WARNS=6 NO_WERROR=yes: https://warns.kevans.dev -- this project will hopefully eventually go away in favor of CI doing a much better job than it. Reviewed by: emaste, brooks, ngie (all earlier version) Reviewed by: emaste, arichardson (depend-cleanup.sh change) Differential Revision: https://reviews.freebsd.org/D26455 Notes: svn path=/head/; revision=365887
* cp: fall back to read/write if copy_file_range failsAlan Somers2020-09-111-4/+35
| | | | | | | | | | | | | | | | Even though copy_file_range has a file-system agnostic version, it still fails on devfs (perhaps because the file descriptor is non-seekable?) In that case, fallback to old-fashioned read/write. Fixes "cp /dev/null /tmp/null" PR: 249248 Reported by: Michael Butler Reviewed by: mjg MFC-With: 365549 Differential Revision: https://reviews.freebsd.org/D26395 Notes: svn path=/head/; revision=365643
* cp: use copy_file_range(2)Alan Somers2020-09-101-21/+10
| | | | | | | | | | | | | | | | | This has three advantages over write(2)/read(2): * Fewer context switches and data copies * Mostly preserves a file's sparseness * On some file systems (currently NFS 4.2) the file system will perform the copy in an especially efficient way. Reviewed by: rmacklem MFC after: 2 weeks Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D26377 Notes: svn path=/head/; revision=365549
* sh: Write absolute path in command -vV and typeJilles Tjoelker2020-09-015-11/+64
| | | | | | | | | | | | POSIX is pretty clear that command -v, command -V and type shall write absolute pathnames. Therefore, we need to prepend the current directory's name to relative pathnames. This can happen either when PATH contains a relative pathname or when the operand contains a slash but is not an absolute pathname. Notes: svn path=/head/; revision=365037
* ls(1): Update all POSIX references and correct the STANDARDS sectionGordon Bergling2020-08-311-9/+10
| | | | | | | | | | | | | | | - Update the POSIX references for non-standard ls(1) options - Simplify the STANDARDS section by mention both supported POSIX versions Reported by: hrs Reviewed by: hrs, bcr Approved by: hrs, bcr MFC after: 3 days X-MFC-With: r364449 Differential Revision: https://reviews.freebsd.org/D26210 Notes: svn path=/head/; revision=365004
* sh: Keep ignored SIGINT/SIGQUIT after set in a background jobJilles Tjoelker2020-08-285-2/+27
| | | | | | | | | | | | | | | | | | If job control is not enabled, a background job (... &) ignores SIGINT and SIGQUIT, but this can be reverted using the trap builtin in the same shell environment. Using the set builtin to change options would also revert SIGINT and SIGQUIT to their previous dispositions. This broke due to r317298. Calling setsignal() reverts the effect of ignoresig(). Reported by: bdrewery MFC after: 1 week Notes: svn path=/head/; revision=364919
* date.1: note possibly surprising behaviour of -j -fEd Maste2020-08-261-1/+4
| | | | | | | | | PR: 248918 MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=364790
* ls(1): Update POSIX conformance from 2001 to 2008Gordon Bergling2020-08-211-10/+10
| | | | | | | | | | | | | | | | | | | - Update the options that are non-existing in POSIX from 2001 to 2008 - Update POSIX conformance in the STANDARDS section from 2001 to 2008 Verified by checking [1]. [1] https://pubs.opengroup.org/onlinepubs/9699919799.2016edition/toc.htm PR: 140435 Submitted by: Dan Lukes <dan at obluda dot cz> Reviewed by: bcr Approved by: bcr MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D26096 Notes: svn path=/head/; revision=364449
* ps(1): Fix formatting of the "command" field for kernel threads.Mark Johnston2020-07-281-4/+7
| | | | | | | | | | | | | | | | | | When -H is specified, for kernel threads the command is formatted as "<proc name>/<td name>" and truncated to MAXCOMLEN. But each of the proc name and td name may be up to MAXCOMLEN bytes in length. Also handle the ki_moretdname field to ensure that the full thread name gets printed. This is already handled correctly when formatting for "-o tdname". Reported by: freqlabs Reviewed by: freqlabs MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25840 Notes: svn path=/head/; revision=363649
* sh(1): print a newline when ^D quits shPiotr Pawel Stefaniak2020-07-271-0/+4
| | | | | | | | | | | | | | I've always found this a little bit confusing: > sh $ ^D> sh $ ^D> Reviewed by: 0mp, jilles MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25813 Notes: svn path=/head/; revision=363621
* chio: avoid out of bounds readEd Maste2020-07-261-1/+1
| | | | | | | | | | | ch_ces is alloacated with space for total_elem entries. CID: 1418536 Reported by: Coverity Scan Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=363563
* Update to D25266, bin/ps: Make the rtprio option actually showKirk McKusick2020-07-141-1/+8
| | | | | | | | | | | | | | | | | realtime priorities The current `ps -axO rtprio' show threads running at interrupt priority such as the [intr] thread as '1:48' and threads running at kernel priority such as [pagedaemon] as normal:4294967260. This change shows [intr] as intr:48 and [pagedaemon] as kernel:4. Reviewed by: kib MFC after: 1 week (together with -r362369) Differential Revision: https://reviews.freebsd.org/D25660 Notes: svn path=/head/; revision=363192
* sh: Do not ignore INTOFF during a trapJilles Tjoelker2020-07-091-6/+1
| | | | | | | | | | | | | | | | | | | | INTOFF postpones SIGINT processing and INTON enables it again. This is important so an interactive shell can return to the top level prompt when Ctrl+C is pressed. Given that INTON is automatically done when a builtin completes, the part where onsig() ignores suppressint when in_dotrap is true is both unnecessary and unsafe. If the trap is for some other signal than SIGINT, arbitrary code could have been interrupted. Historically, INTOFF remained in effect for longer. Reviewed by: bdrewery MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25270 Notes: svn path=/head/; revision=363057
* Fix description of the "\$" sequence for PS1Mateusz Piotrowski2020-07-061-3/+3
| | | | | | | | | | | | The manual page documents "\$" to expand to either "$" or "#" followed by a single space. In reality, the single space character is not appended. PR: 247791 Submitted by: kd-dev@pm.me MFC after: 7 days Notes: svn path=/head/; revision=362957
* sh/tests: Re-enable bin.sh.execution.functional_test.bg12.0Jilles Tjoelker2020-06-281-15/+1
| | | | | | | | | | This reverts r362646. PR: 247559 MFC after: 1 week Notes: svn path=/head/; revision=362738
* sh/tests: Fix flaky execution/bg12.0Jilles Tjoelker2020-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | When job control is not enabled, the shell ignores SIGINT while waiting for a foreground process unless that process exits on SIGINT. In this case, the foreground process is sleep and it does not exit on SIGINT because the signal is only sent to the shell. Depending on order of events, this could cause the SIGINT to be unexpectedly ignored. On lightly loaded bare metal, the chance of this happening tends to be less than 0.01% but with higher loads and/or virtualization it becomes more likely. Starting the sleep in background and using the wait builtin ensures SIGINT will not be ignored. PR: 247559 Reported by: lwhsu MFC after: 1 week Notes: svn path=/head/; revision=362737
* ps(1): don't try to handle non-SMP systemsPiotr Pawel Stefaniak2020-06-273-19/+1
| | | | | | | | | | As reported by kib, sysctl machdep.smp_active doesn't exist and on UP we return CPU 0 for all threads anyway. Reported by: kib Notes: svn path=/head/; revision=362707
* ps(1): reuse keyword "cpu" to show CPU numberPiotr Pawel Stefaniak2020-06-275-5/+37
| | | | | | | | | | | | | | | | | | | | | | | This flag will now show the processor number on which a process is running. This change was inspired by PR129965. Initially I didn't think that the patch attached to it was correct -- it sacrificed ki_estcpu use in "cpu" for ki_lastcpu and I thought that the old functionality should be kept and the new (cpu#) one added to it. But I've since discovered that ki_estcpu is sched_4bsd-specific. What's worse, it represents the same thing as ki_pctcpu, except ki_pctcpu is universal -- so "%cpu" has been using it successfully. Therefore, I've decided to replace information based on ki_estcpu with information based on ki_oncpu/ki_lastcpu. Key parts of the code and manual changes were borrowed from top(1). PR: 129965 Reported by: Nikola Knežević MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25377 Notes: svn path=/head/; revision=362705
* Temporarily skip flakey bin.sh.execution.functional_test.bg12 in CILi-Wen Hsu2020-06-261-1/+15
| | | | | | | | PR: 238870 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=362646
* bin/ps: Make the rtprio option actually show realtime prioritiesLorenzo Salvadore2020-06-192-10/+11
| | | | | | | | | | | | | | | | | | | | | Fix the rtprio option that for some reason was progessively becoming an option showing the priority class of threads. In particular: - use the constants defined in sys/sys/rtprio.h instead of those defined in sys/sys/priority.h: this helps making clearer that the code actually is about realtime priorities and not standard scheduler priorities; - remove the PRI_ITHD case that has nothing to do with realtime priorities; - convert the priority levels to realtime priority levels using the same formulas used for pri_to_rtp function in sys/kern/kern_resource.c. - remove outdated note "101 = not a realtime process" in the man page and replace it with a more useful reference to man 1 rtprio. Approved by: src (mckusick), manpages (bcr), gerald (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25266 Notes: svn path=/head/; revision=362369
* sh/tests: Add tests for SIGINT in non-jobc background commandsJilles Tjoelker2020-06-143-0/+30
| | | | | | | | | | If job control is not enabled, background commands shall ignore SIGINT and SIGQUIT, and it shall be possible to override that ignore in the same shell. MFC after: 1 week Notes: svn path=/head/; revision=362182
* ps: remove xo_no_setlocale() callYuri Pankov2020-06-091-1/+0
| | | | | | | | | | Apparently libxo was fixed to do the right thing on FreeBSD, and calling xo_no_setlocale() is no longer needed. Reported by: phil Notes: svn path=/head/; revision=361962
* ps: use %hs instead of %s format specifiersYuri Pankov2020-06-073-5/+6
| | | | | | | | | | | | | Use %hs (locale-based encoding) instead of %s (UTF-8) format for strings that are expected to be in current locale encoding (date/time, process names/argument list). PR: 241491 Reviewed by: phil Differential Revision: https://reviews.freebsd.org/D22160 Notes: svn path=/head/; revision=361887
* Add O_DIRECT flag to DD for cache bypassRichard Scheffenegger2020-06-044-4/+17
| | | | | | | | | | | | | | | FreeBSD DD utility has not had support for the O_DIRECT flag, which is useful to bypass local caching, e.g. for unconditionally issuing NFS IO requests during testing. Reviewed by: rgrimes (mentor) Approved by: rgrimes (mentor, blanket) MFC after: 3 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D25066 Notes: svn path=/head/; revision=361806
* vfs: add restrictions to read(2) of a directory [1/2]Kyle Evans2020-06-042-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Historically, we've allowed read() of a directory and some filesystems will accommodate (e.g. ufs/ffs, msdosfs). From the history department staffed by Warner: <<EOF pdp-7 unix seemed to allow reading directories, but they were weird, special things there so I'm unsure (my pdp-7 assembler sucks). 1st Edition's sources are lost, mostly. The kernel allows it. The reconstructed sources from 2nd or 3rd edition read it though. V6 to V7 changed the filesystem format, and should have been a warning, but reading directories weren't materially changed. 4.1b BSD introduced readdir because of UFS. UFS broke all directory reading programs in 1983. ls, du, find, etc all had to be rewritten. readdir() and friends were introduced here. SysVr3 picked up readdir() in 1987 for the AT&T fork of Unix. SysVr4 updated all the directory reading programs in 1988 because different filesystem types were introduced. In the 90s, these interfaces became completely ubiquitous as PDP-11s running V7 faded from view and all the folks that initially started on V7 upgraded to SysV. Linux never supported this (though I've not done the software archeology to check) because it has always had a pathological diversity of filesystems. EOF Disallowing read(2) on a directory has the side-effect of masking application bugs from relying on other implementation's behavior (e.g. Linux) of rejecting these with EISDIR across the board, but allowing it has been a vector for at least one stack disclosure bug in the past[0]. By POSIX, this is implementation-defined whether read() handles directories or not. Popular implementations have chosen to reject them, and this seems sensible: the data you're reading from a directory is not structured in some unified way across filesystem implementations like with readdir(2), so it is impossible for applications to portably rely on this. With this patch, we will reject most read(2) of a dirfd with EISDIR. Users that know what they're doing can conscientiously set bsd.security.allow_read_dir=1 to allow read(2) of directories, as it has proven useful for debugging or recovery. A future commit will further limit the sysctl to allow only the system root to read(2) directories, to make it at least relatively safe to leave on for longer periods of time. While we're adding logic pertaining to directory vnodes to vn_io_fault, an additional assertion has also been added to ensure that we're not reaching vn_io_fault with any write request on a directory vnode. Such request would be a logical error in the kernel, and must be debugged rather than allowing it to potentially silently error out. Commented out shell aliases have been placed in root's chsrc/shrc to promote awareness that grep may become noisy after this change, depending on your usage. A tentative MFC plan has been put together to try and make it as trivial as possible to identify issues and collect reports; note that this will be strongly re-evaluated. Tentatively, I will MFC this knob with the default as it is in HEAD to improve our odds of actually getting reports. The future priv(9) to further restrict the sysctl WILL NOT BE MERGED BACK, so the knob will be a faithful reversion on stable/12. We will go into the merge acknowledging that the sysctl default may be flipped back to restore historical behavior at *any* point if it's warranted. [0] https://www.freebsd.org/security/advisories/FreeBSD-SA-19:10.ufs.asc PR: 246412 Reviewed by: mckusick, kib, emaste, jilles, cy, phk, imp (all previous) Reviewed by: rgrimes (latest version) MFC after: 1 month (note the MFC plan mentioned above) Relnotes: absolutely, but will amend previous RELNOTES entry Differential Revision: https://reviews.freebsd.org/D24596 Notes: svn path=/head/; revision=361798
* sh: Allow more scripts without #!Jilles Tjoelker2020-05-303-1/+42
| | | | | | | | | | | | | | | | | | | Austin Group bugs #1226 and #1250 changed the requirements for shell scripts without #! (POSIX does not specify #!; this is about the shell execution when execve(2) returns an [ENOEXEC] error). POSIX says we shall allow execution if the initial part intended to be parsed by the shell consists of characters and does not contain the NUL character. This allows concatenating a shell script (ending with exec or exit) and a binary payload. In order to reject common binary files such as PNG images, check that there is a lowercase letter or expansion before the last newline before the NUL character, in addition to the check for the newline character suggested by POSIX. Notes: svn path=/head/; revision=361647
* sh: Remove a comment that was obsoleted by r358152Jilles Tjoelker2020-05-221-3/+1
| | | | | | | | | | | Since r358152, the read builtin has used a buffer. Also, remove a space at the end of the line in a comment. No functional change is intended. Notes: svn path=/head/; revision=361384
* ls: fix WITHOUT_LS_COLORS buildKyle Evans2020-05-211-0/+4
| | | | | | | | | | | *sigh* references to colorflags should be gated by COLORLS. Pointy hat to: kevans Reported by: jenkins (rescue build) X-MFC-With: r361318 Notes: svn path=/head/; revision=361332
* ls(1): actually restore proper behaviorKyle Evans2020-05-212-2/+16
| | | | | | | | | | | | | | | | | Highlights: - CLICOLOR in the environment should imply --color=auto to maintain compatibility with historical behavior - -G should set CLICOLOR and imply --color=auto The manpage has been updated to draw the connection between -G and --color; the former is in-fact a sort of compromise between --color=always and --color=auto, where we'll output color regardless of the environment lacking CLICOLOR/COLORTERM assuming stdout is a tty. X-MFC-With: r361318 Notes: svn path=/head/; revision=361331
* ls: fix a --color regression from r337956Kyle Evans2020-05-212-4/+10
| | | | | | | | | | | | | | | | | | The regression is in-fact that I flipped the default from never to auto. The incorrect impression was based on an alias that I failed to notice, installed by the Linux distribution that I used for testing compatibility here. Users that want the old default should be doing so with a shell alias as is done elsewhere, rather than making this decision in ls(1). Many thanks to rgrimes for pointing out the alias that I clearly overlooked that resulted in this; if you despised colors in your terminal from this, consider buying him a beer at the next venue that you see him at. MFC after: 1 week Relnotes: yes Notes: svn path=/head/; revision=361318
* sh: Fix double INTON with vforkJilles Tjoelker2020-05-163-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | The shell maintains a count of the number of times SIGINT processing has been disabled via INTOFF, so SIGINT processing resumes when all disables have enabled again (INTON). If an error occurs in a vfork() child, the processing of the error enables SIGINT processing again, and the INTON in vforkexecshell() causes the count to become negative. As a result, a later INTOFF may not actually disable SIGINT processing. This might cause memory corruption if a SIGINT arrives at an inopportune time. As of r360452, it causes the shell to abort when it would unsafely allocate or free memory in certain ways. Note that various places such as errors in non-special builtins unconditionally reset the count to 0, so the problem might still not always be visible. PR: 246497 Reported by: jbeich MFC after: 2 weeks Notes: svn path=/head/; revision=361112