Commit Graph

21 Commits

Author SHA1 Message Date
tjr
ffdff27dcb Don't assume file descriptors fit in a short, use an int instead. 2002-07-18 12:24:35 +00:00
tjr
7b44fca61b Close file descriptors when [n]>&- and [n]<&- redirections are used.
This was broken by rev. 1.16.

PR:		40334
MFC after:	1 week
2002-07-09 08:55:46 +00:00
obrien
3ba7184ea6 Consistently use FBSDID 2002-06-30 05:15:05 +00:00
tjr
b377469669 Implement the -C (-o noclobber) option, which prevents existing regular
files from being overwritten by shell redirection.
2002-05-19 06:03:05 +00:00
imp
0e892b7d8f o __P has been reoved
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)
	{
	...
2002-02-02 06:50:57 +00:00
babkin
214dd0e3ed The fix for >/dev/stdout, including Tor Egge's fix for the bug in the
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
2002-01-13 14:37:40 +00:00
alfred
8e7cd40c66 backout rev 1.14, it's breaking things. 2001-12-24 22:27:04 +00:00
babkin
cba018e2fe Added ability to do ">/dev/stdout". The apsfilter people are anxious
to get it MFCed in time for release 4.5.

MFC after: 2 weeks
2001-12-22 02:40:58 +00:00
brian
bf78ed595f Implement the <> redirection operator. 2000-10-03 23:13:14 +00:00
cracauer
fc301cf926 Include strerror(errno) in error messages after failed system calls.
Fix a warning.
1999-11-29 19:11:01 +00:00
peter
3b7c52fb9a $Id$ -> $FreeBSD$ 1999-08-27 23:15:48 +00:00
charnier
ce4a22c986 Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
steve
14b3c0a4f8 Fix redirection of unopened file descriptors and nuke register
keyword usage.

Obtained from: NetBSD
1997-04-28 03:25:13 +00:00
peter
34fd560164 Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
jkh
9c0cd3f9df Make the long-awaited change from $Id$ to $FreeBSD$
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.
1997-01-14 07:20:47 +00:00
steve
5b1f411348 Merge in NetBSD mods and -Wall cleaning.
Obtained from: NetBSD, me
1996-12-14 06:20:03 +00:00
peter
db1e9c387e Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is a
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
1996-09-01 10:22:36 +00:00
joerg
4e0f66cc79 o rename ulimit -p into ulimit -u, so we are in agreement with bash
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
1995-10-21 00:47:32 +00:00
rgrimes
e6999472c1 Remove trailing whitespace.
Reviewed by:	phk
1995-05-30 00:07:29 +00:00
dg
00eb2a4dc0 Added $Id$ 1994-09-24 02:59:15 +00:00
rgrimes
e3cfc8ce61 BSD 4.4 Lite bin Sources 1994-05-26 06:18:55 +00:00