Opened 6 years ago

Last modified 8 days ago

#2123 new task

implement waitForProcess using signals

Reported by: simonmar Owned by:
Priority: lowest Milestone: 7.6.2
Component: libraries/process Version: 6.8.2
Keywords: Cc: redneb@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Moderate (less than a day)
Test Case: Blocked By:
Blocking: Related Tickets:

Description

waitForProcess currently calls waitpid with a safe FFI call, which means that

  • you need to use -threaded to call this in a multithreaded program
  • one OS thread is needed per waitProcess

instead we could implement this using the IO manager: have waitForProcess communicate with the IO manager, which wakes up the client when the appropriate SIGCHLD is received. Note that this means hooking SIGCHLD so we'd interact badly if the program itself wanted to use SIGCHLD.

I think it was Duncan Coutts who mentioned this idea to me.

Change History (13)

comment:1 Changed 6 years ago by duncan

The other advantage is that ProcessHandles become safe to discard/forget without ending up with defunct zombie processes under Unix.

comment:2 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:3 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple

comment:4 Changed 5 years ago by igloo

  • Milestone changed from 6.10 branch to 6.12 branch

comment:5 Changed 4 years ago by simonmar

  • Difficulty changed from Moderate (1 day) to Moderate (less than a day)

comment:6 Changed 4 years ago by igloo

  • Milestone changed from 6.12 branch to 6.12.3

comment:7 Changed 4 years ago by igloo

  • Milestone changed from 6.12.3 to 6.14.1
  • Priority changed from normal to low

comment:8 Changed 3 years ago by igloo

  • Milestone changed from 7.0.1 to 7.0.2

comment:9 Changed 3 years ago by igloo

  • Milestone changed from 7.0.2 to 7.2.1

comment:10 Changed 3 years ago by igloo

  • Milestone changed from 7.2.1 to 7.4.1

comment:11 Changed 2 years ago by igloo

  • Milestone changed from 7.4.1 to 7.6.1
  • Priority changed from low to lowest

comment:12 Changed 20 months ago by igloo

  • Milestone changed from 7.6.1 to 7.6.2

comment:13 Changed 8 days ago by redneb

  • Cc redneb@… added
  • Type of failure set to None/Unknown
Note: See TracTickets for help on using tickets.