summaryrefslogtreecommitdiff
path: root/sys/src/cmd/rc/havefork.c
AgeCommit message (Collapse)Author
2022-01-03rc: make it portable (for UNIX)cinap_lenrek
Fixup remaining Plan9 dependencies (chartorune()). Add Makefile for UNIX-like systems (tested with Linux and APE). Make error printing consistent, use Errstr() explicitely. Get rid of NSTATUS buffer limit, just malloc it.
2021-12-31rc: fix everythingcinap_lenrek
Untangle the lexer and interpreter thread state. Fix the file and line number error reporting, getting rid of Xsrcfile instruction, as the whole code block can only come from a single file, stuff the source file in slot[1] of the code block instead. Remove limitations for globber (path element limits) and be more intelligent about handling globbing by inserting Xglob instruction only when needed and not run it over every Xsimple argument list. Remove fragile ndot magic and make it explicit by adding the -q flag to . builtin command. Add -b flag for full compilation. Make exitnext() smart, so we can speculate thru rcmain and avoid the fork(). Get rid of all print(2) format functions and use io instead. Improve the io library, adding rstr() to handle tokenization, which allows us to look ahead in the already read buffer for the terminators, avoiding alot of string copies. Auto indent pcmd(), to make line number reporting more usefull. Implement here documents properly, so they can work everywhere.
2018-09-08rc: fix Xpipefd unbalancing the redir stackcinap_lenrek
Xpipefd wants the pipe descriptor to be closed in turfredir(), so it pushes the redirection, but this breaks Xpopredir after normal redirection. so we shuffle the Xpipefd redir to the bottom of the stack.
2016-06-30rc: implement 9atoms ` split {command} syntax extensioncinap_lenrek
2016-05-16rc: remove historical unix and win32 portscinap_lenrek
2013-08-20rc: flush environment variables (update /env) before forkcinap_lenrek
on races... normal forks will all share the /env environment but not the in memory variables of rc. so when we would normally fork whoever does an exec (flush) first will override what the values of the /env variables are, *independent* of the variables that where actually modified *in* the process. when we flush *before* fork, then at least both processes start out with marked clean in memory variables and the processes will flush only the things they actually change.
2012-02-08rc: remove silly efree checkcinap_lenrek
2012-02-08rc: change plan9 envname limit to 128, cleanupcinap_lenrek
2011-04-04erik's patches to lift 8192 byte word size restrictionstanley lieber
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen