
Prozessunabhängige Schnittstelle zu Linux-Systemaufrufen
Für weitere Details zu den Konzepten und der Motivation hinter rsyscall lesen Sie die [[file:docs/conceptual.org][konzeptionelle Einführung]].
Beachten Sie, dass die rsyscall Python-API einige neuere Python-3-Funktionen verwendet: async/await und Typannotationen. Wenn Sie diese noch nicht gesehen haben, überfliegen Sie zuerst das [[file:docs/background.org][Hintergrund-Tutorial]].
Aber wenn Sie es ausprobieren möchten, können Sie dies mit Nix tun: #+begin_src bash git clone https://github.com/catern/rsyscall cd rsyscall/python nix-shell python #+end_src
Oder Sie können es von Hand in einer virtuellen Umgebung bauen: #+begin_src bash git clone https://github.com/catern/rsyscall cd rsyscall python3 -m venv venv . venv/bin/activate pip install -U pip
cd c autoreconf -fvi ./configure --prefix=$PWD/../venv make install cd .. export LD_LIBRARY_PATH=$PWD/venv/lib export PKG_CONFIG_PATH=$PWD/venv/lib/pkgconfig
pip install -e python/ python #+end_src
In [2]: import rsyscall
In [3]: t = await rsyscall.local_process.fork()
In [4]: await t.stdout.write(await t.ptr("Hello world!\n")) Hello world! #+end_example