summaryrefslogtreecommitdiff
path: root/sys/src/ape/lib
AgeCommit message (Collapse)Author
2014-01-20ape: remove local copy of memccpy()cinap_lenrek
2013-12-28ape: move strdup() from libbsd to libap (from sources)cinap_lenrek
including <string.h> should be enougth to make strdup() available.
2013-11-06synchronize ape's vfprintf with libstdiomischief
in ape's vfprintf we don't check if the file we're writing is actually a string buffer, resulting in a return of -1, when we should actually return the number of bytes that would be written.
2013-10-26mkfiles: do not rely on path containing the . elementcinap_lenrek
when executing generated binaries and helper scripts, always execute them as ./name instead of relying that path contsins the dot.
2013-09-26reverting semaphore lock changes from sources (r41ccd6d221da, rb28756e5ba29)cinap_lenrek
semaphore locks have much higher overhead than initially presented in the "Semaphores in Plan9" paper. until the reason for it has been found out i will revert the changes.
2013-09-21ape: change tas/sleep locks to cas/semacquire/semrelease locks (from sources)cinap_lenrek
2013-06-08ape: fix _main stack setup for arm (_privates and _errnoloc was inside argv)cinap_lenrek
2013-05-11ape: change types from unsigned long to void* for rendezvous() and ↵cinap_lenrek
segattach()/segbrk() (erik), use uniqueue rendezvous tags for _buf and listen
2013-05-06ape: remove unused variablesppatience0
2013-05-06ape: fix uninitialized variable bug in getfields()ppatience0
2013-05-06mergeppatience0
2013-05-06access: unused variableppatience0
2013-05-03ape: get rid of fixed MUXADDR for buffered i/ocinap_lenrek
instead of trying to resize the segment (which will not work when the kernel picks the address as it will allocate right before the base of the topmost segment), we create the mux segment with the maximum size needed (arround 1.4MB) for OPEN_MAX filedescriptors. buf slots will be reused and slots get demand paged once used.
2013-05-03ape: remove unused variables from _buf (from erik qunastros _bufupd patch)cinap_lenrek
2013-05-01frexp: handle NaN values (from sources)cinap_lenrek
2013-04-05ape: inet_ntop() print v4 mapped addresses in v6 as dotted quadcinap_lenrek
2013-04-02ape: inet_pton() parse dotted address to IPv4 mapped addresses for AF_INET6cinap_lenrek
2013-04-02ape: check *alen before copying in getpeername(), getsockname() and accept()cinap_lenrek
*alen has to be initialized to the size of the buffer by the caller, and we are supposed to put the real size of the address in there, but not copy more than the original *alen value (truncate).
2013-04-01ape: add inet_aton()cinap_lenrek
2013-03-31ape: initial IPv6 support, inet_pton()/inet_ntop(), getaddrinfo()/getnameinfo()cinap_lenrek
2013-03-29ape: fix potential double close in socket() and protect rock chain with spinlockcinap_lenrek
2013-03-11ape: threadsafe errnocinap_lenrek
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>.
2013-03-11ape: fix thread race with close() and select()cinap_lenrek
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.
2013-03-11ape/malloc: make malloc and free threadsafe for pythoncinap_lenrek
2013-03-11ape/stdio: make fopen() quasi threadsafe for pythoncinap_lenrek
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.
2013-03-10ape: check for invalid filedescriptors in select()cinap_lenrek
2013-02-28ape: add PASS_MAX constant for getpass() to limits.h (from patch/ape-pass_max)cinap_lenrek
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).
2013-02-08ape: fix bug in access()ppatience0
2013-01-09ape: fix getsockname() byte swaped ports (by yarikos)cinap_lenrek
APE's getsockname() returns port with bytes swapped (on 386).
2012-12-31fix utf and rune handling in preparation for 32bit runescinap_lenrek
2012-12-03ape: fix memory leak and path limit in unlink()cinap_lenrek
db1 was leaked, and newname could overflow. fixed.
2012-12-03ape: forgot to set errno in access() for dir create failcinap_lenrek
2012-12-03ape: fix _grpmems(), access(), getppid(), cleanupcinap_lenrek
_grpmems() was broken tokenizing group list in place. we have to copy it to status buffer before tokenizing. dynamically alloc path for test file to check write permission on directory and add pid to the name to prevent races. use _OPEN instead of ape open to read /dev/ppid in getppid(). use mode enums instead of numeric constants for _OPEN() and _CREATE().
2012-12-03ape: putenv, add file :)cinap_lenrek
2012-12-03ape: fix putenv()cinap_lenrek
writing /env in putenv() doesnt work. exec will create new enviroment anyway. we have to modify environ array!
2012-12-03ape: fix more bugs, use /env and /proc instead of #e and #p, cleanupcinap_lenrek
remove envname length limitation in _envsetup() by using allocated buffer and use /env instead of #e use /proc and getpid() instead of #p and #c in readprocfdinit() fix buffer overflow in execlp(), check if name of failed exec starts with / . or is \0 make sure not to close our own filedescriptors for FD_CLOEXEC in execve(), fix wrong length check for flushing buffer to /env/_fdinfo. fix error handling cases. copy the enviroment before decoding \1 to \0 because the strings in environ[] array might not be writable. remove bogus close if we fail to open ppid file in getppid() and use /dev/ppid instead of #c/ppid
2012-12-03ape: initialize _tos and use _tos->pid for getpid()cinap_lenrek
2012-12-02ape: fix buffer overflow in _envsetup()cinap_lenrek
2012-08-19calloc: check multiplication overflowcinap_lenrek
2012-07-30import updated compilers from sourcescinap_lenrek
2011-06-04ape: fix symbol name collision for by renaming static timezone struct to tzcinap_lenrek
2011-06-03fixed mktime bugaiju
2011-06-04fixed tzset(), hopefully hg timezone bug should be fixed nowaiju
2011-06-03added (unfinished) nanosleep to APEaiju
2011-05-10ape: fix fread/fwrite, python: disable bytecode dumps, inst: rename textonly ↵cinap_lenrek
to start and remove inst/gui, add sys/lib/rootbind, cisfd(8) manpage
2011-05-09fixed freadaiju
2011-05-09fixed fwrite (hopefully didn't break anything)aiju
2011-05-03build ape/z before everything else (openssl)cinap_lenrek
2011-05-03ape: fix broken chmod for directories. (makes hg work again)cinap_lenrek
2011-05-03remove stuffcinap_lenrek