shithub: mc

ref: 2c27f80bb5f4d8084f1d8cf9d01c4377dba92c2f
dir: /libstd/waitstatus-osx.myr/

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

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

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