Age | Commit message (Collapse) | Author |
|
in log: we ensure we panic by killing our process group with SIGTERM,
raising it for ourselves, and exiting (if all else fails simply).
in init: we catch SIGTERM and exit with 0 if we get it, as bash (and
likely others) prints a nasty "Terminated" to stderr
|
|
|
|
also: change panic signal to be SIGKILL as sigint being caught would
result in a loop
|
|
also: modify log to exit status 0 on panic instead of 1 (only runs exit
on panicmode respawn which shouldn't cause a fatal termination)
|
|
|
|
move spin locks to dedicated function so we can minimise repetition of
code. now uses more C and less assembly.
init.c uses 8192 * 512 as a maximum even if the stack rlimit is larger
|
|
|
|
|
|
|
|
(also add loglevel for failed to reap message)
token is required and init will panic without TOKEN in the environment
|
|
(log)
- create LOGLEVEL constant numbers
- implement CONSOLE_LOGLEVEL
- color array now uses loglevel constants
- timestamp now shown (thanks util-linux)
(init)
- register mainpid
- hello world print
- fix process reaper to refer to subsys when reaping
(subsys)
- create maximum subsystem count
- create subsystem table
- add debugging prints to subsystem entry and termination
- create function to handle process termination (unmap stack, free
subsystem malloc, clear entry in table)
- disable subsystem inception
- change die references to fail with print
- supply clone with signal to send on termination (SIGCHLD)
|
|
sprinkle a little bit of commenting throughout the codebase. hopefully
i dont regret what i've written
- clone: bottom of stack is passed through
- print: write newline at end of message
- initcall: functions return void type
very basic net startup. hopefully i dont regret implementing the
websocket protocol myself in a language as holy as C.
|
|
- create subsystem system using clone syscall, shared memory, shared
file descriptors
- printk-like logging facility (TODO: console loglevel)
- initcall system (like linux kernel)
TODO: determine license
factors: linker.ld, linux kernel licensing (some ideas are more
liberally taken rather than paraphrased)
|