aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/tee
Commit message (Collapse)AuthorAgeFilesLines
* move ch{own,grp}(8) and tee(1) to FreeBSD-runtimeLexi Winter2025-05-281-0/+1
| | | | | | | | | | | | chown and chgrp are almost essential for system management; in particular, a lot of rc.d scripts rely on them. tee is quite commonly used in shell scripts, and is small enough that there's no real need for it to be in -utilities. PR: 287014 Reviewed by: dch, manu, des, emaste Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50497
* tee: try opening as a UNIX socket if open(2) failsKyle Evans2025-04-203-3/+83
| | | | | | | | | | If we get EOPNOTSUPP from open() failing, then it may just be that we're looking at a unix(4) socket instead of a normal file/device or whatnot. Fallback to trying to open it as a unix(4) socket, which is a useful feature that doesn't add much complexity. Reviewed by: des, emaste, markj Differential Revision: https://reviews.freebsd.org/D48197
* tee: minor cleanupKyle Evans2025-04-201-8/+13
| | | | | | | | | | | | | | Pull the open flags out of the loop into a local var. They won't be changing, so this is marginally more readable. Adds some extra brackets around the loop in preparation for a future change that may try to fallback to opening the path as a socket if we get an EOPNOTSUPP. No functional change. Reviewed by: asomers, des, emaste, ngie Differential Revision: https://reviews.freebsd.org/D48196
* tee: add some basic testsKyle Evans2025-04-204-0/+99
| | | | | | | | | | | | The cases are ordered in such a way that we naturally progress through the functionality, with the earliest failures perhaps shedding light on any later failures. sysutils/porch is used for one test if it's available, just to cleanly check that SIGINT is being ignored properly. Reviewed by: des, emaste Differential Revision: https://reviews.freebsd.org/D48195
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* Remove copyright strings ifdef'd outWarner Losh2023-11-271-9/+0
| | | | | | | | | | | We've ifdef'd out the copyright strings for some time now. Go ahead and remove the ifdefs. Plus whatever other detritis was left over from other recent removals. These copyright strings are present in the comments and are largely from CSRG's attempt at adding their copyright to every binary file (which modern interpretations of the license doesn't require). Sponsored by: Netflix
* usr.bin: Remove ancient SCCS tags.Warner Losh2023-11-273-6/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* Purge more stray embedded $FreeBSD$ stringsJohn Baldwin2023-09-251-2/+0
| | | | | | | These do not use __FBSDID but instead use bare char arrays. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41957
* Remove $FreeBSD$: one-line nroff patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-162-2/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Mark usage function as __dead2 in programs where it does not returnAlfonso Gregory2023-07-071-1/+1
| | | | | | | | In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-1/+1
|
* tee.1: Add a HISTORY sectionGordon Bergling2022-10-301-1/+6
| | | | | | | | | The most accurate information I have found is that tee(1) first appeared in Version 7 AT&T UNIX. Reviewed by: pauamma MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D37206
* tee: use queue(9) in place of a custom linked listPietro Cerutti2021-09-151-10/+10
| | | | Approved by: cognet
* tee.1: Add a missing articleMateusz Piotrowski2020-06-231-1/+1
| | | | Notes: svn path=/head/; revision=362536
* tee(1): Add EXAMPLES sectionFernando ApesteguĂ­a2020-06-231-2/+4
| | | | | | | | | | Add one simple example Approved by: bcr@ Differential Revision: https://reviews.freebsd.org/D25337 Notes: svn path=/head/; revision=362534
* tee(1): Add EXAMPLES sectionFernando ApesteguĂ­a2020-06-181-1/+7
| | | | | | | | | | Probably the simplest one ever. Approved by: gbe@, 0mp@ Differential Revision: https://reviews.freebsd.org/D25206 Notes: svn path=/head/; revision=362318
* capsicum: use a new capsicum helpers in toolsMariusz Zaborski2018-11-041-1/+1
| | | | | | | Use caph_{rights,ioctls,fcntls}_limit to simplify the code. Notes: svn path=/head/; revision=340138
* Convert `cap_enter() < 0 && errno != ENOSYS` to `caph_enter() < 0`.Mariusz Zaborski2018-06-191-1/+1
| | | | | | | No functional change intended. Notes: svn path=/head/; revision=335395
* sponge(1): revertEitan Adler2017-12-061-2/+0
| | | | | | | | | | | | I did a complete buildworld and test... with the program disconnected from the tree. Revert the change for now. (this keeps the change to .arclint which is still correct) Wearing: my pointhat Notes: svn path=/head/; revision=326614
* sponge(1): initial commitEitan Adler2017-12-051-0/+2
| | | | | | | | | | | | | sponge(1) is a utility that reads input until complete, then opens the output file, then writes to it. This makes it useful in pipelines that read and write to the same file. Reviewed by: wblock, jilles, imp, cem, danfe (all: various iterations) Inspired by: https://joeyh.name/code/moreutils/ Notes: svn path=/head/; revision=326554
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-1/+3
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Renumber copyright clause 4Warner Losh2017-02-282-2/+2
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2016-11-131-0/+1
| | | | | | | | MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=308606
* Remove the duplicated code using Capsicum helpers.Mariusz Zaborski2016-10-071-23/+9
| | | | | | | | Reviewed by: cem, ed, bapt, emaste Differential Revision https://reviews.freebsd.org/D8140 Notes: svn path=/head/; revision=306813
* Capsicum-ize tee(1)Baptiste Daroussin2016-09-181-1/+34
| | | | | | | | Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D7940 Notes: svn path=/head/; revision=305937
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+19
|/ | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* Reverting last change r231449 (fix bin/164947) due to concerns voicedMartin Cracauer2012-02-111-23/+3
| | | | | | | | on src-committers and the fact that I can only take care of this in a week. Notes: svn path=/head/; revision=231524
* Fix bin/164947: tee looses data when writing to non-blocking file descriptorsMartin Cracauer2012-02-101-3/+23
| | | | | | | | | | | tee was not handling EAGAIN patch submitted by Diomidis Spinellis <dds@aueb.gr>. Thanks so much reproduced and re-tested locally Notes: svn path=/head/; revision=231449
* Add missing static keywords to tee(1)Ed Schouten2011-11-061-3/+3
| | | | Notes: svn path=/head/; revision=227187
* Remove the advertising clause from UCB copyrighted files in usr.bin. ThisJoel Dahl2010-12-112-8/+0
| | | | | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson Notes: svn path=/head/; revision=216370
* Revert most part of 200420 as requested, as more review and polish isXin LI2009-12-131-0/+1
| | | | | | | needed. Notes: svn path=/head/; revision=200462
* Remove unneeded header includes from usr.bin/ except contributed code.Xin LI2009-12-111-1/+0
| | | | | | | Tested with: make universe Notes: svn path=/head/; revision=200420
* - Steal short description from POSIX; it's more technical and wasRuslan Ermilov2007-11-131-4/+4
| | | | | | | | easier to translate. - Fix some markup nits. Notes: svn path=/head/; revision=173581
* Added the EXIT STATUS section where appropriate.Ruslan Ermilov2005-01-171-1/+1
| | | | Notes: svn path=/head/; revision=140368
* ANSIify function definitions.David Malone2002-09-041-10/+6
| | | | | | | | | | | | Add some constness to avoid some warnings. Remove use register keyword. Deal with missing/unneeded extern/prototypes. Some minor type changes/casts to avoid warnings. Reviewed by: md5 Notes: svn path=/head/; revision=102944
* Use err instead of errx when malloc fails. "malloc" is not a helpfulTim J. Robbins2002-07-051-2/+2
| | | | | | | error message. Notes: svn path=/head/; revision=99433
* Revert part of the previous revision. Changing exit() to return() in main()Juli Mallett2002-05-171-1/+1
| | | | | | | | | | | | | | is wrong, even though our C compiler doesn't understand that exit() eats control of the program, and as such can sometimes complain that main() reaches the bottom of its body without an explicit return(). Aside from that, the functional usefulness of changing it is effectively nil, so back it out. Submitted by: mike Notes: svn path=/head/; revision=96803
* Remove spurious casts in malloc(3)'s argument.Juli Mallett2002-05-171-3/+3
| | | | | | | Use `return' instead of `exit' at the bottom of main(). Notes: svn path=/head/; revision=96776
* remove __PWarner Losh2002-03-221-2/+2
| | | | Notes: svn path=/head/; revision=92922
* Remove WARNS?=2 and -Wall. WARNS?=2 is going to be the default.Mark Murray2001-12-121-1/+0
| | | | Notes: svn path=/head/; revision=87714
* Style improvements recommended by Bruce as a follow up to someDavid Malone2001-12-101-1/+1
| | | | | | | | | | | of the recent WARNS commits. The idea is: 1) FreeBSD id tags should follow vendor tags. 2) Vendor tags should not be compiled (though copyrights probably should). 3) There should be no blank line between including cdefs and __FBSDIF. Notes: svn path=/head/; revision=87628
* Warns cleanups. Add FreeBSD ID to Makefile.David Malone2001-12-032-3/+5
| | | | Notes: svn path=/head/; revision=87303