Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
process
Commits
a079a257
Commit
a079a257
authored
Jun 02, 2013
by
ian@well-typed.com
Browse files
Fix process004 following the error improvements
parent
6cdeb1e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/process004.hs
View file @
a079a257
module
Main
where
import
System.IO.Error
import
System.Process
main
=
do
main
::
IO
()
main
=
do
test1
`
catchIOError
`
\
e
->
putStrLn
(
"Exc: "
++
show
e
)
test2
`
catchIOError
`
\
e
->
putStrLn
(
"Exc: "
++
show
e
)
test1
::
IO
()
test1
=
do
(
_
,
_
,
_
,
commhand
)
<-
runInteractiveProcess
"true"
[]
(
Just
"/no/such/dir"
)
Nothing
exitCode
<-
waitForProcess
commhand
print
exitCode
test2
::
IO
()
test2
=
do
commhand
<-
runProcess
"true"
[]
(
Just
"/no/such/dir"
)
Nothing
Nothing
Nothing
Nothing
exitCode
<-
waitForProcess
commhand
print
exitCode
tests/process004.stdout
View file @
a079a257
Ex
itFailure 126
Ex
itFailure 126
Ex
c: true: runInteractiveProcess: runInteractiveProcess: chdir: does not exist (No such file or directory)
Ex
c: true: runProcess: runInteractiveProcess: chdir: does not exist (No such file or directory)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment