The inp_gencnt will be used to identify a TCP endpoint by an upcoming
command line tool to set TCP socket options.
Reviewed by: rscheff
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D34137
An empty database is a database which does not contain any filenames.
It should not occur in practice but maybe in the case of an error.
echo | /usr/libexec/locate.mklocatedb > empty.db; locate -d empty.db -S
For historical reasons, the integer is stored with an offset of plus 14.
That means, for a given max path length of 1024 the valid values
are -1009 .. 1037 and not -1023 .. 1023
PR: 201243
Providing a timestamp with seconds granularity helps make it obvious
that the display is updating.
Reviewed by: mckusick
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D29181
- stop on first error
- improve awk script: print the last two characters for bigram - not the second word
- remove unnecessary checks
- use mktemp
- refactor
- Check that catopen() succeeded before calling catclose(). musl will
crash in the latter if the catalogue descriptor is -1.
- Keep the message catalogue open for most of sort(1)'s actual
operation.
- Don't use catgets(3) to print error messages if catopen(3) had failed.
Reviewed by: arichardson, emaste
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34081
This doesn't work with musl, which defines stdout as FILE * const.
Instead, explicitly pass the desired output stream to ar_read_archive().
No functional change intended.
Reviewed by: emaste
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34064
gzip has SMALL conditionals which enable building a reduced size version
of the binary. These exist as part of the introduction of BSD licensed
gzip in 2004 in NetBSD and appear to have been required to reach a size
for inclusion in their install media. For more information see commits
to gzip in the NetBSD tree on the 28th of March 2004.
SMALL doesn't appear to be hooked up to our build system and
complicates gzip quite a bit.
Reviewed by: kevans, imp
Sponsored by: Klara Inc.
Differential Revision: https://reviews.freebsd.org/D34047
When run with test, verbose and list we need to parse the file otherwise
the test output is "NOT OK" even for the file is valid.
Reviewed by: kevans, allanjude, imp
Sponsored by: Klara Inc.
Differential Revision: https://reviews.freebsd.org/D34046
By default BSD sort(1) uses 90% (or at least 50%?) of the available
main memory. That is good for performance for a single job, but not
for a shared OS. For a long running script the performance is less
important than the stability of the server. Also, if a server
with 64GB RAM starts swapping, the performance goes south and
hurts other running applications.
Note: this change does not affect the weekly cron job to
rebuild the locate database. The FreeBSD locate.updatedb
use the -presort option (find -s)
This fixes an integer overflow for very large partitions around 35 billion
filenames (>2PB). However, in an artificially worst case it may occurs
by only 17 mio filenames on a partition.
This flag allows a full text search on man pages. Although this is a last resort
option, it can be useful to pin point a certain man page.
It can be used with -S to narrow the search.
Unlike the Linux version, the search takes place in the rendered text so it
avoids false-positives when the text is found in comments in the source files.
It relies on `grep(1)` and `mandoc(1)` to do its job.
Add flag documentation and EXAMPLES to the manual page (bump .Dd).
Usage example:
man -w -K '\<arm\>' -S 1:8
Reviewed By: ceri, emaste, pauamma_gundo.com
Approved by: manpages (bcr@), debdrup@
Differential Revision: https://reviews.freebsd.org/D30984
We have the authorization from the University of California to remove
the advertising clause for a while, wosch@ who also hold a copyright
on this code also approved the relicensing
Approved by: wosch@
MFC after: 3 days
Let "fetch -a" resume truncated transfer automatically
perform another attempt if it obtained some new data in previous one
making progress.
This makes it more robust against frequent but transient network failures.
For example:
=> sqlite-src-3370200.zip doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch https://www.sqlite.org/2022/sqlite-src-3370200.zip
sqlite-src-3370200.zip 3% of 12 MB 45 kBps 04m24s
fetch: sqlite-src-3370200.zip appears to be truncated: 524288/13145234 bytes
sqlite-src-3370200.zip 10% of 12 MB 67 kBps 02m56s
fetch: sqlite-src-3370200.zip appears to be truncated: 1327104/13145234 bytes
sqlite-src-3370200.zip 28% of 12 MB 123 kBps 01m14s
fetch: sqlite-src-3370200.zip appears to be truncated: 3735552/13145234 bytes
sqlite-src-3370200.zip 54% of 12 MB 253 kBps 24s
fetch: sqlite-src-3370200.zip appears to be truncated: 7176192/13145234 bytes
sqlite-src-3370200.zip 62% of 12 MB 90 kBps 55s
fetch: sqlite-src-3370200.zip appears to be truncated: 8241152/13145234 bytes
sqlite-src-3370200.zip 82% of 12 MB 113 kBps 20s
fetch: sqlite-src-3370200.zip appears to be truncated: 10862592/13145234 bytes
sqlite-src-3370200.zip 12 MB 185 kBps 12s
===> Fetching all distfiles required by sqlite3-3.37.2,1 for building
MFC after: 1 month
The text after .error et al is emitted verbatim.
Reviewed by: sjg
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33904
This reverts commit 5eb81a4b40, reversing
changes made to c6806434e7 and
this reverts commit 679ff61123.
What happend is git rebase --rebase-merges doesn't do what is expected.
ASLR stack randomization will reappear in a forthcoming commit. Rather
than inserting a random gap into the stack mapping, the entire stack
mapping itself will be randomized in the same way that other mappings
are when ASLR is enabled.
No functional change intended, as the stack gap implementation is
currently disabled by default.
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33704
If only one file is passed, this reads the terminating NULL and so
prints (null). If multiple files are passed then this always prints the
second file, which may or may not exist (and will be particularly
confusing if it does exist since the output will include the dump of the
second file).
MFC after: 1 week
Missed issues in truss on at least armv7 and powerpcspe need to be
resolved before recommit.
This reverts commit 3889fb8af0.
This reverts commit 1544e0f5d1.
This more clearly differentiates system call arguments from integer
registers and return values. On current architectures it has no effect,
but on architectures where pointers are not integers (CHERI) and may
not even share registers (CHERI-MIPS) it is necessiary to differentiate
between system call arguments (syscallarg_t) and integer register values
(register_t).
Obtained from: CheriBSD
Reviewed by: imp, kib
Differential Revision: https://reviews.freebsd.org/D33780
When detaching, truss(1) sends SIGSTOP to the traced process to ensure
that it is detaching in the steady state. But it is possible, for
multithreaded process, that wait() call returns event other than our
SIGSTOP notification. As result, SIGSTOP might sit in some thread'
sigqueue, which makes SIGCONT a nop. Then, the process is stopped when
the queued SIGSTOP is acted upon.
To handle this, loop until we drain everything before SIGSTOP,
and see that the process is stopped.
Note that the earlier fix makes it safe to have some more debugging
events longering after SIGSTOP is acted upon. They will be ignored
after PT_DETACH.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D33861