Using a separate process group here is bad, since (for example) job
control in the TTY layer prevents interaction with the TTY, causing the
child process to hang.
Mentioned on: current@
MFC after: 2 weeks
data. White space should be accepted anywhere in a base64 encoded
stream, not just after every chunk (4 characters).
Test-scenario:
VmVsb2NpdHkgUmV3YXJkcw==
and
VmVsb2NpdHkgUmV3YXJkcw
==
should both produce "Velocity Rewards"
PR: bin/124739
Submitted by: Mark Andrews <marka@isc.org>
MFC after: 2 weeks
When set, it forces all timestamps and owners to zero and
modes to 0644. Useful for producing libraries that are
bitwise identical across multiple build runs.
Submitted by: Erik Cederstrand
Reviewed by: Kai Wang
commandline. This mirrors the old (undocumented) GNU man functionality.
Also document this feature in the implementation notes section of
the manpage.
Submitted by: arundel
Approved by: wes (mentor implicit)
makes on FreeBSD/pc98. The need for this hack has passed. If you are
one of the rare people that may need this, then you should setenv
MACHINE=pc98 as a workaround.
also in the base set, the man utility when invoked with -a would display
pages for each locale in the same tree:
$ LANG=en_GB.ISO8859-15 man -wa man
/usr/share/man/en.ISO8859-15/man1/man.1.gz
/usr/share/man/man1/man.1.gz
/usr/share/man/en.ISO8859-15/man7/man.7.gz
/usr/share/man/man7/man.7.gz
Use continue to break out of the loop for the current locale. This results
in behavior more closely matching the old GNU man implementation:
$ LANG=en_GB.ISO8859-15 man -wa man
/usr/share/man/en.ISO8859-15/man1/man.1.gz
/usr/share/man/en.ISO8859-15/man7/man.7.gz
This will still search for a copy of the file in other manual path
locations. If there was a /usr/local/man/man1/man.1.gz file, it would still
be displayed. This is also consistent with the GNU man implementation.
Submitted by: arundel
Approved by: wes (mentor implicit)
Features of this new version in favor of the old one:
BSD licensed -- old one is GPL.
Imports configuration from /etc/man.conf and LOCALBASE/etc/man.d/*.conf
allowing ports to extend the base functionality. The pluggable
configuration can supplement the manual search path (retiring use.perl),
add locales, and override language specific toolsets (attempt to merge
the japanese/man port into the base system as much as possible).
Much effort has been made to make this version mirror the functionality
of the existing implementation. For 99% of users, it should be a drop in
replacement.
PR: gnu/143271, gnu/4419
Reviewed by: dougb (previous versions)
Approved by: wes (mentor)
of faulting, check for NULL. However, returning an error would cause csup
to just abort the entire update. Instead, break out of the loop and
return ok. The attempts to update the file will trigger a MD5 failure which
will cause csup to download the entire file as a fixup.
Reviewed by: lulf
MFC after: 1 week
A closing bracket immediately after '[=' should not be treated as special.
Different from the submitted patch, a string ending with '[=' does not cause
access beyond the terminating '\0'.
PR: bin/150384
Submitted by: Richard Lowe
MFC after: 2 weeks
It is not clear to what this copyright should apply, and this is in line
with what other operating systems do.
For ssh specifically, printing of the copyright string is not in the
upstream version so this reduces our FreeBSD-local diffs.
Approved by: core, des (ssh)
not optimal from a performance standpoint since the write buffer is
not necessarily be filled up when the inflate rountine reached the
end of input buffer and it's not the end of file.
This problem gets uncovered by trying to pipe gunzip -c output to
a GEOM device directly, which enforces the writes be multiple of
sector size.
Sponsored by: iXsystems, Inc.
Reported by: jpaetzel
MFC after: 2 weeks
the name of the typescript file.
+ Add the 'command' argument (if supplied on the command line) to the
typescript file. This creates a more complete typescript when invoked
this way - more equal to invoking script without supplying the 'command'
argument.
bitwise parameters (e.g. mmap), print the syscall parameter value first.
The resulting output looks like the %b specifier of printf(9).
Before:
mmap(0,0x8000,PROT_READ|PROT_WRITE,...
After:
mmap(0,0x8000,0x3<PROT_READ|PROT_WRITE>,...
Submitted by: Norberto Lopes <nlopes.ml at gmail.com>
Idea from: freebsd-arch/2006-April/005116.html
Octal escape sequences are expanded to bytes, not characters, and multiple
are required for a multibyte character.
The valid escape sequences in %b strings are slightly different from the
escape sequences in the format string.
- Imply -h if single file is grepped, this is the GNU behaviour
This is already done by code above the change and have caused a regression
since this instance of code does not check Hflag.
Reported by: davidxu
Pointy hat to: delphij
instead of stdio. This gives BSD grep a very big performance boost,
its speed is now almost comparable to GNU grep.
Submitted by: Dimitry Andric <dimitry@andric.com>
Approved by: delphij (mentor)
All these functions and variables are local to this compilation unit, so
there is no reason why we shouldn't mark them static. This slightly
reduces the binary size.
former may be safer but in this case it doesn't add extra
safety [1]
- Fix -w option [2]
- Fix handling of GREP_OPTIONS [3]
- Fix --line-buffered
- Make stdin input imply --line-buffered so that tail -f can be piped
to grep [4]
- Imply -h if single file is grepped, this is the GNU behaviour
- Reduce locking overhead to gain some more performance [5]
- Inline some functions to help the compiler better optimize the code
- Use shortcut for empty files [6]
PR: bin/149425 [6]
Prodded by: jilles [1]
Reported by: Alex Kozlov <spam@rm-rf.kiev.ua> [2] [3],
swell.k@gmail.com [2],
poyopoyo@puripuri.plala.or.jp [4]
Submitted by: scf [5],
Shuichi KITAGUCHI <ki@hh.iij4u.or.jp> [6]
Approved by: delphij (mentor)
uname and gname weren't overwritten, so the
disk restore would use those to lookup the
original uid/gid again. Clearing the uname
and gname prevents this.
Reported by: swell.k
MFC after: 7 days
and exclusion patterns [1]
- Some improvements on the exiting code, like replacing memcpy with
strlcpy/strcpy
Approved by: delphij (mentor)
Pointed out by: bf [1], des [1]
or if forced mode is specified [1]
- While here, add some alternative names for the options and make then
case-insensitive
- Fix -q and -l behaviour [2]
- Some small changes to make the code easier to review
Submitted by: swell.k@gmail.com [1],
dougb [2]
Approved by: delphij (mentor)
- Explicitly pre-zero memory for fts_open parameters.
- Don't test against directory patterns when we are testing direct
leaf of current directory.
While I'm there plug a few of memory leaks.
- Fix two minor nits in manpage [2]
- style.Makefile(5)
Submitted by: pluknet <pluknet at gmail.com> [1],
Alex Kozlov <spam@rm-rf.kiev.ua> [2]
Reviewed by: delphij
Deliverables: Small and clean code (1,4 KSLOC vs GNU's 8,5 KSLOC),
lower memory usage than GNU grep, GNU compatibility,
BSD license.
TODO: Performance is somewhat behind GNU grep but it is only
significant for bigger searches. The reason is complex, the
most important factor is that GNU grep uses lots of
optimizations to improve the speed of the regex library.
First, we need a modern regex library (practically by adopting
TRE), add support for GNU-style non-standard regexes and then
reevalute the performance issues and look for bottlenecks. In
the meantime, for those, who need better performance, it is
possible to build GNU grep by setting WITH_GNU_GREP.
Approved by: delphij (mentor)
Obtained from: OpenBSD (http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/grep/),
freegrep (http://github.com/howardjp/freegrep)
Sponsored by: Google SoC 2008
Portbuild tests run by: kris, pav, erwin
Acknowledgements to: fjoe (as SoC 2008 mentor),
everyone who helped in reviewing and testing
-fno-rtti. The clang libaries that really use exceptions and virtual
functions can enable LLVM_REQUIRES_EH and LLVM_REQUIRES_RTTI
respectively. This saves space on the resulting binaries and follows
what's being done upstream.
Submitted by: Dimitry Andric <dimitry at andric.com>
This commit merges the latest LLVM sources from the vendor space. It
also updates the build glue to match the new sources. Clang's version
number is changed to match LLVM's, which means /usr/include/clang/2.0
has been renamed to /usr/include/clang/2.8.
Obtained from: projects/clangbsd
default invokation):
- Right now if segments are not writable are not included. Remove this.
- Right now if a segment is mapped with NOCORE the check is not honoured.
Change this by checking the newly added flag, from libutil,
KVME_FLAG_NOCOREDUMP.
Besides that, add a new flag (-f) that forces a 'full' dump of all the
segments excluding just the malformed ones. This might be used very
carefully as, among the reported segments, there could be memory
mapped areas that could be vital to program execution.
Sponsored by: Sandvine Incorporated
Discussed with: kib
Reviewed by: emaste
Tested by: Sandvine Incorporated
MFC after: 2 weeks
the same fix present in NetBSD.
Note: the getopt man page contains more antique information like this.
An overhaul of the man page and/or sync with NetBSD would be the right
thing to do. But since this is out of the scope of the PR, I'll leave
it as it is for now.
PR: docs/133118
Submitted by: Oleg A. Mamontov (oleg at mamontov dot net)
Discussed with: jilles@
MFC after: 2 weeks
is still one issue on FreeBSD/arm (signed vs unsigned char) which prevents
actually bumping this to WARNS=6 - I'm still considering the correct
solution to this issue.
Tested by: make universe
to print the stats were using an uninitialised variable. [1]
Fix trasnfer statistics in the "receive file" case - the statistics struct
was being cleared both before and after the initial connect to the remote
server. As a result, the printed time and calculated bandwidth covers
the time to connect ad well as the time to transfer the file. This may
not be ideal, but now at least matches the "send file" case.
Found by: clang static analyser [1]
Reviewed by: imp
This switch makes it a lot easier to locate problem areas when a process
is threatening to consume all of your disk space.
PR: 144192
Submitted by: gk
MFC after: 3 weeks
of times the system was forced to sleep when requesting a new allocation.
Expand the debugger hook, db_show_uma, to display these results as well.
This has proven to be very useful in out of memory situations when
it is not known why systems have become sluggish or fail in odd ways.
Reviewed by: rwatson alc
Approved by: scottl (mentor) peter
Obtained from: Yahoo Inc.
report the compression ratio as 0% instead of displaying
nonsense triggered by numeric overflow. This is common
when dealing with uncompressed files when the I/O blocking
causes there to be small transient differences in the
accounting.
Thanks to: Boris Samorodov
This avoids errors or __DECONST() from places with higher WARNS levels.
Adjust a local cache variable in ipcs to const as well
to compile in the new world order.
Suggested by: jhb
Reviewed by: jhb, kib, brueffer (man)
There's a parsing error for fields where addresses are not separated by
space. This is often produced by MS Outlook, eg.:
Cc: <foo@bar.com>,"Mr Foo" <foo@baz.com>
The following line now splits into the right tokens:
Cc: f@b.com,z@y.de, <a@a.de>,<c@c.de>, "foo" <foo>,"bar" <bar>
PR: bin/131861
Submitted by: Pete French <petefrench at ticketswitch.com>
Tested by: Pete French
Reviewed by: mikeh
MFC after: 2 weeks