summaryrefslogtreecommitdiff
path: root/sys/src/9/port/devenv.c
AgeCommit message (Collapse)Author
2022-01-23devenv: allow environment total size of up to 1MBcinap_lenrek
Sometimes, there is the one-off occation when one needs to pass a huge list in rc... This change makes devenv track total memory consumption of environment groups allowing them to grow up to 1MB in size (including overhead). (Before, only the variable size was restricted, but not the amount of files being created). The maximum value size of a single environment variable is set to half of the total size, which allows the occational large value. (But not many of them). Because we track all memory consuption, it is also now possible to create around 10k small environment variales. A hashtable is added for name lookups and the qid.path was changed to allow direct indexing into the entry array without needing a scan lookup. All smalloc() calls have been removed, exhaustion is handled with error(Enomem) avoiding deadlock in case we run out of kernel memory.
2018-06-03devenv: make #ec files not show up as world writablecinap_lenrek
2015-11-22devenv: fix ORCLOSE handlingcinap_lenrek
when opening a /env file ORCLOSE, and the process exits, envgrp() would return nil can crash in envremove() because procexit will have set up->egrp to nil before calling closefgrp(). the solution is to capture the environment on open, keeping a reference in Chan.aux, so it doesnt matter on what process the close happens and a env chan will always refer to its original environment group.
2015-08-03devenv: simplify envremove(), cleanupcinap_lenrek
2015-08-02devenv: avoid indirection, keep Evalue's allocated in an arraycinap_lenrek
avoid the indirection for envlookup() by allocating Evalue structs together in an array. remove unused link field in Evalue.
2014-08-13devenv: prevent non-hostowner from creating or removing variables in '#ec', ↵cinap_lenrek
cleanup
2012-02-08add Etoolong error string, cleanup genbuf truncation fixcinap_lenrek
2012-02-08fix endless devwalk loops caused by genbuf truncationcinap_lenrek
2012-02-06make smalloc() uninterruptable as most callers cant handle it anywaycinap_lenrek
2011-08-17change definition of Chan.create to return a chan like opencinap_lenrek
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen