2 % (c) The GRASP/AQUA Project, Glasgow University, 1995
4 \subsection[system.lc]{system Runtime Support}
11 #ifdef HAVE_SYS_WAIT_H
30 switch(pid = fork()) {
39 execl("/bin/sh", "sh", "-c", cmd, NULL);
43 while (waitpid(pid, &wstat, 0) < 0) {
52 return WEXITSTATUS(wstat);
53 else if (WIFSIGNALED(wstat)) {
54 ghc_errtype = ERR_INTERRUPTED;
55 ghc_errstr = "system command interrupted";
58 /* This should never happen */
59 ghc_errtype = ERR_OTHERERROR;
60 ghc_errstr = "internal error (process neither exited nor signalled)";