ref: b369801b6f39ddd1aed3c13e2dcb23c61fc57ae7
dir: /lib/std/syswrap-ss+linux.myr/
use sys
use "errno"
pkg std =
$noret const exit : (status:int -> void)
pkglocal const bgetcwd : (buf : byte[:] -> errno)
;;
const exit = {status; sys.exit_group(status)}
const bgetcwd = {buf;
var err
err = sys.getcwd(buf) castto(errno)
/*
if we got a length back, it includes
the nul byte. chop that off.
*/
if err > 0
-> err - 1
else
-> err
;;
}