summaryrefslogtreecommitdiffstats
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
* Pet manlintbapt2015-04-261-1/+1
|
* Use mdoc(7) macros for curly bracesbapt2015-04-261-3/+3
|
* mdoc: escape Rebapt2015-04-261-1/+1
|
* sh: Pass along SIGINT from a child if job control is enabled, even when notjilles2015-04-251-1/+1
| | | | | | | | | interactive. I added the interactive check in r208881 to be safe, but in actual use (scripts in set -m mode) passing along SIGINT seems best. Discussed with: bdrewery
* ed(1): Fix [-Werror=logical-not-parentheses]eadler2015-04-201-1/+1
| | | | | | | | /usr/src/bin/ed/glbl.c:64:36: error: logical not is only applied to theleft hand side of comparison [-Werror=logical-not-parentheses] Obtained from: Dragonfly (1fff89cbaeaa43af720a1f23d9c466b756dd8a58) MFC After: 1 month
* bin/ed: use correct type in multiplicationeadler2015-04-181-1/+1
| | | | | | | The result is line_t** so the multiplication should be size * sizeof(line_t*) MFC After: 1 month
* sh: Fix the trap builtin to be POSIX-compliant for 'trap exit SIG' and 'trap ↵bdrewery2015-04-185-4/+30
| | | | | | | | | | | | | | | | | n n...'. The parser considered 'trap exit INT' to reset the default for both EXIT and INT. This beahvior is not POSIX compliant. This was avoided if a value was specified for 'exit', but then disallows exiting with the signal received. A possible workaround is using ' exit'. However POSIX does allow this type of behavior if the parameters are all integers. Fix the handling for this and clarify its support in the manpage since it is specifically allowed by POSIX. Differential Revision: https://reviews.freebsd.org/D2325 Reviewed by: jilles MFC after: 2 weeks
* Fix build after r281550 when WITHOUT_ICONV is defined.tijl2015-04-161-1/+1
| | | | | Reported by: adrian MFC after: 2 weeks
* Remove the const qualifier from iconv(3) to comply with POSIX:tijl2015-04-151-1/+1
| | | | | | | | | | http://pubs.opengroup.org/onlinepubs/9699919799/functions/iconv.html Adjust all code that calls iconv. PR: 199099 Exp-run by: antoine MFC after: 2 weeks
* sh: Add more tests for exotic IFS splitting.jilles2015-03-313-0/+13
|
* cp,mv: Use futimens() instead of utimensat() if possible.jilles2015-03-232-2/+2
|
* Build expr with -fwrapv, since it relies on signed integer wrappingdim2015-03-221-0/+3
| | | | | | | having defined behavior. Reported by: rodrigc MFC after: 3 days
* Implement pax -O option to permit limiting a PAX archive to a single volume.eadler2015-03-185-16/+32
| | | | | | | | | -O Force the archive to be one volume. If a volume ends prematurely, pax will not prompt for a new volume. PR: 198481 Submitted by: Sevan Janiyan Reviewed by: allanjude (doc)
* Use 24h timestamps in the ps(1) STARTED columnfeld2015-03-172-9/+4
| | | | | | | | | | | | | | | | | | | | | The previous 12h AM/PM format was perplexing as it didn't follow the locale of the user and was a minor annoyance to FreeBSD users coming from Linux. Additionally, the man page was incorrect about the strftime format. There are three time formats that may be displayed in the STARTED column depending on the age of the process. Below is an example. For a process started at 14:30 on Monday 16 March 2015, the following formats may be used: 14:30 for process < 24h old (24h Timestamp) Mon14 for process > 24h, < 1 week old (Weekday Hour) 16Mar15 for process > 1 week old (Day Month Year) Differential Revision: https://reviews.freebsd.org/D1620 Reviewed by: brd Approved by: trasz
* r* commands are not precious anymorebapt2015-03-041-1/+0
|
* sh: Fix more compiler warnings related to variable declarations.jilles2015-03-035-6/+7
|
* sh: Fix more compiler warnings.jilles2015-03-016-13/+20
|
* sh: Fix compiler warnings related to duplicate or missing declarations.jilles2015-03-016-8/+6
|
* Fix unitialized variable that broke sh on PowerPC starting with r278826.nwhitehorn2015-02-261-1/+1
|
* sh: Add details about importing the environment and initializing OPTIND.jilles2015-02-221-7/+14
|
* Disguising stderr from jls generally considered harmfulngie2015-02-212-2/+4
| | | | | | | | Undisguising it dumps out the following logspew: jls: unknown parameter: allow PR: 191019
* symlink(7): Mention chflagsat() (can take AT_SYMLINK_NOFOLLOW).jilles2015-02-161-1/+2
| | | | MFC after: 1 week
* sh: Various cleanups to expand.c:jilles2015-02-151-60/+55
| | | | | | * Remove some gotos. * Remove unused parameter. * Remove duplicate code.
* sh: Prefer "" to nullstr where possible.jilles2015-02-158-9/+8
|
* sh: Add stsavestr(), like savestr() but allocates using stalloc().jilles2015-02-154-12/+16
|
* sh: Add simple tests for globbing/splitting command substitution.jilles2015-02-153-0/+9
|
* Refactor pkill-j_test to reflect the relevant changes done to pgrep-j_testngie2015-02-141-75/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | r278742: Simplify jail_name_to_jid and try to be more fault tolerant when scanning for the jail ID (poll up to 10 times for the jail IDs to become available) If the scan fails, the code will fall through and fail as it does with Jenkins today r278636: Parameterize out the amount of sleep done in each test Set the value in each test to a different amount to avoid potential side-effects with other instances of the test (or lingering processes) still being present on the system r278633: Refactor the tests 1. `id -u` -> 0 is now only checked once; the entire test script is now skipped if this assertion is violated 2. De-dent whitespace, based on 1. 3. Only setup the symlink for $sleep once at the top of the script, and tear it down once at the bottom of the script
* Simplify jail_name_to_jid and try to be more fault tolerant when scanning forngie2015-02-141-15/+14
| | | | | | | the jail ID (poll up to 10 times for the jail IDs to become available) If the scan fails, the code will fall through and fail as it does with Jenkins today
* Call wait to ensure that background processes have diedngie2015-02-131-0/+2
| | | | This is being done to establish parity with pgrep-j_test
* Parameterize out the amount of sleep done in each testngie2015-02-121-9/+12
| | | | | | Set the value in each test to a different amount to avoid potential side-effects with other instances of the test (or lingering processes) still being present on the system
* Refactor the testsngie2015-02-121-59/+48
| | | | | | | | 1. `id -u` -> 0 is now only checked once; the entire test script is now skipped if this assertion is violated 2. De-dent whitespace, based on 1. 3. Only setup the symlink for $sleep once at the top of the script, and tear it down once at the bottom of the script
* Add debugging output to help track down the recent Jenkins failuresngie2015-02-121-3/+3
|
* Prevent access to an uninitialized variablepfg2015-01-311-1/+1
| | | | | | | The "-h" option may access an uninitialized value. Prevent it by properly initializing the value. CID: 1006559
* sh: Abort a wait builtin on any trapped signal.jilles2015-01-312-5/+6
| | | | | | | | This is required by POSIX. PR: 197210 Reported by: ache MFC after: 2 weeks
* Fix overflow check for multiplication:se2015-01-271-4/+16
| | | | | | | | | | | | | - Add special test to detect the case of -1 * INTMAX_MIN - Protect against elimination of the test division by the optimizer Garrett Cooper noticed that the overflow checks were incomplete, and Bruce Evans suggested the use of the "volatile" qualifier to counter the effect of the undefined behaviour, when the prior multiplication caused overflow, and he also suggested improvements to the comments. Reviewed by: bde MFC after: 1 week
* cp,mv,touch: Set timestamps with nanosecond precision.jilles2015-01-242-10/+10
| | | | This uses utimensat().
* Add futimens and utimensat system calls.jilles2015-01-231-3/+4
| | | | | | | | | | | | | | The core kernel part is patch file utimes.2008.4.diff from pluknet@FreeBSD.org. I updated the code for API changes, added the manual page and added compatibility code for old kernels. There is also audit and Capsicum support. A new UTIME_* constant might allow setting birthtimes in future. Differential Revision: https://reviews.freebsd.org/D1426 Submitted by: pluknet (partially) Reviewed by: delphij, pluknet, rwatson Relnotes: yes
* Don't include newvers.sh into freebsd-version.ume2015-01-221-1/+1
|
* Integrate contrib/netbsd-tests/bin/expr into the build/kyua as bin/expr/testsngie2015-01-192-0/+22
| | | | | MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Add a ${CP} alias for copying files in the build.will2015-01-161-1/+1
| | | | | | | | | | | | | | Some users build FreeBSD as non-root in Perforce workspaces. By default, Perforce sets files read-only unless they're explicitly being edited. As a result, the -f argument must be used to cp in order to override the read-only flag when copying source files to object directories. Bare use of 'cp' should be avoided in the future. Update all current users of 'cp' in the src tree. Reviewed by: emaste MFC after: 1 week Sponsored by: Spectra Logic
* Install d_align.{in,out} for the :align testngie2015-01-051-0/+5
| | | | | X-MFC with: r276669 Pointyhat to: me
* Integrate bin/cat/tests from NetBSD into atf/kyuangie2015-01-042-0/+19
| | | | Sponsored by: EMC / Isilon Storage Division
* symlink(7): Note that stat(1) does not follow symlinks by default.jilles2014-12-291-9/+8
| | | | MFC after: 1 week
* sh: Move some code from onint() to onsig(), making onint() noreturn.jilles2014-12-214-21/+21
| | | | | As a result, the INTON macro which is used many times generates fewer bytes of code.
* sh: Remove EXP_REDIR.jilles2014-12-213-15/+8
| | | | | | | | | | EXP_REDIR was supposed to generate pathnames in redirection if exactly one file matches, as permitted but not required by POSIX in interactive mode. It is unlikely this will be implemented. No functional change is intended. MFC after: 1 week
* sh: Make sure output suitable as shell input is also printable.jilles2014-12-143-22/+76
| | | | | | | | | | | Commands like 'export -p', 'set' and 'trap', and tracing enabled via 'set -x' generate output suitable as shell input by adding quotes as necessary. If there are control characters other than newline or invalid UTF-8 sequences, use $'...' and \OOO to display them safely. The resulting output is not parsable by a strict POSIX.1-2008 shell but sh from FreeBSD 9.0 and newer and many other shells can parse it.
* Add facility to stop all userspace processes. The supposed use of thekib2014-12-131-1/+2
| | | | | | | | | | | | | | | | | | | | | feature is to quisce the system before suspend. Stop is implemented by reusing the thread_single(9) with the special mode SINGLE_ALLPROC. SINGLE_ALLPROC differs from the existing single-threading modes by allowing (requiring) caller to operate on other process. Interruptible sleeps for !TDF_SBDRY threads are suspended like SIGSTOP does it, instead of aborting the sleep, like SINGLE_NO_EXIT, to avoid spurious EINTRs on resume. Provide debugging sysctl debug.stop_all_proc, which causes total stop and suspends syncer, while waiting for variable reset for resume. It is used for debugging; should be removed after the real use of the interface is added. In collaboration with: pho Discussed with: avg Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
* Fix dependency on newvers.shdes2014-12-101-2/+1
| | | | | Noticed by: marck MFC after: 1 week
* sh: Remove special case for '=' in set -x; always quote it in outqstr().jilles2014-11-302-11/+2
| | | | | I plan to make set -x output always printable using $'...'; avoiding quoting words containing '=' is not worth the extra complexity.
* Convert bin/ to LIBADD, reduce overlinking allow to build all components asbapt2014-11-258-21/+9
| | | | static
OpenPOWER on IntegriCloud