Jens Schweikhardt
8eed22b1a6
Fix a few typos, among them s/builtin/built-in/ (except for the ref
...
to the builtin(1) man page.) This is for consistency with the spelling
both proposed by ispell as well as IEEE Std 1003.1-2001.
MFC after: 3 days
2002-08-21 15:05:55 +00:00
Ruslan Ermilov
84a0a0eeac
mdoc(7) police: fixed the document date.
...
Submitted by: iedowse
2002-08-19 07:15:20 +00:00
Juli Mallett
3a7fc8ce59
Remove local prototypes for main().
2002-08-19 03:07:56 +00:00
Tim J. Robbins
4f8fa749f0
Avoid accessing the current job's process table in the child part of
...
forkshell() after it has been freed. This caused mysterious behaviour
when anything but the first command in a pipeline tried to access the
terminal when the `junk' malloc() option was enabled (which is the default).
2002-08-18 06:43:44 +00:00
Tim J. Robbins
6c56d93528
Show job control ID, command text, etc. when foreground processes are
...
suspended. This is a followup to rev. 1.51.
MFC after: 1 week
2002-08-17 13:57:47 +00:00
Johan Karlsson
e849cfacaa
Bump document date for the -n option.
...
Approved by: sheldonh (mentor)
2002-08-16 03:13:59 +00:00
Maxim Konovalov
6c62b0477e
o Backout rev. 1.40 and rev. 1.49.
...
o Add argv[] boudary check.
PR: bin/40117
Reviewed by: silence on -audit
MFC after: 2 months
2002-08-15 14:53:20 +00:00
Tim J. Robbins
ad2eaa7e87
Claim conformance to 1003.2-1992 instead of 1003.1-2001 due to doubts
...
raised by Lukas Ertl over symbolic link handling.
PR: 41576
MFC after: 1 week
2002-08-12 12:34:03 +00:00
Jens Schweikhardt
2b239dd118
Fix typos; each file has at least one s/seperat/separat/
...
(I skipped those in contrib/, gnu/ and crypto/)
While I was at it, fixed a lot more found by ispell that I
could identify with certainty to be errors. All of these
were in comments or text, not in actual code.
Suggested by: bde
MFC after: 3 days
2002-08-11 13:05:30 +00:00
Tim J. Robbins
d8d737d751
Allow redirections by themselves between "&&" and "||" operators.
...
For example, >/dev/null && echo foo
Pointed out by: FUJISHIMA Satsuki
MFC after: 1 week
2002-08-11 03:04:23 +00:00
Maxime Henrion
5965373e69
- Introduce a new struct xvfsconf, the userland version of struct vfsconf.
...
- Make getvfsbyname() take a struct xvfsconf *.
- Convert several consumers of getvfsbyname() to use struct xvfsconf.
- Correct the getvfsbyname.3 manpage.
- Create a new vfs.conflist sysctl to dump all the struct xvfsconf in the
kernel, and rewrite getvfsbyname() to use this instead of the weird
existing API.
- Convert some {set,get,end}vfsent() consumers to use the new vfs.conflist
sysctl.
- Convert a vfsload() call in nfsiod.c to kldload() and remove the useless
vfsisloadable() and endvfsent() calls.
- Add a warning printf() in vfs_sysctl() to tell people they are using
an old userland.
After these changes, it's possible to modify struct vfsconf without
breaking the binary compatibility. Please note that these changes don't
break this compatibility either.
When bp will have updated mount_smbfs(8) with the patch I sent him, there
will be no more consumers of the {set,get,end}vfsent(), vfsisloadable()
and vfsload() API, and I will promptly delete it.
2002-08-10 20:19:04 +00:00
Hajimu UMEMOTO
cc0f2cfaca
IPv6 support for rcp.
...
You cannot specify a raw IPv6 address for now.
MFC after: 1 week
2002-08-09 16:12:08 +00:00
Ruslan Ermilov
9ba31ca074
mdoc(7) police: tidying.
2002-08-09 10:59:20 +00:00
Ruslan Ermilov
43cf90aa10
mdoc(7) police: whitespace nits.
2002-08-09 10:49:50 +00:00
Ruslan Ermilov
ca38f0ddf7
mdoc(7) police: tidy up, bump document date on behalf of the -n option.
2002-08-09 10:46:00 +00:00
Ruslan Ermilov
c3ff3e424c
mdoc(7) police: grammar.
2002-08-09 10:38:34 +00:00
Ruslan Ermilov
154f47dd8d
mdoc(7) police: kill hard sentence breaks and one double space.
2002-08-09 10:34:57 +00:00
David E. O'Brien
30d90946d1
Allow "-v -v" to mean very verbose.
...
Reviewed by: freebsd-standards
PR: 40709
Submitted by: Edward Brocklesby <nighthawk@unrealircd.com>, johan
2002-08-04 05:29:13 +00:00
Mark Murray
5bb23f3653
Remove the last reference to NOUUCP - we don't have UUCP in the base
...
system.
2002-08-02 10:55:51 +00:00
Mark Murray
f193e3fc68
Fix an easy WARNS.
2002-07-31 16:53:59 +00:00
Mark Murray
13fcef50d0
Fix some easy WARNS.
2002-07-31 16:52:16 +00:00
Mark Murray
9f82c1d3b1
Give lint a small bit of help.
2002-07-31 16:50:21 +00:00
David Malone
6576952ca5
Make test check the tv_nsec part of a struct stat when comparing
...
the mtimes of a file. (This is probably only useful if you have
vfs.timestamp_precision set to something nonzero).
PR: 39163
Submitted by: Hal Burch <hburch@lumeta.com>
MFC after: 2 weeks
2002-07-27 22:53:44 +00:00
Tim J. Robbins
7e1975c2b2
Add a -P/-o physical option which behaves similarly to bash/ksh's options
...
by the same name. This option makes the cd and pwd builtins behave physically
(as opposed to logically) by default.
Submitted by: fanf
2002-07-25 10:57:39 +00:00
Tim J. Robbins
050f7913c9
Set opterr to zero to avoid duplicate warnings from getopt(3) for unknown
...
options.
2002-07-25 10:47:38 +00:00
Tim J. Robbins
93c0dc5ea6
Use PATH_MAX instead of a local guess at it, which happened to be incorrect.
...
Suggested by: fanf
2002-07-25 09:56:08 +00:00
Tim J. Robbins
b5ae692823
pwdcmd()'s argc and argv arguments are no longer unused, remove __unused.
...
Pointed out by: fanf
2002-07-25 09:46:31 +00:00
Mark Peek
317aee9760
Remove WARNS and WFORMAT overrides.
2002-07-24 22:26:44 +00:00
Tim J. Robbins
be58cc483e
Avoid calling el_resize() from a signal handler, even though libedit
...
itself does that if you set EL_SIGNAL. Instead, set a flag and check it
before calling el_gets(). This is safer, but slower to respond to changes.
Pointed out by: mp
2002-07-24 02:06:07 +00:00
Tim J. Robbins
9de7305e58
Catch SIGWINCH in interactive shells and call el_resize() to update
...
libedit's idea of the window size.
2002-07-23 15:05:00 +00:00
Tim J. Robbins
ecd807fb6d
Call el_source() to read the contents of .editrc when line editing is enabled.
...
Obtained from: NetBSD
MFC after: 2 weeks
2002-07-23 12:26:34 +00:00
Tim J. Robbins
088acf9001
Add a `bind' builtin command, which is simply a wrapper around libedit's
...
builtin command of the same name. This allows the key bindings for the
shell's line editor to be changed.
MFC after: 2 weeks
2002-07-23 11:50:53 +00:00
Johan Karlsson
786c276fe4
Add the -n option, which automatically answers "no" to the overwrite question.
...
PR: 7828
Suggested by: Daniel O'Connor <doconnor@gsoft.com.au>
Approved by: sheldonh (mentor)
MFC after: 2 weeks
2002-07-23 00:42:56 +00:00
Tim J. Robbins
776600e6de
Don't allow "||" or "&&" to be the first tokens of a command.
...
PR: 40386
MFC after: 2 weeks
2002-07-22 05:50:12 +00:00
Tim J. Robbins
2babaf74b5
Implement the P1003.2 `command' builtin command, which is used to suppress
...
shell function and alias lookup. The -p option has been implemented, the
UPE -v and -V options have not. The old `command' command has been renamed
to `builtin'.
2002-07-21 06:49:14 +00:00
Tim J. Robbins
558175ca15
Document that only one of the -n and -e options may be specified for
...
sh(1)'s echo(1) builtin command.
PR: 32935, 40747
MFC after: 1 week
2002-07-20 04:39:23 +00:00
Tim J. Robbins
2628ebdbd1
Remove broken and incomplete support for old releases of System V,
...
don't support system that implement getcwd(3) with a pipe to /bin/pwd.
2002-07-19 08:09:04 +00:00
Tim J. Robbins
5b99fa0514
Don't assume file descriptors fit in a short, use an int instead.
2002-07-18 12:24:35 +00:00
Tim J. Robbins
b80be28218
Avoid using ints or shorts to store process id's, use pid_t instead.
...
The pgrp member of struct job was declared as a short and could not store
every possible process group ID value, the rest of them were benign because
pid_t happens to be an int.
2002-07-18 10:22:42 +00:00
Tim J. Robbins
f1ae2c66c8
Make the message that is printed when the foreground process is terminated
...
by a signal the same as pdksh/bash/sh before rev. 1.34.
2002-07-18 09:37:51 +00:00
Sheldon Hearn
ced4deb156
Revert previous delta, which is not required with rev 1.5 of
...
src/contrib/gcc/c-format.c .
2002-07-15 12:08:21 +00:00
Giorgos Keramidas
cd8fb74d84
Fix a couple of typos in a comment.
...
PR: docs/33559
Submitted by: Marc Olzheim <marcolz@ilse.nl>
2002-07-15 02:03:30 +00:00
Tim J. Robbins
90833c99de
Complain if more than one file argument is given to unlink(1) like we did
...
before I made unlink use getopt().
2002-07-12 07:20:20 +00:00
Giorgos Keramidas
b11b570d7b
Don't duplicate the description of the sticky bit that is already
...
part of chmod(2) and sticky(8), but refer to those manpages instead.
PR: docs/35605
Submitted by: Gary W. Swearingen <swear@blarg.net>
2002-07-12 01:57:44 +00:00
Bruce Evans
c1f903a031
Fixed a printf format error that was fatal on alphas. Adding WFORMAT=0
...
to the Makefile didn't affect this bug because WFORMAT only controls
higher- level format checking (not the -Wformat that is implicit in
-Wall).
Fixed a nearby printf format error that was benign and 3 nearby style bugs.
2002-07-11 17:28:29 +00:00
Sheldon Hearn
a3ee32f3f7
Set WFORMAT=0, because our compiler currently complains about NULL
...
arg 2 to err() and friends, and warnings are promoted to errors.
This allows the following revisions to be reverted:
rev 1.39 src/bin/cp/cp.c
rev 1.26 src/bin/chmod/chmod.c
rev 1.40 src/bin/rm/rm.c
The following revisions can already be reverted, because they were
already covered by WFORMAT=0:
rev 1.8 src/bin/ls/lomac.c
rev 1.63 src/bin/ls/ls.c
rev 1.8 src/bin/ps/lomac.c
rev 1.34 src/bin/rcp/rcp.c
2002-07-11 08:45:38 +00:00
Tim J. Robbins
6c8bbe749e
Don't assume the shell's controlling terminal is attached to file descriptor
...
2. Instead, open /dev/tty. This problem stopped commands in subshells from
being executed correctly if standard error was redirected.
PR: 36671
Obtained from: NetBSD (but simplified)
2002-07-11 06:42:11 +00:00
Tim J. Robbins
17f08ec1bc
Remove support for the "old" tty driver by unifdef -UOLD_TTY_DRIVER;
...
many other parts of the shell are no longer compatible with this, and it
makes jobs.c quite cluttered with #ifdef's.
2002-07-11 06:26:48 +00:00
Tim J. Robbins
0d3d4c12c3
When growing the job table, don't relocate the jobmru pointer if it's NULL.
2002-07-11 04:22:41 +00:00
Matthew Dillon
5ad9e45f96
err() is documented as allowing NULL for the format string but GCC isn't
...
happy about it any more so change the usage to make buildworld work again.
2002-07-10 20:44:55 +00:00
Matthew Dillon
3951e2ab28
err() is documented as allowing NULL for the format string but GCC isn't
...
happy about it any more so change the useage so buildworld works again.
2002-07-10 20:36:25 +00:00
Johan Karlsson
0f7109e8c2
Update usage for the addition of -n in rev 1.35 of mv.c.
...
Approved by: obrien, sheldonh (mentor).
2002-07-09 17:45:13 +00:00
Tim J. Robbins
ce80ed021f
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
Tim J. Robbins
907354479f
Print out commands with NTOFD/NFROMFD redirections that close the
...
descriptors (">&-" or similar) correctly in the jobs(1) command.
2002-07-09 03:26:47 +00:00
Juli Mallett
7ed0457457
Bring back WFORMAT=0.
2002-07-08 15:48:39 +00:00
Robert Drehmel
a755f1c9d0
- Use (MAXLOGNAME - 1) where UT_NAMESIZE was used to be able to
...
(-)remove the inclusions of <utmp.h>.
2002-07-08 09:08:51 +00:00
Juli Mallett
ffe25988bd
Make printval() take a 'void *' thus negating any assumptions the compiler
...
may try to make about the alignment of the dereferenced datum.
2002-07-07 21:45:59 +00:00
Philippe Charnier
4690560d06
The .Nm utility
2002-07-06 19:13:21 +00:00
Mike Barcroft
0ad736e62b
Don't depend on pollution in <limits.h> for the definition of
...
<stdint.h> macros.
2002-07-05 15:58:27 +00:00
Maxim Konovalov
27f3fb1aad
Fix a memory leak.
...
PR: bin/40177
MFC after: 1 week
2002-07-05 10:27:34 +00:00
Ruslan Ermilov
73ca71fef9
mdoc(7) police: a bit of tidying.
2002-07-04 13:22:22 +00:00
Mark Murray
7ede89e44b
Fix some low-hanging lint-fruit: endianness and staticness warnings.
2002-07-03 16:35:20 +00:00
Matthew Dillon
2d41ef4b59
Fix type-o in last commit in preparation for MFC.
2002-07-02 19:06:33 +00:00
Ruslan Ermilov
8479adc1d3
Reimplemented bsd.nls.mk using bsd.files.mk and bsd.links.mk.
...
Provided the (previously missing) dependency on source files
for intermediate .msg files.
Provided the default for NLSSRCDIR (defaults to .CURDIR).
Slightly changed the API: NLS should now list plain locale
names, without the .msg suffix.
When included from bsd.prog.mk, NLSNAME defaults to PROG.
2002-07-02 12:37:09 +00:00
David Malone
0567678261
Remove double #include <sys/cdef.h> and __FBSDID.
...
PR: 40053
Submitted by: Dan Lukes <dan@obluda.cz>
2002-07-01 10:46:39 +00:00
Tim J. Robbins
90f72c844e
Put documentation of the -m option's argument in its list tag in the
...
Description section for consistency with other manpages.
2002-06-30 06:50:16 +00:00
David E. O'Brien
e026a48c34
Consistently use FBSDID
2002-06-30 05:25:07 +00:00
David E. O'Brien
2749b14129
Consistently use FBSDID
2002-06-30 05:15:05 +00:00
David E. O'Brien
5eb43ac2f7
Consistently use __FBSDID
2002-06-30 05:13:54 +00:00
Tim J. Robbins
88485b4a2f
Avoid truncating the pathname to UNIX Domain Sockets with snprintf(),
...
giving a more sensible warning when the (relatively meagre) sun_path
limit is exceeded.
2002-06-29 04:52:33 +00:00
Tim J. Robbins
a24ce1c859
Check that snprintf() does not truncate the destination pathname when
...
linking into a directory.
2002-06-29 04:10:40 +00:00
Sheldon Hearn
62df9b6286
Document addition of RLIMIT_VMEM support, added in rev 1.26 of miscbltin.c.
2002-06-27 16:56:45 +00:00
Matthew Dillon
085b9f3eb2
Add support for RLIMIT_VMEM. The #ifdef's were already there but getopt()
...
needed to be adjusted.
2002-06-26 00:29:53 +00:00
Tim J. Robbins
bdb9494ae8
ln(1)'s symbolic link handling conforms to IEEE Std. 1003.1-2001, note
...
this in the Standards section.
2002-06-25 10:02:12 +00:00
Tim J. Robbins
9c24ed854c
Correctly mark up the final command line arguments with the Ar macro for
...
the last two synopsis forms.
2002-06-25 09:58:29 +00:00
Giorgos Keramidas
09152a86ff
Add a description of the restrictions that red(1) imposes to users,
...
and a warning that this "restricted mode" can be bypassed easily by
using symlinks, so that users don't depend too much on it.
PR: docs/35940
Submitted by: Gary W. Swearingen <swear@blarg.net>
Reviewed by: jmallett
MFC after: 1 week
2002-06-24 22:06:47 +00:00
Maxim Sobolev
41623b2d75
Don't try to decode old-style options if the argv[1] begins with `-' and the
...
second character represents some option taking an argument. This fixes
problem when ps(1) is invoked for examply as follows:
$ ps -Ufoobar1234
the above example results in option string being interpreted as
-U foobarp1234 - note extra `p'.
Reported by: Vladimir Sotnikov <vovan@kyivstar.net>
MFC after: 2 weeks
2002-06-20 14:55:53 +00:00
Juli Mallett
49d54362f1
Bogusness may have happened using a variable assignment here before, but
...
proper parens mean that fd is always set by open(2) [in any part of C],
and so we can accurately check for it returning -1, without feeling like
we need to initialise fd to -1 in its declaration.
In other words, fix a stylistic/bogus nit.
2002-06-20 07:15:55 +00:00
Juli Mallett
6953dff37c
Use size_t consistently and complete some uncompleted code resulting in a
...
memory leak by assigning and freeing a variable appropriately as well as
keeping track of the amount of allocated ram properly.
MFC after: 1 month
2002-06-20 06:00:51 +00:00
Juli Mallett
0e6c085ae6
We have a place for extern declarations of global variables in ed.h, do not
...
use main() to do it locally.
2002-06-20 05:28:02 +00:00
Juli Mallett
4e17884ffe
Remove two unused variables.
2002-06-20 05:21:43 +00:00
Juli Mallett
8b7808bc49
Minor const cleanup.
...
Don't discard qualifiers we don't need to discard.
2002-06-20 05:20:50 +00:00
Tim J. Robbins
029c8ee4fa
Bring documentation on CDPATH and its effects on cd(1) back into sync with
...
reality (and POSIX): current directory isn't searched unless CDPATH has
a "." element or is unset.
PR: 38442
Submitted by: oleg dashevskii <be9@be9.ru>
MFC after: 1 week
2002-06-19 12:04:22 +00:00
Tim J. Robbins
9a81395d08
When trying to emulate a cross-device move operation with cp and rm, add
...
a "--" argument after the options so filenames with leading dashes are
handled correctly.
PR: 39318
Submitted by: Serge van den Boom <svdb@stack.nl>
MFC after: 1 week
2002-06-16 04:06:58 +00:00
Juli Mallett
ca2be2ff45
Use an usage() rather than doing the fprintf inside option parsing.
2002-06-14 09:54:48 +00:00
Tim J. Robbins
f9dc2a8b93
When -R is not specified, fail to copy the contents of dangling symlinks
...
instead of making a copy of the link itself (SUSv3)
Obtained from: NetBSD
2002-06-13 15:48:36 +00:00
Tim J. Robbins
bf5f0c446e
Print the "$" symbol on blank lines when the -s and -e options are used
...
together.
Obtained from: OpenBSD (millert, Denis Afonin)
2002-06-13 14:05:26 +00:00
Tim J. Robbins
99cc224074
Remove bogus "-" operand from usage message. There is no restriction on
...
where it may be placed, it is treated the same as the file arguments.
2002-06-13 13:45:14 +00:00
Tim J. Robbins
993895ac33
Markup nits: use the Ar macro when describing the -signal_name and
...
-signal_number options, and for referring to the "pid" argument.
2002-06-13 08:46:01 +00:00
Tim J. Robbins
16a6357c9b
Add examples and diagnostics sections
2002-06-13 08:40:01 +00:00
Tim J. Robbins
08de34ac01
Support the "--" end of options marker, useful to disambiguate between
...
signal numbers and process groups (negative pid arguments), and
required by SUSv3.
2002-06-13 08:07:20 +00:00
Tim J. Robbins
83952a118b
Don't list shell builtins when the hash command is used (SUSv3)
2002-06-13 07:50:50 +00:00
Juli Mallett
7140a0e9f1
ps(1) appeared in v4
...
Submitted by: grog
2002-06-10 22:48:51 +00:00
Tim J. Robbins
43d088bea2
Sort sections, use Ex macro in Diagnostics section, point out that the first
...
example only works with csh(1).
2002-06-10 09:33:15 +00:00
Tim J. Robbins
91c0081804
Add History section. sleep appeared in v4.
2002-06-10 09:07:22 +00:00
Juli Mallett
a13d4e42c2
Note early appearence of some commands. These actually appeared in PWB, but
...
it seems we don't have a macro for that yet, so list them in the first UNIX
release since then that we have a .At for: v7.
2002-06-10 05:03:20 +00:00
Giorgos Keramidas
e02ef09616
Use socklen_t for the length of a socket structure instead of `int'.
...
Reviewed by: mike
2002-06-09 04:18:45 +00:00
Giorgos Keramidas
a7c1ac2f62
Replace <strings.h> with <string.h>. No functions from the former are
...
used in this file, and strlen() needs to be prototyped by the latter,
for this to compile without warnings.
Reviewed by: mike
2002-06-09 04:15:40 +00:00
Mike Barcroft
f3a09c6c9b
Check the return value of getcwd() to avoid printf()ing a NULL. Mark
...
usage() as __dead2 to avoid a GCC warning.
Spotted by: keramida
2002-06-09 00:46:24 +00:00
Juli Mallett
2dda9fe910
Allow whitespace to act as a delimiter in the keywords list given to the -o,
...
again, but also allow it in the user-specified header, too. This is far more
backwards compatible and SUSv3-happy than allowing only comma to seperate the
keywords list.
Submitted by: tjr
2002-06-08 18:11:52 +00:00