shithub: mc

ref: 5a07a949b3667e0f0b97156035104d35f6aea2a5
dir: /libstd/waitstatus-osx.myr/

View raw version
use "die.use"
pkg std =
	type waitstatus = union
		`Waitexit int64
		`Waitsig  int64
		`Waitstop int64
	;;

	const waitstatus	: (st : int64 -> waitstatus)
;;

const waitstatus = {st
	match st & 0o177
	| 0:	-> `Waitexit (st >> 8)
	| 0o177:-> `Waitstop (st >> 8)
	| sig: 	-> `Waitsig sig
	;;
	die("unreachable")
}