Commit Graph

8666 Commits

Author SHA1 Message Date
christos
862fe20f05 GC old signal handling and merge it in 4 places:
1. Immediately ignore all the signals we want to ignore and set the alarm.
    2. Before we exit on error, restore all signals we modified
    3. Before we exec a shell, restore all signals we modified and ignore TSTP.
       Job control aware shells know how to deal with this.
    4. Temporarily handle SIGINT while we read motd.
2006-04-17 16:29:44 +00:00
skrll
683ccd8e40 Add RCSId. 2006-04-17 06:53:06 +00:00
blymn
e48af18bc5 Update to use new kernel io statistics. 2006-04-14 13:14:06 +00:00
blymn
7d866d268b Update statistics reporting to use new kernel framework, rename dkstats*
to a more generic name since it no longer just deals with disk.
2006-04-14 13:12:37 +00:00
wiz
3aec927b7b Bump date for previous.
New sentence, new line.
Remove trailing whitespace.
2006-04-13 21:15:50 +00:00
wiz
afd4fdef89 Bump date for previous, slightly reword a sentencen. 2006-04-13 21:10:44 +00:00
sjg
d7df397808 Change ReadMakefile to return 0 on success so that it better meets
the expectations of Lst_Find*.  This way we only read the first sys.mk
found via sysIncPath.
At the same time we need to add a ReadAllMakefiles() for the case
where multiple -f makefile args are provided (uncommon, but documented).
2006-04-12 20:32:27 +00:00
chuck
02ff9e80b9 fix .Xr to invalid man page that i put in by mistake 2006-04-10 16:20:46 +00:00
chuck
d09fe2c467 modified man(1):
- avoid double slashes when displaying man pages (got tired
   of '/usr/share/man//cat1/man.0').
 - got rid of __P() while working on it.
 - incorporate some of my old notes explaining how manpath works into the
   comments of the code itself.
 - renamed some of the vars so that the code is consistent throughout
   (and hopefully clearer and easier to understand)
 - fixed relative man paths for multiple man pages (man did a chdir()
   on the first man page it had to format --- this broke any remaining
   relative path man pages left to process).   save old directory and
   fchdir() back to it after formatting.
 - improved doc on "man -h" which does more than just whatis(1) [e.g.
   "man -h fopen" prints the required include files and the prototypes
   rather than just the one-liner you get with whatis(1)]
 - manconf.c now fills in the "len" length field in the TAG/ENTRY
   structures (man now uses len).

