Commit Graph

196 Commits

Author SHA1 Message Date
peter
6470cdf2a0 This commit was generated by cvs2svn to compensate for changes in r13122,
which included commits to RCS files with non-trunk default branches.
1995-12-30 19:02:48 +00:00
joerg
65600dbbe6 Print dev minor #'s > 255 in hex.
Reviewed by:	jkh, kuku, phk
1995-12-30 18:15:30 +00:00
joerg
b47c269c8d Small man page tweaks:
. mention the need for procfs
. make it clear that default sorting is first by ctty, then by PID

Submitted by: schweikh@ito.uni-stuttgart.de (Jens Schweikhardt)
1995-12-30 13:52:02 +00:00
peter
9b80d26c22 Implement a new option to ps.. `-U username'. This allows you to
list the processes belonging to a particular user without having to use
`-u' and grepping for the username.  Basically you can now get a short
`ps -x' like list (with more space for the command) for other users.
1995-12-26 03:38:55 +00:00
bde
64aab4356c Restored formatting from the old printf/printf.c. 1995-12-14 23:19:36 +00:00
joerg
2dd6ac9b28 The shell incorrectly gave & precedence over ;. This breaks the
traditional behaviour, and it violates Posix.2.

Fixes PR # bin/880: /bin/sh incorrectly parse...

Fixes also an earlier problem report about the shell not evaluating
loops correctly.  (Not files via GNATS.)

Submitted by:	nnd@itfs.nsk.su (Nickolay N. Dudorov)
1995-12-10 17:59:23 +00:00
joerg
402a79f826 Move out some of the shell builtin bogosity from printf's source to
sh's builtin/bltin.h.
1995-12-10 15:40:42 +00:00
joerg
80972db9d7 Fix my own brokeness for the colon operator, when one of the arguments
was a valid integer.  The actual decision between integer and string
is now context-dependant on the operator being used.
1995-11-18 18:05:03 +00:00
peter
0017db9c16 A fix for the "cd -" coredump on a brand new /bin/sh. The problem was
noticed on a NetBSD bugs mailing list but this is entirely my own work.

Inspired by: Scott Reynolds <scottr@plexus.com>, for NetBSD
1995-11-14 01:04:52 +00:00
bde
8405e72006 Fixed descriptions of ignpar and parmrk. 1995-11-11 03:31:13 +00:00
peter
bce518cbd3 Implement allowing 'set -v' in the middle of a script to work.
This means that a script containing:
  echo 1
  set -v
  echo 2
will now produce output, like it does on SYSV machines and other 'proper'
/bin/sh implementations..

This is done by a slight restructure of the input processor allowing it to
read chunks from the file at a time, but process the data by line from the
chunk.

Obtained from:  Christos Zoulas for NetBSD. <christos@deshaw.com>
1995-11-03 18:50:14 +00:00
phk
1acffefabf I add #include <sys/user.h> 1995-10-28 20:11:18 +00:00
ache
b7d0978d02 Fix -h option:
sense symlink even it is unresolved
1995-10-28 11:54:42 +00:00
ache
1ffe3ce1a3 Change local to LC_ALL, there is no bitmask 1995-10-26 10:57:52 +00:00
ache
4ce0ca17af Change locale to LC_ALL, there no bitmask 1995-10-26 10:56:38 +00:00
torstenb
e9d3587ad5 fix bad dependencies (LIBMATH -> LIBM) 1995-10-25 15:08:21 +00:00
ache
2fd134db5b Add missing reaction on LC_ALL and LC_COLLATE 1995-10-23 23:08:26 +00:00
ache
3424b01c58 Add setlocale LC_CTYPE 1995-10-23 21:31:48 +00:00
ache
155f394f94 Remove unneded ctype.h everywhere
Add setlocale LC_TIME
1995-10-23 21:23:27 +00:00
ache
519d86dc6b Change LC_ALL to LC_CTYPE|LC_TIME - small optimization 1995-10-23 21:09:01 +00:00
ache
c525beefdf Add setlocale LC_CTYPE|LC_TIME 1995-10-23 21:06:31 +00:00
ache
44c7c30479 Remove unneded ctype.h 1995-10-23 21:03:40 +00:00
ache
319f1da108 Add setlocale LC_ALL 1995-10-23 20:36:26 +00:00
ache
c1cc65762e Add setlocale(LC_TIME,... 1995-10-23 20:26:53 +00:00
ache
33460f5501 Wrong library was picked by ed 1995-10-22 20:14:13 +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
joerg
e988562d76 Implement the "ulimit" builtin. This is the analogon to csh's "limit"
command and badly needed in sh(1) for everybody who wants to modify
the system-wide limits from inside /etc/rc.

The options are similar to other system's implemantations of this
command, with the FreeBSD additions for -m (memoryuse) and -p (max
processes) that are not available on other systems.
1995-10-19 18:42:12 +00:00
joerg
56e0173839 Fix my breakage of the $0 handling during $ENV processing.
Since the broken version went into 2.1, this fix should, too.
1995-10-09 17:56:32 +00:00
bde
e9c97c811b Handle trailing slashes in source filenames correctly. E.g., rewrite
`mv foo/ ../..' to `mv foo/ ../../foo/', not to `mv foo/ ../../'.  The
latter caused a panic.  Before the trailing slash changes in the kernel,
the trailing slashes caused the rename() for this mv to fail earlier, so
there was no panic in 2.0.

Fixes part of PR 760.
1995-10-07 10:42:48 +00:00
markm
6bdec36c43 Correctly build the secure ed(1) only if secure/ exists.
Pointed out by:	bde
1995-10-03 15:44:50 +00:00
bde
243b088ed2 Preserve sticky bit for cp -pR'. It was already preserved for cp -R'.
This also fixes loss of the sticky bit for `mv' across file systems.
1995-10-03 12:55:01 +00:00
bde
9329cb6b3c Fix exit status. `cat no-such-file >/dev/null' exited with status 0.
This has been broken since cat's own err() function was sloppily
replaced by the library functions warn() and err().
1995-10-03 12:46:37 +00:00
joerg
c80589d3b0 Make the mkinit internal command issue an #undef for each #define, to
avoid "duplicate definition" warnings.
1995-10-01 15:13:31 +00:00
joerg
28020fbce3 Posixize:
sh  -c [-aCefinuvx] command_string [ command_name [argument ...]  ]        1

 4.56.3  Options

    -c          Read commands from the command_string operand.  Set the
                value of special parameter 0 (see 3.5.2) from the value of
                the command_name operand and the positional parameters
                ($1, $2, etc.) in sequence from the remaining argument
                operands.

Pointed out by: Kaleb Keithly (kaleb@x.org)
1995-10-01 15:11:42 +00:00
markm
78f711b914 Define CRYPTOBJDIR if secure is being built 1995-10-01 14:55:06 +00:00
markm
a00c541511 ed/Makefile is able to 'decide' for itself whether to build secure or
unceumbered ed. Remove the superfluous .if (...) / .endif
1995-10-01 14:24:01 +00:00
markm
05683329e7 Use the same make technique as passwd and xntpd for the secure ed(1). This
will allow the secure/bin/ed directory to be cleaned out and the bin/Makefile
to be cleaned up.
1995-10-01 14:17:29 +00:00
ache
e86c819403 Build secure ed if available and allowed 1995-09-29 19:31:55 +00:00
peter
69c296a7e8 Correct the alignment of the tty column, which was affected by my change to
allow more than two tty characters.

David Greenman pointed out that when a process that had been revoked from
it's controlling tty, the "-" sign was detached from any two-character
names.
1995-09-26 17:48:59 +00:00
mpp
fa60684197 Uncomment out references to FIFOs for the -F and -l options.
Also mention sockets in the text for -F.

Partially obtained from the NetBSD commit mail list.
1995-09-26 08:48:09 +00:00
bde
639631b078 Fix relocation of job table.
while { sleep 1 & wait; } do echo 1; done

corrupted the job table every 4th iteration.
1995-09-21 13:24:20 +00:00
dg
299dbda765 Don't dereference a NULL pointer in the case of a null pipe.
e.g.:
ls |> foo.out

sh now behaves the same as it does under SunOS 4.x for this case.
1995-09-20 08:30:56 +00:00
pst
17129ca39c If mail is received with no from address, invoke sendmail with
/usr/sbin/sendmail -f <> dest
rather than
	/usr/sbin/sendmail -f dest.

Submitted by:  Michael Butler <imb@scgt.oz.au>
Obtained from: Eric Allman <eric@cs.berkeley.edu>
1995-09-16 18:52:51 +00:00
markm
8a8e624232 Updating /usr/include/kerberosIV/des.h so eBones will build breaks
rcp and rlogin.
(patch supplied)

Submitted by:  John Capo <jc@irbs.com>
1995-09-10 14:59:51 +00:00
peter
bbe961035e Increase the tty column width from 2 to 3 characters.
This gives us more room to breath with tty names, especially with drivers
that support large numbers of ports..  eg: specialix and digiboard.

This does not actually change the current tty names, it just allows room
for reporting more characters if the drivers use them.
1995-09-04 01:22:54 +00:00
jkh
bba017cc52 Well, it would appear that the "ayes" have it (though by a slim margin).
Apply my \c changes to echo.  It should also be noted that this is:
A) going into 2.2, not 2.1
B) a functional no-op unless you actually use it!
1995-08-31 17:25:55 +00:00
joerg
1c542fcb27 Sigh. This will become a never ending story. :-(
When comparing my recent parser change against the ash in 1.1.5.1, i
found that a couple of other problems in the same area has been fixed
there, but not in 2.2.  Semicolons and EOF do also delimit words...
1995-08-28 19:24:35 +00:00
dg
bb2bb18746 Correct the default format info to indicate "%+". 1995-08-28 10:38:01 +00:00
joerg
48a19ede59 Make the shell handle a null command in a &&/|| sequence correctly.
The && and || tokens do also terminate a command, not only the
newline.

While i was at it, disabled trace code by default, it served no good
purpose since it required the use of a debugger anyway to be turned
on.  Instead, placed a hint in the Makefile on how to turn it on.

This makes the shell ~ 10 % faster and ~ 4 KB smaller. :)

Pointed out by:  jan@physik.TU-Berlin.DE (Jan Riedinger)
1995-08-27 20:26:44 +00:00
pst
8bfad523d3 Clean up compilation warnings. 1995-08-23 05:31:06 +00:00