David Crawshaw
297b3d6fa4
staticcheck.conf: turn off noisy lint errors
...
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
2021-06-18 15:48:20 -07:00
Josh Bleecher Snyder
bfd2b71926
portlist: suppress staticcheck error
...
Signed-off-by: Josh Bleecher Snyder <josharian@gmail.com>
2021-05-04 08:54:50 -07:00
Brad Fitzpatrick
c0befee188
portlist: use windows OpenCurrentProcessToken, not GetCurrentProcessToken
...
The latter only works on Windows 8+.
Also add a TODO to get do this all more efficiently.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-04-12 09:23:52 -07:00
Brad Fitzpatrick
8f76548fd9
tempfork/osexec: remove old fork of os/exec
...
This package was a temporary fork of os/exec to fix an EINTR loop
bug that was fixed upstream for Go 1.15 in
8c1db77a92
(https://go-review.googlesource.com/c/go/+/232862 ), in
src/os/exec_unix.go:
8c1db77a92 (diff-72072cbd53a7240debad8aa506ff7ec795f9cfac7322e779f9bac29a4d0d0bd4)
2020-11-18 08:42:43 -08:00
Brad Fitzpatrick
4a92fc9dc5
portlist: fix tests on Windows when not running as Administrator
...
Updates #50
2020-10-28 09:19:41 -07:00
Brad Fitzpatrick
2ca2389c5f
portlist: set SysProcAttr.HideWindow on Windows
...
Prevents annoying shell window flashes when running /server by hand.
2020-06-08 09:04:31 -07:00
David Anderson
9396024bd7
portlist: move code around to avoid unused function warnings.
2020-04-30 20:31:44 -07:00
Brad Fitzpatrick
120273d7f6
portlist: document, clean up, fix an open fd spike, optimize a bit
...
I noticed portlist when looking at some profiles and hadn't looked at
the code much before. This is a first pass over it. It allocates a
fair bit. More love remains, but this does a bit:
name old time/op new time/op delta
GetList-8 9.92ms ± 8% 9.64ms ±12% ~ (p=0.247 n=10+10)
name old alloc/op new alloc/op delta
GetList-8 931kB ± 0% 869kB ± 0% -6.70% (p=0.000 n=10+10)
name old allocs/op new allocs/op delta
GetList-8 4.59k ± 0% 3.69k ± 1% -19.71% (p=0.000 n=10+10)
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-03-13 21:06:41 -07:00
Earl Lee
a8d8b8719a
Move Linux client & common packages into a public repo.
2020-02-09 09:32:57 -08:00