and CPU runtime because it can't access the user area via /proc/<pid>/mem.
This is because the uarea is not mapped into the process address space
at USRSTACK on the alpha like it is on the x86.
Since I'm haven't been able to wrap my brain around the VM system enough
to be able to figure out how to achieve this mapping, and since it's
questionable that such an architectural change is correct, I implemented
a workaround to allow ps(1) to read the uarea from /dev/kmem using
kvm_read() instead of from the process address space via kvm_uread().
The kludge is hidden inside #ifdef __alpha__/#endif so as not to impact
the x86. (Note that top(1) probably uses this same gimmick since it works
on FreeBSD/alpha.)
Reviewed by: dfr
make /etc/rc interruptible in cases when programs hang with blocked
signals) isn't standard enough.
It is now switched off by default and a new switch -T enables it.
You should update /etc/rc to the version I'm about to commit in a few
minutes to keep it interruptible.
This takes the conditionals out of the code that has been tested by
various people for a while.
ps and friends (libkvm) will need a recompile as some proc structure
changes are made.
Submitted by: "Richard Seaman, Jr." <dick@tar.com>
Submitted by: "Richard Seaman, Jr." <lists@tar.com>
Obtained from: linux :-)
Code to allow Linux Threads to run under FreeBSD.
By default not enabled
This code is dependent on the conditional
COMPAT_LINUX_THREADS (suggested by Garret)
This is not yet a 'real' option but will be within some number of hours.
pattern matches will occur at offset zero of the source string. The bug causes
the input source string pointer to be incremented by the offset of the end of
the match, instead of it's length. The fix is to only increment the pointer by
the length of the pattern match (eo-so).
Of course, the one example in the man page shows a situation where the match
occurs at offset 0.
Submitted by: John W. DeBoskey <jwd@unx.sas.com>
Obtained from: freebsd-current@freebsd.org
for regular files. This fixes recent breakage of cp'ing from /dev/zero.
/dev/zero doesn't support mmap(), but the device driver mmap routines are
not called for mapping 0 bytes, so the error was not detected. mmap()
can't even be used for cp'ing special files that support mmap(), since
there is general way to determine the file size.
execvp() in the child branch of a vfork(). Changed to use fork()
instead.
Some of these (mv, find, apply, xargs) might benefit greatly from
being rewritten to use vfork() properly.
PR: Loosely related to bin/8252
Approved by: jkh and bde
tag support. These changes have been tested with a Breeze Hill
Q47 DLT and a DEC DLT2500 media changer. The latter has no
volume tag support.
The chio(1) command was updated to include various flags to the
status subcommand. These flags can be used to select additional
information to be displayed (like volume tags).
A new chio(1) subcommand named 'voltag' has been added which allows
for changes to volume tags inside the media changer controller.
This could not be tested as the Q47 does not provide the functio-
nality.
Submitted by: Hans Huebner
Don't output double-quotes inside variable expansion/arithmetic
expansion region in here-documents. When leaving the arithmetic
expansion syntax mode, adjust the dblquote flag according to
previous syntax, in order to avoid splitting of quoted variables.
foreground child is running. Formerly, traps were exceuted after the
next child exit.
The enables the user to put a breaking wrapper around a blocking
application:
(trap 'echo trap ; exit 1' 2; ./pestyblocker; echo -n)
The "echo -n" after the child call is needed to prevent sh from
optimizing the trap-executing shell away. I'm working on this.
multiple times when performing nested variable expansion, and
preserve some quoting information in order to avoid removing
apparently empty expansion result.
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
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>
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.
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.
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.
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
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>
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.
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
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.