Ticket #5946 (closed bug: fixed)

Opened 15 months ago

Last modified 15 months ago

getAnyProcessStatus signals an exception

Reported by: toc Owned by: simonmar
Priority: high Milestone: 7.4.2
Component: libraries/unix Version: 7.0.4
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: x86_64 (amd64)
Type of failure: Runtime crash Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Steps to reproduce:

$ ghci-7.0.4
Prelude> import System.Posix
Prelude System.Posix> getAnyProcessStatus False False

Expected result:

Nothing

Actual result:

*** Exception: getGroupProcessStatus: does not exist (No child processes)

Tested on 6.12.1 and 7.0.4, Mac OS X 10.7 and Ubuntu 10.04.4 LTS.

Change History

Changed 15 months ago by simonmar

  • difficulty set to Unknown

Nothing means "there are children but none of them have completed" (i.e. waitpid() returned 0), whereas the exception corresponds to waitpid() returning -1 and ECHILD. So the behaviour closely models waitpid().

I think we should fix the docs.

Changed 15 months ago by simonmar

  • priority changed from normal to high
  • milestone set to 7.4.2

Changed 15 months ago by simonmar

  • owner set to simonmar

Changed 15 months ago by simonmar

  • status changed from new to merge

Fixed the docs:

commit e518038a0eca7dddbbd3d4326355db9c1d6f0068
Author: Simon Marlow <marlowsd@gmail.com>
Date:   Fri Mar 23 15:10:17 2012 +0000

    fix documentation for getAnyProcessStatus/getGroupProcessStatus (#5946)

Changed 15 months ago by pcapriotti

  • status changed from merge to closed
  • resolution set to fixed

Merged as 4152c1b17d8633dac8f830f334688393e527b061.

Note: See TracTickets for help on using tickets.