(* import foreign function *) val fork = _import "fork_wrapper" : unit -> int; (* fork and print from child and parent *) val _ = case fork () of 0 => print "[ML] child\n" | pid => print ("[ML] parent of " ^ Int.toString pid ^ "\n")