Commit Graph

655 Commits

Author SHA1 Message Date
tegge
f36aa446c7 Better handling of word splitting. Don't record the same region
multiple times when performing nested variable expansion, and
preserve some quoting information in order to avoid removing
apparently empty expansion result.
1998-09-06 21:13:09 +00:00
tegge
a860e83ccf Don't blindly eliminate `..' and the previous pathname component.
PR:		2541
Obtained from:	NetBSD
1998-09-06 21:01:57 +00:00
gpalmer
40e05a5967 Split lines into one subdir per line. 1998-08-30 20:22:15 +00:00
cracauer
faa80805b8 Improve bookkeeping of in_waitcmd and style fixes.
Submitted by:	Bruce Evans
1998-08-25 09:33:34 +00:00
cracauer
c7345be909 Re-enable killing childs with SIGQUIT. Spotted by Bruce Evans. 1998-08-25 08:49:47 +00:00
cracauer
2a3e4713ee Got two volatile sig_atomic_t and int mixed up. Spotted by Gary Palmer. 1998-08-24 19:15:48 +00:00
cracauer
8e91e03b52 Do not exit on SIGINT in non-interactive shells, fixes PR 1206,
i.e. this makes emacs usable from system(3). Programs called from
shellscripts are now required to exit with proper signal status. That
means, they have to kill themself. Exiting with faked numerical exit
code is not sufficient.

Exit with proper signal status if script exits on signal.

Make the wait builtin interruptable, both with and without traps set.

Use volatile sig_atomic_t where (and only where) appropriate.

(Almost) fix printing of newlines on SIGINT.

Make traps setable from trap handlers. This is needed for shellscripts
that catch SIGINT for cleanup work but intend to exit on it, hance
have to kill themself from a trap handler. I.e. mkdep.

While I'm at it, make it -Wall clean. -Wall is not enabled in
Makefile, since vararg warnx() macro calls in usr.bin/printf/printf.c
are not -Wall-able.
PR:		1206
Obtained from:	Basic SIGINT fix from Bruce Evans
1998-08-24 10:20:37 +00:00
jb
b4bc01338c Now that alpha uses FreeBSD syscalls, all these work. 1998-08-15 12:27:23 +00:00
dfr
e4f9ef383b Silence some warnings when building on the alpha. 1998-08-07 09:39:11 +00:00
markm
57b61e8f72 Fix LIBDIR (for aout/ELF). 1998-08-06 21:41:13 +00:00
peter
4aa8de6c93 Use sendmail-8.9.1 rmail (with our changes). 1998-08-04 15:19:16 +00:00
hoek
e36161539d Add missing "else", without whom the prev. commit is a null change.
Fix a 2nd level indentation style bug.
1998-08-02 22:47:11 +00:00
bde
3f732f34de Fixed printf format errors (time_t is not necessarily long). 1998-08-02 14:25:24 +00:00
jkoshy
856cedc623 Document behaviour of "-" and "--" on the command line.
PR: docs/5399
1998-07-30 04:47:56 +00:00
hoek
4f1070b467 Allow env. variable LS_COLWIDTHS to specify minimum column widths,
effectively overriding the dynamically-sized-column feature.  This
is mostly useful for non-interactive use, where it may be necessary
to ensure that listings taken at different times have columns that
line-up correctly.  I have been assured that at least one large,
well-known program will soon be taking advantage of this.  :-)

PR:		bin/7011
Submitted by:	Joel Ray Holveck <joelh@gnu.org>
1998-07-29 00:46:13 +00:00
nectar
0f39023431 Document the printf built-in. 1998-07-27 21:31:19 +00:00
nectar
428e532ccc csh built-in printf now expands arguments. e.g.
printf '%d\n' `echo 23`
now works as expected.
PR:		bin/2969
Submitted by:	Gareth McCaughan <gjm11@dpmms.cam.ac.uk>
1998-07-27 21:15:52 +00:00
jkoshy
3dcf71440e Fix use of -man macro, correct description of the behaviour of the `+n'
command to match whats there in the source.

PR: 7328
1998-07-21 04:53:18 +00:00
bde
44bb68bb37 Added a `build-tools' target for internal tools.
Removed explicit dependencies of foo.o on foo.c.  These were mainly
placeholders for comments about missing dependencies of tools objects
on headers.  This problem needs to be handled more generally.
1998-07-07 01:06:58 +00:00
phk
1a1b91e398 Pick up kernel variables/constants using sysctl rather than through /dev/mem
Use /dev/null for opening the kvm library, we don't need access to /dev/mem
anymore.

ps can now run without the setgid(kmem) bit.  If it does it will not be
able to show argv/envp for another uid's processes unless you are root.
1998-06-30 21:34:14 +00:00
bde
846df0ccd8 Fixed printf format errors (second round with non-i386 typedefs). 1998-06-28 21:05:48 +00:00
bde
f86a86c1b0 Fixed printf format errors. 1998-06-28 21:00:04 +00:00
bde
ae0ea8e208 Oops, the previous log message should have read "Fixed type mismatches -
don't assume that time_t is long".
1998-06-28 18:26:18 +00:00
bde
cd369d3872 Fixed printf format errors. 1998-06-28 18:19:13 +00:00
bde
a273612216 Fixed printf format errors. 1998-06-28 18:08:54 +00:00
jkoshy
9ae2dba8f6 Remove compile time dependency on ARG_MAX.
PR: 1791 (partial)
Reviewed by: Bruce Evans <bde@freebsd.org>, Tor Egge <tegge@freebsd.org>
1998-06-17 11:33:10 +00:00
peter
281c4a8ba0 Don't attempt to change owner/mode/flags that don't need to changed.
This should calm down attempts to `cp -p' to a nfs mount or some other
filesystem that doesn't accept flags or all combinations of flags.
It will warn if it fails to change flags though.
1998-06-10 06:29:23 +00:00
dt
1284a6e0ab Print correct error message if we copy an unreadable directory. 1998-06-09 13:42:51 +00:00
imp
599b4d46a1 Make sure we don't overflow the path buffer. Exit if we do.
Obtained from or inspired by: A similar change in OpenBSD by theo
1998-06-09 03:39:38 +00:00
imp
807b93df66 Make sure we pass the length - 1 to readlink, since it adds its own
NUL at the end of the path.
Inspired by: OpenBSD's changes in this area by theo de raadt
1998-06-09 03:38:43 +00:00
steve
16359590c3 Fix a bunch of spelling errors.
PR:		6856
Submitted by:	Josh Gilliam <josh@quick.net>
1998-06-04 21:06:07 +00:00
jkoshy
fb4783cb34 Fix errors that crept into the previous commit. 1998-06-04 07:02:59 +00:00
jkoshy
324c3d8c89 1. ps' output now shows 3 characters in the TT' field, not 2, after
rev 1.6 of "ps.c".
2. Reword description of `-f' option.

PR: 5340
Submitted by: Jorge Goncalves <j@bug.fe.up.pt>
1998-06-04 06:46:13 +00:00
jkoshy
6e3ef83491 Correct description of -crtscts.
PR: 6836
Submitted by: Andrew <andrew@ugh.net.au>
1998-06-03 04:07:59 +00:00
steve
f356ebeb4b Clarify the example a bit.
PR:		6801
Reviewed by:	David Kelly <dkelly@hiwaay.net>
1998-05-31 22:43:57 +00:00
bde
aa0dee5e71 Fixed imperfections in previous commit (a poor variable name,
excessive 64-bit arithmetic, and excessive changes).
1998-05-31 12:09:50 +00:00
phk
69ad703802 Some cleanups related to timecounters and weird ifdefs in <sys/time.h>.
Clean up (or if antipodic: down) some of the msgbuf stuff.

