summaryrefslogtreecommitdiffstats
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
* Correctly mark up the final command line arguments with the Ar macro fortjr2002-06-251-2/+2
| | | | the last two synopsis forms.
* Add a description of the restrictions that red(1) imposes to users,keramida2002-06-241-7/+24
| | | | | | | | | | and a warning that this "restricted mode" can be bypassed easily by using symlinks, so that users don't depend too much on it. PR: docs/35940 Submitted by: Gary W. Swearingen <swear@blarg.net> Reviewed by: jmallett MFC after: 1 week
* Don't try to decode old-style options if the argv[1] begins with `-' and thesobomax2002-06-201-10/+28
| | | | | | | | | | | | | second character represents some option taking an argument. This fixes problem when ps(1) is invoked for examply as follows: $ ps -Ufoobar1234 the above example results in option string being interpreted as -U foobarp1234 - note extra `p'. Reported by: Vladimir Sotnikov <vovan@kyivstar.net> MFC after: 2 weeks
* Bogusness may have happened using a variable assignment here before, butjmallett2002-06-201-1/+1
| | | | | | | | proper parens mean that fd is always set by open(2) [in any part of C], and so we can accurately check for it returning -1, without feeling like we need to initialise fd to -1 in its declaration. In other words, fix a stylistic/bogus nit.
* Use size_t consistently and complete some uncompleted code resulting in ajmallett2002-06-202-3/+6
| | | | | | | memory leak by assigning and freeing a variable appropriately as well as keeping track of the amount of allocated ram properly. MFC after: 1 month
* We have a place for extern declarations of global variables in ed.h, do notjmallett2002-06-202-3/+2
| | | | use main() to do it locally.
* Remove two unused variables.jmallett2002-06-201-2/+0
|
* Minor const cleanup.jmallett2002-06-202-4/+4
| | | | Don't discard qualifiers we don't need to discard.
* Bring documentation on CDPATH and its effects on cd(1) back into sync withtjr2002-06-191-4/+6
| | | | | | | | | reality (and POSIX): current directory isn't searched unless CDPATH has a "." element or is unset. PR: 38442 Submitted by: oleg dashevskii <be9@be9.ru> MFC after: 1 week
* When trying to emulate a cross-device move operation with cp and rm, addtjr2002-06-161-2/+2
| | | | | | | | | a "--" argument after the options so filenames with leading dashes are handled correctly. PR: 39318 Submitted by: Serge van den Boom <svdb@stack.nl> MFC after: 1 week
* Use an usage() rather than doing the fprintf inside option parsing.jmallett2002-06-141-3/+9
|
* When -R is not specified, fail to copy the contents of dangling symlinkstjr2002-06-131-3/+11
| | | | | | instead of making a copy of the link itself (SUSv3) Obtained from: NetBSD
* Print the "$" symbol on blank lines when the -s and -e options are usedtjr2002-06-131-17/+11
| | | | | | together. Obtained from: OpenBSD (millert, Denis Afonin)
* Remove bogus "-" operand from usage message. There is no restriction ontjr2002-06-131-1/+1
| | | | where it may be placed, it is treated the same as the file arguments.
* Markup nits: use the Ar macro when describing the -signal_name andtjr2002-06-131-5/+7
| | | | -signal_number options, and for referring to the "pid" argument.
* Add examples and diagnostics sectionstjr2002-06-131-0/+17
|
* Support the "--" end of options marker, useful to disambiguate betweentjr2002-06-131-1/+4
| | | | | signal numbers and process groups (negative pid arguments), and required by SUSv3.
* Don't list shell builtins when the hash command is used (SUSv3)tjr2002-06-131-1/+2
|
* ps(1) appeared in v4jmallett2002-06-101-1/+1
| | | | Submitted by: grog
* Sort sections, use Ex macro in Diagnostics section, point out that the firsttjr2002-06-101-11/+4
| | | | example only works with csh(1).
* Add History section. sleep appeared in v4.tjr2002-06-101-0/+5
|
* Note early appearence of some commands. These actually appeared in PWB, butjmallett2002-06-101-0/+5
| | | | | it seems we don't have a macro for that yet, so list them in the first UNIX release since then that we have a .At for: v7.
* Use socklen_t for the length of a socket structure instead of `int'.keramida2002-06-091-1/+2
| | | | Reviewed by: mike
* Replace <strings.h> with <string.h>. No functions from the former arekeramida2002-06-091-1/+1
| | | | | | | used in this file, and strlen() needs to be prototyped by the latter, for this to compile without warnings. Reviewed by: mike
* Check the return value of getcwd() to avoid printf()ing a NULL. Markmike2002-06-091-4/+5
| | | | | | usage() as __dead2 to avoid a GCC warning. Spotted by: keramida
* Allow whitespace to act as a delimiter in the keywords list given to the -o,jmallett2002-06-082-5/+14
| | | | | | | | again, but also allow it in the user-specified header, too. This is far more backwards compatible and SUSv3-happy than allowing only comma to seperate the keywords list. Submitted by: tjr
* Fixed unsorting.bde2002-06-081-1/+1
|
* Don't say that the list of formats can be space delimited, it no longer can be.jmallett2002-06-081-2/+5
| | | | | | Mention that more than one -o will concatenate formats. Submitted by: Jun Kuriyama <kuriyama@imgsrc.co.jp>
* Back out previous back out of previously correct code.jmallett2002-06-071-2/+1
| | | | | Double-plus-pointy-hat to: jmallett Submitted by: bde
* Remove tunables to hide warnings that no longer exist.jmallett2002-06-071-2/+0
|
* Cast to long to match format. Hidden by revision 1.18 of Makefile.jmallett2002-06-071-1/+2
|
* Use a global `now' variable for the current time, and initialise it atjmallett2002-06-063-6/+5
| | | | startup, right after calling setlocale(3).
* Implement a SUSv3-ignorant but "time"-similar format for "etime", elapsedjmallett2002-06-064-0/+21
| | | | | run time (NOT cpu time). cputime() and elapsed() both need to honour SUSv3 now.
* sysctlbyname(3) returns -1 on failure, not any other value < 0.jmallett2002-06-061-3/+3
|
* Support the SUSv3 `rgroup' format.jmallett2002-06-064-5/+24
| | | | Clean up some local style bogons.
* Cast arg_max to size_t when comparing it (times 4, plus 1) against SIZE_MAX. Ijmallett2002-06-061-1/+2
| | | | | | | | was worried about truncation of arg_max by this cast, but if it gets truncated, we know it'll obviously be greater than SIZE_MAX anyway. Big pointy hat to: jmallett Submitted by: keramida
* SUSv3 conform on the "comm" and "args" formats, and make correct the "command"jmallett2002-06-064-4/+41
| | | | format, since it's BSDlike, and "comm" is actually different.
* Refer to the command format by its SUSv3 name (comm), and list command as anjmallett2002-06-061-2/+2
| | | | alias.
* As per behaviour on SVR4 systems, to allow any desirable type of header in thejmallett2002-06-061-2/+4
| | | | | | | | | | | | | | | | override, seperate by comma (',') only, rather than any type of whitespace (the literal space character (' ') had already been removed from this list). This allows things like: miamivice# ps -opid='Process > Identifier' Process Identifier 1350 1445 1450 To work.
* Document the -f and -v options of the unset builtin.tjr2002-06-061-5/+15
|
* Quote the output of the no-argument form of the `set' builtin for re-inputtjr2002-06-061-2/+8
| | | | to the shell.
* Add the SUSv3 -p ("portable") option to both the export and readonlytjr2002-06-062-3/+47
| | | | | builtins. This makes export/readonly print lines in the form "export name=value".
* Don't modify output that is to be quoted if it contains no IFS characterstjr2002-06-061-0/+7
| | | | or shell metacharacters.
* Widen the scope of fmt.c::1.19 and consistently use errx(3) if malloc(3) [orjmallett2002-06-053-10/+8
| | | | | | | | | | realloc(3)] happens to fail, everywhere in ps(1). Discussed with: bde, charnier (a while ago) fmt_argv() can no longer return NULL, so don't bother checking. Submitted by: bde
* Comma seperate format lists, since space is no longer up to the task.jmallett2002-06-051-6/+6
| | | | | Poked by: David Wolfskill <david@catwhisker.org> Pointy hat to: jmallett
* Support the 'comm' keyword, which is equivalent to our 'command', butjmallett2002-06-051-0/+2
| | | | specified by SUSv3.
* A space cannot be a header string seperator it appears given the SUSv3jmallett2002-06-051-1/+1
| | | | | description of ps(1), which uses them. I question whether newline and tab can be either, but I'm not touching them. Yet.
* To comply with SUSv3, duplicate the variable contents for each given format,jmallett2002-06-051-1/+4
| | | | | | | | | | | | so that multiple -ovar=header lines do not overwrite eachother. This means that ps -ouser=USERNAME -ouser=WHO would now possibly print: USERNAME WHO juli juli Whereas before it would be: WHO WHO juli juli
* Returning NULL here if malloc(3) fails is silly, at this point in the codepathjmallett2002-06-051-1/+1
| | | | | we have't malloc(3)'d nearly as much as we probably will, so errx(3) away, instead of waiting for something to fail yet again later on.
* Remove an XXX comment that seems to be a tiny bit no longer pertinent. Thisjmallett2002-06-051-4/+0
| | | | | | function seems to do the right thing, and is not a "stub", and whoever "marc" is, he's had plenty of time to do "the real one", so don't wait around for him any longer.
OpenPOWER on IntegriCloud