Giacomo Tesio
99855d60d6
Added wdir to devself and devproc: - read '#0/wdir' to get the working directory of the calling process NOTE that a read(fd, nil, -1) will return the negated length of the working directory, just in case you want to allocate the memory required - read '/proc/n/wdir' to know the working directory of process n (read(fd, nil, -1) still returns the negated length) - write '#0/wdir' to change the working directory of the calling process NOTE: no offset is allowed and the provided string must be null terminated - write '/proc/n/wdir' to change the working directory of process n NOTE: no offset is allowed and the provided string must be null terminated; moreover if another process change the working directory change during the write, the current process will receive an error. In libc updated getwd() and chdir(). Also modified pwd to get advantage of the new file. To test, run /arch/amd64/qa/kern/wdir.rc or simply try % pwd /usr/glenda % echo -n /tmp > /proc/$pid/wdir % pwd /tmp % cat '#0/wdir' && echo /tmp The expected use cases for wdir in devproc are rio and acme. Also, note that we could theoretically remove the cd builtin from rc and simply implement it as a rc function. We don't do that to preserve rc portability to other OS. |
||
---|---|---|
arch | ||
cfg | ||
doc/license | ||
hacking@b77038020c | ||
lib | ||
mnt | ||
pkgs | ||
qa | ||
sys | ||
tmp | ||
usr/glenda | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
build.json | ||
LICENSE.md | ||
README.md |
Jehanne
Jehanne is a simple operating system.
Jehanne has noble ancestors:
- most of userland tools, a lot of wisdom and some kernel modules, come from 9front
- the kernel is a fork of Charles Forsyth's Plan9-9k
- most of the build system and some valuable piece of code come from Harvey OS
Still the project is named after a humble peasant, the famous French heretic Joan of Arc, because it diverges deeply from the design and conventions of its predecessors.
Overview
This is the main repository, used to build the system as a whole:
- arch contains one folder for each supported architecture, with specific C headers, libraries and executables (note that by architecture we intend any kind of physical or virtual machine that is able to run code, thus rc is actually an architecture)
- sys is the system folder
- doc contains useful documentation for Jehanne development
- hacking contains the utilities used to develop Jehanne
- qa contains the regression tests
- mnt contains default mount targets
- usr contains the users' folders
- pkgs will contains the installed packages
The running system also includes supplemental folders like /lib
,
/cmd
and /dev
that are bound during the boot as required.
Build
To build Jehanne and play with it, you need to have git, golang, qemu, gcc, binutils and bison installed. For example on Debian GNU/Linux you should be able to get going with
sudo aptitude install git golang build-essential bison qemu-system
After the repository clone, you can give a look with
git submodule init # we have a lot of submodules
git submodule update --init --recursive --remote
./hacking/devshell.sh # start a shell with appropriate environment
./hacking/continuous-build.sh # to build everything (will take a while)
./hacking/runOver9P.sh # to start the system in QEMU
./hacking/drawterm.sh # to connect Jehanne with drawterm
Hacking
Jehanne is a work in progress. Forks and pull requests are welcome.
In doc/hacking you will find all you need to know about its principles, design and weirdness.
There's a lot of work to do, in every area of the system.
To coordinate our efforts, we use the github issues. To discuss (and even debate) about the design and development of Jehanne we use the JehanneOS mailing list: please join and present yourself and your attitudes.