Use an inline function rather than a macro for timecounter delta.

Maintain process "on-cpu" time as 64 bits of microseconds to avoid
needless second rollover overhead.

Avoid calling microuptime the second time in mi_switch() if we do
not pass through _idle in cpu_switch()

This should reduce our context-switch overhead a bit, in particular
on pre-P5 and SMP systems.

WARNING:  Programs which muck about with struct proc in userland
will have to be fixed.

Reviewed, but found imperfect by:       bde
1998-05-28 09:30:28 +00:00
phk
62808fedf8 "make world" replaces /bin/rmail even when NO_SENDMAIL has been set to
true in /etc/make.conf.  Both qmail and smail use a different rmail, so
replacing rmail is a Bad Thing.

PR:		6762
Reviewed by:	phk
Submitted by:	Bill Trost <trost@cloud.rain.com>
1998-05-27 09:25:22 +00:00
steve
69763b36fc Don't append a '/' to the destination directory if there
is already one there.

PR:		3025
1998-05-25 22:44:16 +00:00
steve
846f9321d4 If no value is present for the login name set it to '-'.
Also pretty-up the display of 'ps -Ortprio'.

PR:		4947
Submitted by:	Martin Kammerhofer <dada@sbox.tu-graz.ac.at>
1998-05-25 05:07:18 +00:00
jkoshy
484f5381d2 Improve description of absolute modes.
Submitted by: Josh Gilliam <josh@quick.net>
PR: 6634
1998-05-19 06:24:50 +00:00
charnier
116394efc6 Correct use of .Nm. Add rcsid. 1998-05-18 06:51:59 +00:00
charnier
f216dca156 Correct use of .Nm. Add section number to .Xr references. Add rcsid. 1998-05-18 06:50:17 +00:00
charnier
ce4a22c986 Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
charnier
09c7f071ed Correct use of .Nm. Add rcsid. 1998-05-18 06:40:56 +00:00
charnier
acc5b59275 Correct use of .Nm. Add section number to .Xr references. 1998-05-18 06:39:17 +00:00
charnier
c3deda5a63 .Nm rm -> .Nm. 1998-05-18 06:37:35 +00:00
jkoshy
713f5b7ac1 kill.1: Remove reference to obsolete sigvec(2) man page. Removed
self reference in sigaction(2) man page.