revise man.conf file reading stuff to return error on failure in
addentry/gettag (fka getlist) rather than just err()ing out.   this
allows man(1) to call cleanup and delete its tmp files rather than
just leave them floating.  revise other apps using this code
(makewhatis, apropos, catman, whatis) to expect this.  also remove
__P on updated files.
2006-04-10 14:39:06 +00:00
chuck
82ad9348f2 rework the wording in these man pages (mainly in man.conf.5) based on
some old notes I found to make it clearer and easier to understand
how the man stuff works (hopefully!).
2006-04-10 14:02:57 +00:00
christos
857164eeb5 Coverity CID 2536: Clarify the error path further. 2006-04-09 20:01:40 +00:00
christos
c5e22666b0 Coverity CID 1596: Plug memory leak. 2006-04-09 19:51:23 +00:00
christos
e550e02b95 Coverity CID 1624: Plug memory leak. 2006-04-09 19:47:43 +00:00
christos
79059c6361 Coverity CID 1563: Fix memory leak. 2006-04-09 19:42:03 +00:00
christos
3bf01f5c84 Duh fixed error printing. 2006-04-09 19:39:17 +00:00
christos
034e8bc313 Coverity CID 1580: Plug memory leak. 2006-04-09 19:37:50 +00:00
christos
c1cd33addf Coverity CID 2331: Plug memory leak. 2006-04-09 19:27:22 +00:00
christos
5d96bf2cf0 Coverity CID 2333: Fix memory leak. 2006-04-09 19:21:26 +00:00
christos
bd21f84917 Coverity CID 1253, 1254: Don't assign the return of read or write to size_t.
It will never be negative.
2006-04-09 19:12:17 +00:00
christos
f5a5211062 It is silly to creat() and close a file just to stat it. open/fstat/close
instead checking for errors. From Coverity CID 1276.
2006-04-09 19:06:34 +00:00
christos
5800a5519e Coverity CID 2078, 2079, 2080: Plug memory leaks. 2006-04-09 19:03:32 +00:00
christos
e90cb419e0 Coverity CID 2355: Checking event for NULL is supefluous; restructure the
code to make this obvious.
2006-04-09 18:57:10 +00:00
christos
347d6ce9be Pass lint. Also fix errx/err confusion. 2006-04-09 18:54:28 +00:00
christos
61894ae043 Coverity CID 894: Avoid NULL dereference that cannot really happen. 2006-04-09 18:47:49 +00:00
christos
9d0203193c Pass lint. 2006-04-09 18:45:19 +00:00
wiz
498c64811f Note that -v is broken in this version. 2006-04-08 23:56:39 +00:00
christos
03c0fd3fc6 change an int to size_t 2006-04-08 23:27:03 +00:00
christos
258969c334 Include bsd.own.mk; from Jukka Salmi 2006-04-08 20:07:29 +00:00
mrg
0db1500b43 retire HAVE_GCC3/HAVE_GCC4 and introduce HAVE_GCC that is set to 2, 3 or 4. 2006-04-07 19:38:58 +00:00
rpaulo
32f6ca81fb snprintf returns int, not size_t. CID 691.
From bjh21.
2006-04-06 18:30:31 +00:00
simonb
372d44b647 Use TABs instead of spaces. 2006-04-06 00:48:14 +00:00
yamt
2267ff751f cuhelp: fix a typo in usage. 2006-04-05 23:30:57 +00:00
dsl
2ab52a9ec8 Rework the way that files are closed and unlinked on error.
In particular avoid calling fclose() again once it has failed.
Also multply 'oreg' by 2 once we modify the file - so we know when to
unlink it on error.
Fixes Coverty CIDs 2535 and 2536
2006-04-05 20:24:38 +00:00
dsl
4fe310d596 Avoid iswhite(EOF) - fixes coverty CIDs 365 and 1196
I'm not at all sure EOF handling is correct anyway - but it probably only
affects the last line of a file (and maybe last lines without \n).
In particular I suspect that 'ungetc(EOF, file)' doesn't do the expected
thing, and that fseek() needs to be preceeded by clearerr(). But life it short.
2006-04-05 20:03:14 +00:00
dsl
abc6183046 Don't follow node->left after free(node).
Optimise out recursion unless both node->left and node->right non-NULL.
Fixes coverty CIDs 26 and 27.
2006-04-05 19:38:47 +00:00
tron
442e61c603 Fix "MKUUCP" check so that "cu" installed if "MKUUCP" is not defined. 2006-04-05 13:04:33 +00:00
christos
a2170ce453 make sure that netid always points to an allocated string. Pointed out by
enami; thanks.
2006-04-05 12:57:29 +00:00
christos
c721423ddc Use the standard macros to compute the ioctl length instead of rolling our
own. Thanks to Chuck for noticing.
2006-04-05 00:50:59 +00:00
christos
48cf428279 Turn if/then/elif into a switch 2006-04-04 21:35:20 +00:00
christos
cda1870a45 Coverity CID 28: Fix resource leak. 2006-04-04 21:29:42 +00:00
christos
99f1624bd3 Coverity CID 97: Remove dead code. 2006-04-04 21:27:42 +00:00
wiz
e9821b1244 Sort SEE ALSO; mark up -; end sentence with dot. 2006-04-04 20:45:41 +00:00
dyoung
ca9de39d07 If MKUUCP=no, do not create links for cu and its manual page. 2006-04-04 15:09:50 +00:00
tls
76f2334c55 Use closefrom, don't iterate over file descriptors from 3 to 20. 2006-04-03 16:13:34 +00:00
tls
a973ebec53 Replace abuse of SIGIOT, SIGEMT, SIGSYS for communication between the
TIPIN and TIPOUT processes with a third "attention" pipe.  While we're
here, fix a few other minor nits like the hardcoded use of fd 3 in
consh().

Now ~+/~C appear to work.  This must have been broken for years.
2006-04-03 16:03:50 +00:00
christos
e0b8cfed06 Coverity CID 2287: Fix memory leak.
Plus:
	- change fprintf -> errx
	- remove unneeded casts
	- avoid err() shadowing
2006-04-03 15:21:26 +00:00
tls
374e37364a Move "cucommon" label (ugh) to above the O_NONBLOCK handling for direct
connections.  This stops the tipout process from spinning.
2006-04-03 14:54:16 +00:00
christos
cb82eb0f6b Redo the previous in the tip sanctioned way :-) 2006-04-03 14:12:29 +00:00
martin
d6d78510c3 printf format fixes for 64bit archs 2006-04-03 13:30:24 +00:00
he
3a81e1c420 For the benefit of our 64-bit ports, we need to cast via intptr_t when
casting from pointer to unsigned int.
2006-04-03 13:00:48 +00:00