aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-01-29libhtml: fix array bounds in lexXiao-Yong Jin1-1/+1
2021-01-14libthread: call setpgrp in programs that will backgroundRuss Cox1-0/+7
This fixes the 'run stats from rc; exit rc; stats dies' problem. It's unclear whether this is the right fix or whether rc should be starting all its interactive commands in their own process groups. But at least it does fix stats dying.
2021-01-14sam: avoid out-of-bounds read in rtermRuss Cox1-2/+2
Usually r->nused < r->nalloc and the read is in bounds. But it could in theory be right on the line and reading past the end of the allocation. Make it safe but preserve as much of the old semantics as possible. This use of rterm appears to be only for optimization purposes so the result does not matter for correctness.
2021-01-14sam: remove backward ?:Russ Cox1-1/+1
The exit code here is ignored anyway.
2021-01-14rc: do not exit on EINTR from readRuss Cox1-1/+10
This happens if lldb attaches to rc.
2021-01-14lib9: reject postnote with special pidsRuss Cox1-0/+5
2021-01-14auxstats: do not postnote 0Russ Cox1-1/+2
2021-01-05acme, sam, samterm: remove weird switch usageRuss Cox4-6/+10
For whatever reason all three of these programs contain switches like: switch(x) { case 1: if(cond) case 2: f(); } Like Duff's device, this is legal C but more obscure than it really needs to be. This commit assumes those are intended as written and simply writes them more clearly. I did consider that maybe they are mistakes, but in the case of sam/regexp.c, my rewrite in this commit matches the acme/regx.c that has been in plan9port since I added acme in 2003. (I didn't bother to dig up the old Plan 9 releases.) Assuming acme/regx.c has been correct for the past two decades, this commit should be correct too.
2021-01-05sam: rm dregsRuss Cox4-293/+0
2021-01-05stats: add threadmaybackgroundRuss Cox5-40/+49
2020-12-30acme: allow @ in file namesRuss Cox1-1/+1
For upspin and other tools that put email addresses in names.
2020-12-30wintext: add to moveplan9.files (#470)Jacob Vosmaer1-0/+1
2020-12-309term: add threadmaybackgroundRuss Cox1-0/+6
2020-12-30.gitignore: add LOCAL.config and lib/fortunes.indexRuss Cox1-0/+2
2020-12-30.gitignore: more binariesRuss Cox1-0/+48
2020-12-30libthread: drop schedlockRuss Cox2-2/+1
Having two locks in the proc was causing deadlocks.
2020-12-309c: drop PLAN9PORT_ASANRuss Cox1-9/+0
It is no longer special.
2020-12-30tcolors: add threadmaybackgroundRuss Cox1-0/+6
2020-12-309a: remove a few mentionsRuss Cox2-16/+2
2020-12-30.gitignore: enumerate ignored parts of bin/Russ Cox1-17/+218
2020-12-30all: remove $OBJTYPE from buildRuss Cox56-1291/+41
Now that we assume pthreads, the only assembly left is in libmp and libsec. We only ever added assembly for 386. The portable C code is fine for plan9port.
2020-12-30wintext: use rc not bashRuss Cox1-14/+9
2020-12-309term: use openpty on NetBSDNicola Girardi1-0/+16
Fixes #376.
2020-12-30devdraw: add /usr/X11R7 for NetBSDRuss Cox1-0/+2
Fixes #362.
2020-12-30libthread: simplifyRuss Cox23-1477/+12
Now that everything uses pthreads and pthreadperthread, can delete various conditionals, all the custom context code, and so on. Also update documents. Fixes #355.
2020-12-30libthread: make pthreadperthread the defaultRuss Cox2-21/+15
2020-12-30libthread: fix pthreadperthread bugsRuss Cox2-107/+187
2020-12-30libthread: add threadmaybackgroundRuss Cox19-21/+120
Programs that want to background themselves now need to define threadmaybackground returning 1. This avoids a confusing (to people and debuggers) extra parent process for all the threaded programs that will never want to background themselves.
2020-12-30libthread: delete NetBSD special caseRuss Cox4-465/+4
I added a direct call from thread.c to pthread.c's _threadpthreadstart in May, and no one has complained about NetBSD being broken. So probably no one is using this on NetBSD at all. Make pthread the only option.
2020-12-309c: use -fcommon for clangRuss Cox1-0/+1
Fixes #469.
2020-12-15libthread: fix use after free of first thread in each procRuss Cox1-1/+9
This was causing sporadic but frequent crashes at startup in 9pserve on the new M1 Macs, correctly diagnosing a use-after-free.
2020-12-15time: print 1s of millisecondsRuss Cox1-3/+3
2020-09-279c, 9l: updates for macOS arm64.Anthony Sorace2-0/+7
2020-08-15all: a few more #define tricks for AIXRuss Cox2-0/+36
This should make the AIX build finally work. Fixes #400.
2020-08-15tmac: rename IM (italic manual) to MR (manual reference)Russ Cox286-1588/+1591
Suggested by G. Brandon Robinson.
2020-08-15fontsrv: fix handling of colored glyphs (emoji)Russ Cox1-5/+17
Drawing as white on black to produce a mask only works if the white on black is the inversion of black on white. Emoji that force use of specific colors don't respect that. Draw black on white and invert to mask separately.
2020-08-13tmac: introduce real manual reference macro instead of overloading IRRuss Cox297-1774/+1790
The overloading of IR emits magic \X'...' sequences that turn into HTML manual links. But not all such IR invocations should be manual links; those had to be written to avoid the IR macro before. Worse, the \X'...' ending the IR causes troff to emit only a single space after a period. Defining a new IM macro for manual references fixes both problems. Fixes #441.
2020-08-08touch: fix for OpenBSD.James Cook1-1/+1
This fixes https://github.com/9fans/plan9port/issues/436 This doesn't necessarily address the underlying issue: calling p9create with mode = OREAD should probably be allowed, but currently doesn't work on OpenBSD.
2020-07-22fontsrv(4): update man page for size of fontsrv subfontsRuss Cox1-8/+8
Fixes #432.
2020-07-22devdraw, libdraw: fix memory leaks by freeing getns() malloced string (#431)Igor Böhm2-4/+11
2020-07-18acme: add font control messageRuss Cox2-1/+24
2020-07-18draw: use int for Cacheinfo x fieldRuss Cox1-1/+1
With very large fonts (72pt or so) I see bad cache glyphs, and this fixes it. Not entirely sure exactly which code is overflowing, but something is.
2020-06-22src/cmd: rm dformatRuss Cox1-108/+0
Unclear why it is here (wkj added it long ago). It has never been installed into $PLAN9/bin, so it's doubtful that anyone has ever used it. Arnold Robbins has an alternate version at https://github.com/arnoldrobbins/dformat. Fixes #421.
2020-06-15libthread: use libc functions in ucontext for macOS (#417)Xiao-Yong3-81/+3
2020-06-04fontsrv: fix compilation on X11 (#420)Gregor Best1-0/+1
2020-05-30osxvers: use swvers -productVersion to skip one awk callRuss Cox1-1/+1
Fixes #406. Suggested by nms42.
2020-05-29ed(1): fix documentation for list modeRuss Cox1-36/+36
I changed from 6 to 8 digits but forgot to update the man page.
2020-05-29ed: handle Unicode beyond the BMP correctly in list mode.sean2-11/+42
List mode was constrained to the BMP. This change introduces the following new list mode convention, using Go string literal syntax: Non-printing ASCII characters display as \xhh. Non-ASCII characters in the BMP display as \uhhhh. Characters beyond the BMP display as \Uhhhhhhhh.
2020-05-29devdraw: accept 5- and 6-byte Unicode hex valuesRuss Cox2-15/+45
Alt X 1234 for U+1234 Alt X X 12345 for U+12345 Alt X X X 103456 for U+103456.
2020-05-29fontsrv: scale f->originy to match f->height on x11dzklaim1-1/+1
Co-authored-by: dzklaim <smmoth.rp@gmail.com>