summaryrefslogtreecommitdiff
path: root/bin/sh/redir.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove clause 3 from the UCB licenses.Mark Murray2004-04-061-4/+0
| | | | | | | OK'ed by: imp, core Notes: svn path=/head/; revision=127958
* Replace home-grown dup2() implementation with actual dup2() calls. ThisDag-Erling Smørgrav2004-01-211-32/+8
| | | | | | | | | | should slightly reduce the number of system calls in critical portions of the shell, and select a more efficient path through the fdalloc code. Reviewed by: bde Notes: svn path=/head/; revision=124780
* Changes following CScout analysis:Diomidis Spinellis2003-07-051-1/+1
| | | | | | | | | | | | | | - Removed dead declarations - Made objects that should have been declared as static, static. The changes use STATIC instead of static, following the existing convention in the rest of the code. Approved by: schweikh (mentor) MFC after: 2 weeks Notes: svn path=/head/; revision=117261
* Remove dead code which supported systems without O_APPEND, O_CREAT or SIGTSTP.Tim J. Robbins2002-09-291-30/+0
| | | | Notes: svn path=/head/; revision=104141
* Convert the remaining callers of errmsg() to use strerror(), and removeTim J. Robbins2002-09-291-11/+11
| | | | | | | errmsg() and its table of error messages. Notes: svn path=/head/; revision=104132
* Don't assume file descriptors fit in a short, use an int instead.Tim J. Robbins2002-07-181-1/+1
| | | | Notes: svn path=/head/; revision=100315
* Close file descriptors when [n]>&- and [n]<&- redirections are used.Tim J. Robbins2002-07-091-1/+2
| | | | | | | | | | This was broken by rev. 1.16. PR: 40334 MFC after: 1 week Notes: svn path=/head/; revision=99645
* Consistently use FBSDIDDavid E. O'Brien2002-06-301-2/+2
| | | | Notes: svn path=/head/; revision=99110
* Implement the -C (-o noclobber) option, which prevents existing regularTim J. Robbins2002-05-191-0/+11
| | | | | | | files from being overwritten by shell redirection. Notes: svn path=/head/; revision=96922
* o __P has been reovedWarner Losh2002-02-021-19/+15
| | | | | | | | | | | | | | | | | | | | | o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are. o Change int foo() { ... to int foo(void) { ... Notes: svn path=/head/; revision=90111
* The fix for >/dev/stdout, including Tor Egge's fix for the bug in theSergey Babkin2002-01-131-4/+4
| | | | | | | | | | | original attempt of the fix. And yes, this time I've tried to build world with it and it succeeded. Submitted by: Tor Egge MFC after: 1 week Notes: svn path=/head/; revision=89312
* backout rev 1.14, it's breaking things.Alfred Perlstein2001-12-241-1/+3
| | | | Notes: svn path=/head/; revision=88463
* Added ability to do ">/dev/stdout". The apsfilter people are anxiousSergey Babkin2001-12-221-3/+1
| | | | | | | | | to get it MFCed in time for release 4.5. MFC after: 2 weeks Notes: svn path=/head/; revision=88396
* Implement the <> redirection operator.Brian Somers2000-10-031-0/+21
| | | | Notes: svn path=/head/; revision=66612
* Include strerror(errno) in error messages after failed system calls.Martin Cracauer1999-11-291-1/+1
| | | | | | | Fix a warning. Notes: svn path=/head/; revision=53891
* $Id$ -> $FreeBSD$Peter Wemm1999-08-271-1/+1
| | | | Notes: svn path=/head/; revision=50471
* Add rcsid. Spelling.Philippe Charnier1998-05-181-3/+5
| | | | Notes: svn path=/head/; revision=36150
* Fix redirection of unopened file descriptors and nuke registerSteve Price1997-04-281-9/+27
| | | | | | | | | keyword usage. Obtained from: NetBSD Notes: svn path=/head/; revision=25231
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22988
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Merge in NetBSD mods and -Wall cleaning.Steve Price1996-12-141-9/+11
| | | | | | | Obtained from: NetBSD, me Notes: svn path=/head/; revision=20425
* Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is aPeter Wemm1996-09-011-18/+18
| | | | | | | | | | | | | | | | | merge of parallel duplicate work by Steve Price and myself. :-] There are some changes to the build that are my fault... mkinit.c was trying (poorly) to duplicate some of the work that make(1) is designed to do. The Makefile hackery is my fault too, the depend list was incomplete because of some explicit OBJS+= entries, so mkdep wasn't picking up their source file #includes. This closes a pile of /bin/sh PR's, but not all of them.. Submitted by: Steve Price <steve@bonsai.hiwaay.net>, peter Notes: svn path=/head/; revision=17987
* o rename ulimit -p into ulimit -u, so we are in agreement with bashJoerg Wunsch1995-10-211-1/+6
| | | | | | | | | | o fix brokeness for 1>&5 redirection, where `5' was an invalid file descriptor, but no error message has been generated o fix brokeness for redirect to/from myself case Notes: svn path=/head/; revision=11601
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-3/+3
| | | | | | | Reviewed by: phk Notes: svn path=/head/; revision=8855
* Added $Id$David Greenman1994-09-241-0/+2
| | | | Notes: svn path=/head/; revision=3044
* BSD 4.4 Lite bin SourcesRodney W. Grimes1994-05-261-0/+343
Notes: svn path=/head/; revision=1556