Skip to content

SIGINT ignored after a failed callProcess #15

Description

@DaveCTurner

On Linux, the following program does not exit on SIGINT. If "does-not-exist" is replaced with a program that does exist (e.g. "echo") then it continues to respond to SIGINT.

import Control.Concurrent
import Control.Exception
import Control.Monad
import System.IO
import System.Process

ignoreIOException :: IOException -> IO ()
ignoreIOException _ = return ()

main = do
  _ <- forkIO $ callProcess "does-not-exist" [] `catch` ignoreIOException
  _ <- getLine
  return ()

Unlike with #14 (which may well be related - it's a similar test case) I am at a loss as to what the fix might be!

Activity

  1. dcoutts commented on Jan 10, 2015

    @dcoutts
    Contributor

    Good catch. I've got a fix.

  2. hvr commented on Jan 15, 2015

    @hvr
    Member

    Please re-open if this isn't fixed by #16

  3. DaveCTurner commented on Jan 15, 2015

    @DaveCTurner
    ContributorAuthor

    Just to confirm, it's fixed by #16.

    Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions