summaryrefslogtreecommitdiffstats
path: root/usr.sbin/watch
Commit message (Collapse)AuthorAgeFilesLines
* Convert the snp(4) driver to use cdevpriv.ed2008-08-151-16/+7
| | | | | | | | | | | | | Now we have a single /dev/snp device node, which can be opened by watch(8) multiple times. Even though snp(4) will be dead as of next week, it's nice having this in SVN, because: - We may want to MFC it to RELENG_7. - By the time we fix snp(4) again, it's already there, existing watch(8) binaries should already work. Just like bpf(4), I'm adding a symlink from snp0 to snp to remain binary compatible.
* Allow watch(8) to use more than 10 snp* devices. This limitation was purelyrink2008-01-301-6/+5
| | | | | | | | | | due to the way watch(8) looks for available snoop devices. PR: bin/118286 Submitted by: Mykola Zubach <zuborg@advancedhosters.com> Reviewed by: rwatson, csjp, imp (all a long time ago) Approved by: imp (mentor) (long time ago) MFC after: 1 week
* Close the tty file descriptor once we're done with it.cognet2005-09-211-8/+8
| | | | | | | Use O_NONBLOCK when opening the tty device. Suggested by: bde Submitted by: ru
* Restore the ability to detach from a tty via SIOCSTTY and documentru2005-09-191-3/+3
| | | | | | recent changes in a manpage. Reviewed by: cognet
* Open the tty device and pass the fd for SNPSTTY.cognet2005-09-181-2/+8
| | | | MFC after: 3 days
* Sort sections.ru2005-01-181-5/+5
|
* By default, the watch utility will attempt to open /dev/snp0, ifcsjp2004-08-101-3/+7
| | | | | | | | | | | | | | | | | | | | | another process already has /dev/snp0 open, the snp(4) will return EBUSY, in which case watch will try to open /dev/snp1..9. Currently watch does not check errno to see if the failure was a result of EBUSY. This results in watch making futile attempts to open snp0..snp9 even though devices may not exist or the caller does not have permissions to access the device. In addition to this, it attempts to setup the screen for snooping even though it may not ever get an snp device. So this patch does two things 1) Checks errno for EBUSY, if open(2) fails for another reason print that reason and exit. 2) setup the terminal for snooping after the snp descriptor has been obtained. Approved by: bmilekic (mentor)
* Eliminated double whitespace.ru2004-07-031-1/+1
|
* Mechanically kill hard sentence breaks.ru2004-07-021-4/+8
|
* Remove constant which makes the assumption that the length ofcsjp2004-05-291-2/+3
| | | | | | | | | _PATH_DEV will never change. In the un-likely event that _PATH_DEV should ever change, watch(8) would have broke because of a mis-generated device name. Approved by: bmilekic (mentor) Pointed out by: Yvan Boily
* Userland signed char fixes for PPC build. Problems were using a chargrehan2004-01-221-2/+2
| | | | | | | | | return for getopt() and comparing to -1, ditto with fgetc() and EOF, and using the kg_nice value from <sys/user.h> Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at> Reviewed by: obrien, bde (a while back) Tested lightly on: ppc, i386, make universe
* Use __FBSDID over rcsid[]. Protect copyright[] where needed.obrien2003-05-031-4/+2
|
* style.Makefile(5)obrien2003-04-041-1/+1
|
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/schweikh2002-12-301-1/+1
| | | | Add FreeBSD Id tag where missing.
* The FIONREAD sysctl operates on an int *, not a size_t *.tmm2002-11-111-9/+8
| | | | Reviewed by: dd
* Add break's to case blocks.mikeh2002-08-101-0/+2
| | | | | PR: bin/41511 Submitted by: Daniel Hagan <dhagan@acm.vt.edu>
* The .Nm utilitycharnier2002-07-141-6/+9
|
* de __Pimp2002-06-121-39/+30
| | | | | ANSI functions minor knf
* #include <time.h> for the definition of time functions instead ofbde2002-02-251-0/+1
| | | | depending on namespace pollution 2 layers deep in <sys/stat.h>.
* Talk about what the user needs to do to get the snp devices, and howdd2001-11-241-2/+12
| | | | | | watch(8) will try to help them by loading the module. PR: 25420
* Change 'superuser' to 'user' which was forgotten in the previousdd2001-11-241-2/+1
| | | | delta. Remove fake SCCS id while I'm here.
* Remove the sentence about only root being able to run watch(8). Itdd2001-11-241-14/+10
| | | | | | | | was never technically true (it's snp(4) that required root, not watch(8)), and after snp.c 1.64, isn't even effectively true, since who can run watch(8) depends on the permissions of the snp device(s). Sort options in SYNOPSIS and DESCRIPTION while I'm here.
* Add an -f option which allows one to specify a snp device to use.dd2001-11-242-8/+30
| | | | | | | Previously, watch would always use the first device it could successfully open, but this isn't always desired. Specifically, it may not be desired during debugging (of snp), or if a particular snp device has different permissions (which makes since after snp.c 1.64).
* o When "-n" is used with watch, it disables the use of <control-X> torwatson2001-11-072-6/+8
| | | | | | change terminals being watched. This change makes watch pass the <control-X> through to the terminal if it's not being intercepted-- previously, the keypress would simply be dropped.
* Automatically load the "snp" module if it isn't already present.dd2001-09-091-0/+6
|
* Back out WARNS commenting - local faultache2001-07-231-1/+1
|
* Unbreak world - comment out WARNS=2 - deadly warning on tgetstrache2001-07-231-1/+1
|
* Perform a major cleanup of the usr.sbin Makefiles.obrien2001-07-201-3/+5
| | | | | These are not perfectly in agreement with each other style-wise, but they are orders of orders of magnitude more consistent style-wise than before.
* Add prototypes, staticize, constify, don't shadow global variables anddd2001-07-152-54/+60
| | | | | | | functions, remove an unused function, and silence other assorted warnings. Set WARNS=2.
* Replace an instance of the "watch" word with the ".Nm" macro: it is used toolgeni2001-05-041-1/+3
| | | | specify the command name.
* - Backout botched attempt to introduce MANSECT feature.ru2001-03-261-0/+1
| | | | - MAN[1-9] -> MAN.
* o Strip BINMODE from Makefile. Installing watch with 0500 provides norwatson2001-03-221-1/+0
| | | | | | added security benefit, as it doesn't provide extra privilege. Protection against inappropriate snooping is done by protecting /dev/snp* properly.
* Set the default manual section for usr.sbin/ to 8.ru2001-03-201-1/+0
|
* Add `_PATH_DEVZERO'.obrien2000-12-091-4/+5
| | | | Use _PATH_* where where possible.
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-3/+3
|
* Add missing .El.charnier2000-01-232-2/+5
| | | | -Wall cleaning.
* ``tty'' is not required parameterphantom1999-10-301-1/+1
|
* Fix warning: return type of `main' is not `int'peter1999-09-151-1/+1
|
* $Id$ -> $FreeBSD$peter1999-08-283-3/+3
|
* Add $Id$, to make it simpler for members of the translation teams tonik1999-07-121-0/+1
| | | | | | | | | | | | | | | | | track. The Id line is normally at the bottom of the main comment block in the man page, separated from the rest of the manpage by an empty comment, like so; .\" $Id$ .\" If the immediately preceding comment is a @(#) format ID marker than the the $Id$ will line up underneath it with no intervening blank lines. Otherwise, an additional blank line is inserted. Approved by: bde
* .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq.charnier1998-03-231-1/+1
|
* Use err(3).charnier1997-10-272-30/+38
|
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-311-1/+1
| | | | posix standard on the topic.
* Removed old bogus prerequisite <sys/select.h>. Cleaned up #include mess.bde1997-03-191-11/+10
|
* 1. change tty handling from sgttyb to termios,roberto1997-03-131-41/+53
| | | | | | | | | 2. fix a potential buffer oflow, 3. makes watch(8) conform to sysexits(3). Not a strong 2.2 candidate even if it would be nice. Reviewed by: joerg, imp
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Sort cross references.wosch1997-01-201-2/+2
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Remove breakage of 1.8.2.2, choose slightly better character for quit.jkh1996-12-302-4/+4
|
* Use RAW, not CBREAKjkh1996-12-171-1/+1
|
OpenPOWER on IntegriCloud