             line.replace /\0/g, EOL
     if text?
       debug "sending stdin text to #{modPath}"
-      process.process.stdin.write "#{text}\x04#{EOL}"
+      process.process.stdin.write "#{text}#{EOT}"
     process.onWillThrowError ({error, handle}) ->
       console.warn "Using fallback child_process because of #{error.message}"
       child = CP.execFile modPath, cmd, options, (cperror, stdout, stderr) ->

CP = require('child_process')
{debug} = require './util'
{EOL} = require('os')

module.exports =
class GhcModiProcessBase

        callback []
      if text?
        debug "sending stdin text to #{modPath}"
        child.stdin.write "#{text}#{EOT}"
      handle()

  runModiCmd: ({dir, options, command, text, uri, args, callback, legacyInteractive}) =>
