Release console for ghci wrapper
authorTamar Christina <tamar@zhox.com>
Tue, 26 Sep 2017 18:43:15 +0000 (19:43 +0100)
committerTamar Christina <tamar@zhox.com>
Tue, 26 Sep 2017 18:43:15 +0000 (19:43 +0100)
commit3ec579d5d13dd00af58380a34daa2d57f0b9aa9e
tree17a3c921cdf6d85a5e4ad1d17d90c6707c16bad4
parentf9f1e38c204c0d294d31398c8c300fba3d89f450
Release console for ghci wrapper

Summary:
It seems the call that caused issues with the gcc wrapper before
was needed for the ghci wrapper in order for the child process
to be the one handling console events.

This code slightly refactors the wrappers to make sure only ghci
calls FreeConsole and nothing else.

Test Plan: ./validate , open ghci.exe press ctrl+c

Reviewers: RyanGlScott, austin, hvr, bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie, erikd

GHC Trac Issues: #14150

Differential Revision: https://phabricator.haskell.org/D4028
driver/gcc/gcc.c
driver/ghc/ghc.c
driver/ghci/ghci.c
driver/haddock/haddock.c
driver/utils/cwrapper.c
driver/utils/cwrapper.h