
14 Apr
2009
14 Apr
'09
6:26 p.m.
Quoth brian@lorf.org,
execute :: FilePath -> [String] -> IO (Either ExecuteError ExitCode)
where 'ExecuteError' is a data type representing all the ways 'execute' could fail and that 'execute p args' is supposed to
* ensure p exists * get p's permissions * ensure p is readable * ensure p is executable
* read UNIX "magic number" from first 2 bytes of p case number of "#!" -> interpret rest of line, start validation process over on interpreter file valid executable type for OS -> OK _ -> not OK
* execute p and return its exit code
Donn