Submitted by: Josh Gilliam <josh@quick.net>
PR: 6617
1998-05-18 03:33:11 +00:00
charnier
80458a8e0a Correct use of .Nm. Add rcsid. 1998-05-15 06:30:58 +00:00
charnier
3d38367e08 correct use of .Nm. Add rcsid. 1998-05-15 06:23:45 +00:00
charnier
2c4098cd68 Correct use of .Nm. Typo. 1998-05-15 06:22:30 +00:00
charnier
747feaaeb7 Correct use of .Nm. Add rcsid. 1998-05-15 06:19:05 +00:00
phk
08f9a08eb7 .Sh ENVIRONMENT VARIABLES -> .Sh ENVIRONMENT
PR:		6599
Reviewed by:	phk
Submitted by:	Josh Gilliam <josh@quick.net>
1998-05-13 07:57:49 +00:00
charnier
32168d40d3 Correct use of .Nm. Add rcsid. 1998-05-13 07:47:35 +00:00
charnier
d971c4ccd4 Correct use of .Nm. 1998-05-13 07:43:56 +00:00
charnier
6b0f2b0470 Convert to mdoc. 1998-05-13 07:41:13 +00:00
charnier
739c67679c Correct use of .Nm. Add rcsid. 1998-05-13 07:39:11 +00:00
charnier
71a49d7900 Correct use of .Nm. 1998-05-13 07:35:44 +00:00
charnier
b844058b19 Restore Lite-2 sccsid. Restore include of sys/types.h. 1998-05-13 07:33:54 +00:00
charnier
ead0ed96cd Restore Lite-2 sccsid. Restore include of sys/param.h. 1998-05-13 07:31:42 +00:00
charnier
9442bea514 Restore include of sys/types.h and sys/param.h. 1998-05-13 07:29:15 +00:00
charnier
f85d3336ba Restore Lite-2 sccsid. 1998-05-13 07:25:17 +00:00
charnier
86ede3fea5 Restore original Lite-2 sccsid. Restore include of sys/types.h. 1998-05-13 07:22:11 +00:00
charnier
1570bafc51 Do not remove include of <sys/param.h> and <sys/types.h>. They should
be here before including almost any POSIX header.
Requested by:	Bruce
1998-05-13 07:19:45 +00:00
charnier
9ae843f2f7 Restore Lite2 sccsids by removing `const'. Improve documentation a little.
Suggested by:	Bruce
1998-05-13 07:16:37 +00:00
jb
34d5c66e15 Of these programs, only df and ps aren't compatible with FreeBSD/Alpha.
All the rest work! Actually, I don't know if chio works because I can't
test that. df can be built using NetBSD's mount.h. ps depends on libkvm
so there is no point trying.
1998-05-09 06:42:52 +00:00
bde
c284bdb175 Backed out previous backout. Put y.tab.h back in SRCS. 1998-05-06 15:33:59 +00:00
charnier
120edffcab Correct use of .Nm and other cosmetics. Add rcsid. Remove unused #inc. 1998-05-06 06:51:42 +00:00
charnier
32cb2d10d3 Correct use of .Nm, .An and other cosmetics. Add rcsid. Remove unused #inc. 1998-05-06 06:49:16 +00:00
bde
ec2ee14ca6 Backed out previous commit. It was tested, but not for the case where
a separate object tree doesn't exist.  Crufty makefiles will have to
put y.tab.h in SRCS so that we know not to create foo.h from foo.y.
1998-05-05 07:36:55 +00:00
bde
6a77e9f036 Fixed races in `make -jN' using new yacc rules. 1998-05-04 20:09:06 +00:00
bde
a1f072d692 Simplified using new yacc rules and by not generating y.tab.h. 1998-05-04 18:41:16 +00:00
cracauer
d39253d3ab When calling a shell function, remember whether exit status is tested.
This is needed for the '-e' option. See the PR for more details.
PR:		6047
Reviewed by:	PR submitter, silence on review request.
1998-05-04 07:24:10 +00:00
imp
70fcc6f84a Add note about BLOCKSIZE variable to -s flag. 1998-04-29 18:39:51 +00:00
bde
906bdd2538 Backed out most of rev.1.19 (explicit dependencies of object files
on generated headers).  This is now handled generally in bsd.prog.mk.
1998-04-26 16:12:23 +00:00
ache
c4364be6df Fix nasty error in len_octal, result not initialized 1998-04-25 00:12:32 +00:00
ache
3a9c01158e Fix ctype error #1 - chars must be unsigned 1998-04-25 00:10:24 +00:00
des
4fbb825b6e Remove the bogus -? option after reading the getopt() manual :) 1998-04-24 20:15:43 +00:00
des
c447b743a8 o Removed two unused variables (f_dirname and f_newline) in ls.c
o Added the -H and -P options for treatment of symbolic links.

o Removed the #ifdef BSD4_4_LITE, since it does not seem to do anything
  useful

o Fixed up prn_octal() so its output looks more like that of AT&T Unices
  when -b is given.

The next two lines apply only to the first two changes above:

PR:		bin/6140
Submitted by:	Max Euston
1998-04-24 12:43:26 +00:00
des
ff658ec2b4 Updated references to the behaviour of ls(1).
PR:		bin/6140
Submitted by:	Max Euston
1998-04-24 12:38:18 +00:00
des
bcdc5b19bf o Renamed '-b' (show unprintables in octal) to '-B'
o Added a new '-b' which behaves as in AT&T Unices (show unprintables in
  octal, using C escape codes when possible)

