Jehanne Operating System http://jehanne.h--k.it
Go to file
Giacomo Tesio 713eb8843f libc: simplify access; libposix: let access lie
There are a few issues with Plan 9's `access`:

- it has side effects: to test the actual access (that the file
  servers can allow or deny according to complex custom rules)
  it opens and then closes the file, allocating (and disposing) the fd
- it does not work on directories, since
  - they cannot be opened for writing, despite the fact that to
    create a file in a directory you must be granted write access on
    that directory
  - they cannot be opened for execution, despite the fact that to
    access a file in a directory you must be granted execution access
    on that directory

Despite the fact that `access` (even on UNIX) is a violation of the
"tell, don't ask" principle (the access could be forbidden just after
its successful return, making subsequent `open` fail anyway), this
fact smells of a little design error in the file interface.

So, right now we choose to let the libposix's `access` lie on directories:
it will always return 0 on AWRITE and AEXEC for them, accepting that
a successive create/mkdir may fail.

However, a cleaner file API and protocol should allow a simpler `access`
to be implemented for directories too.
2017-08-29 00:17:51 +02:00
arch libposix: implemented getcwd, getlogin, getlogin_r, getpass, pread and pwrite 2017-08-21 00:20:12 +02:00
cfg Revert "cfg/startup: start as terminal" 2016-11-29 23:13:24 +01:00
doc published: doc/hacking/overview.md 2017-01-20 01:53:06 +01:00
hacking@83eeb61e84 newlib: add access(2) 2017-08-28 23:04:32 +02:00
lib lib/namespace: bind #0 to /dev 2016-12-31 00:46:34 +01:00
mnt Added root folders mnt/ pkgs/ and tmp/ 2015-12-22 11:46:42 +00:00
pkgs Added root folders mnt/ pkgs/ and tmp/ 2015-12-22 11:46:42 +00:00
qa libc: simplify access; libposix: let access lie 2017-08-29 00:17:51 +02:00
sys libc: simplify access; libposix: let access lie 2017-08-29 00:17:51 +02:00
tmp Added root folders mnt/ pkgs/ and tmp/ 2015-12-22 11:46:42 +00:00
usr/glenda first usable version of kernel and commands 2016-11-26 03:49:29 +01:00
.gitignore first usable version of kernel and commands 2016-11-26 03:49:29 +01:00
.gitmodules Add devtools (as submodule) in hacking/ 2015-12-22 10:38:12 +00:00
.travis.yml .travis.yml: try gcc-4.9 2017-04-22 17:47:51 +02:00
LICENSE.md improve README.md and LICENSE.md 2017-01-14 12:39:05 +01:00
README.md README.md: git submodule update --depth 1 (as newlib has a lot of history) 2017-04-23 12:25:10 +02:00
build.json newlib: run first QA checks 2017-04-22 00:46:55 +02:00

README.md

Build Status Coverity Badge

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
    • include contains portable C headers
    • lib contains data and scripts used by the running system
    • man contains manual pages
    • src contains the sources of the system
  • doc contains useful documentation for Jehanne development
    • license contains detailed info about Jehanne licenses
    • hacking contains details about how to build and modify Jehanne
  • 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 flex 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 --depth 1
./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.