store errno on the private process stack so its always per process
and not just per memory space. errno itself becomes a macro
dereferencing int *_errnoloc; which is initialized from main9.s
pointing to the private stack location.
various fixes in programs that just imported errno variable with
"extern int errno;" instead of including <errno.h>.
in ape close(), do the real filedescriptor _CLOSE() *after* we cleared
the _fdinfo[] slot because once closed, we dont own the slot anymore and
another process doing open() can trash the slot. make sure open() retuns
fd < OPEN_MAX.
double check in _startbuf() holding mux->lock if the fd is already buffered
preveting running double copyprocs on a fd.
dont zero the mux->rwant/ewant bitmaps at the end of select() as we do not
hold the mix->lock.
in _closebuf() kill copyproc while holding the mux->lock to make sure the
copyproc isnt holding it at the time it is killed. run kill() multiple times
to make sure the proc is gone.
python uses processes sharing memory. it requires at least fopen() to
be called by multiple threads at once so we introduce _IO_newfile()
which allocates the FILE structure slot under a lock.
diskparts fails on thinkpad x200 sdcard reader if we dont
give the unit some time to startup. the device took about
100ms to become ready so status poll loop with a long
timeout would be overkill.
1. Go group spotted that a slightly-obscured pointer move was done by AMOVL not AMOVQ.
2. Inspecting the code further, I noticed that other pointer types were set to TLONG not TIND,
causing similar truncation of pointers to 32 bits.
add PASS_MAX to limits.h for ape, and make getpass respect it. also increase the size of
the maximum passwords (we use long ones at work). Needed for native port of SVN (in progress).
the kernel would go into endless loop when stating "stats" and "ifstats"
files and the network interface having no connections, or otherwise return
wrong stat info.