o Added '?' to the getopt() string, since the code in the switch considers
  it as a valid option.
1998-04-24 07:49:51 +00:00
des
300a9c59d4 Added -b option to display unprintables in octal.
PR: 1315
1998-04-21 22:02:01 +00:00
rnordier
172674fa35 Spelling/typo fixes: (preceeded, friday). 1998-04-20 21:06:38 +00:00
markm
d15437fa41 Rats. I was too quick. Work needs to be done on the non-Kerberos
case. Re-enable SUID mode.
1998-03-26 19:41:18 +00:00
markm
3a9399523b KTH announced a weakness in their implementation of KerberosIV.
FreeBSD was not vulnerable, but their fix had some useful features.
Incorporate the best of those - rcp(1) no longer needs to be SUID
to root.
1998-03-26 18:15:00 +00:00
charnier
0a37457aa2 .Sh AUTHOR -> .Sh AUTHORS
Use .An/.Aq
1998-03-19 07:26:37 +00:00
jb
e521c29965 Some things only work on i386. 1998-03-13 19:41:06 +00:00
bde
68b354f908 Fixed existence test for secure sources (don't test for secure objects).
Fixed some formatting.
1998-03-06 16:05:18 +00:00
jraynard
6ed23116d6 Don't assume sigset_t and int are equivalent. 1998-02-28 10:50:02 +00:00
bde
e89d910e08 Exit with a nonzero status if we get killed by a SIGINT. POSIX.2
specifies exiting with a zero status if the file was copied
successfully, and with a nonzero status if an error occurred.  We
are too sloppy to tell if the file was copied successfully when we
get killed by a SIGINT, but it is unlikely to have been.  Added a
comment about related sloppiness (calling exit() from a signal
handler).
1998-02-24 01:45:05 +00:00
dima
ecf2a65e4c Add 'f' flag to the optstring. 1998-02-18 22:49:58 +00:00
dima
3d91e52df3 cosmetic change for optstring 1998-02-18 22:45:22 +00:00
jdp
da208a2f3e Explicitly describe the rules the shell uses to search for a file
sourced by the "." command.
1998-02-12 01:23:11 +00:00
eivind
5d7e7087eb spelling
Obtained from:  OpenBSD (src/bin/chio/chio.c rev 1.7) by todd@openbsd.org
1998-02-11 06:34:38 +00:00
asami
984a50716d Fix printing for bytes read > 4G.
Reviewed by:	bde
1998-02-11 02:23:31 +00:00
cracauer
db65bf7f7d Back out my previous attempt to fix SIGINT/SIGTERM behaviour 1998-02-06 23:50:39 +00:00
cracauer
aa61e5bd0b Fix handling of SIGINT/SIGQUIT for foreground subprocesses. Most
urgent need is when you run sh around a program that intentionally
uses SIGQUIT/SIGINT for asynchronous events, i.e. $EDITOR started from
system(2), like many mailers do. This fixes PR bin/1206 and possibly
bin/4241.

The solution committed has been tested for a large number of possible
cases (see recent discussion on cvs-committers). I completed a make
world, made sure 'make world' is interruptable and used the changed
/bin/sh as a login shell all day, including job control and using
SIGQUIT-catching programs (to write this message :-).

PR:		bin/1206
Reviewed by:	discussion on cvs-commiters
1998-02-06 18:14:26 +00:00
dyson
ccb56de039 Display VSZ much more accurately now. 1998-02-02 05:16:42 +00:00
steve
84be8ea54e setpwent now has a void return type, so remove the now bogus cast. 1998-02-01 17:11:07 +00:00
jb
d708387107 Cast a size_t to a long to avoid a gcc warning. 1998-01-25 08:59:08 +00:00