Opened 7 years ago

Last modified 6 months ago

#2123 new task

implement waitForProcess using signals

Reported by: simonmar Owned by: snoyberg
Priority: lowest Milestone: 7.12.1
Component: Core Libraries Version: 6.8.2
Keywords: Cc: redneb@…, core-libraries-committee@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

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 (18)

comment:1 Changed 7 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 7 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:3 Changed 7 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple

comment:4 Changed 6 years ago by igloo

  • Milestone changed from 6.10 branch to 6.12 branch

comment:5 Changed 6 years ago by simonmar

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

comment:6 Changed 5 years ago by igloo

  • Milestone changed from 6.12 branch to 6.12.3

comment:7 Changed 5 years ago by igloo

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

comment:8 Changed 5 years ago by igloo

  • Milestone changed from 7.0.1 to 7.0.2

comment:9 Changed 4 years ago by igloo

  • Milestone changed from 7.0.2 to 7.2.1

comment:10 Changed 4 years ago by igloo

  • Milestone changed from 7.2.1 to 7.4.1

comment:11 Changed 3 years ago by igloo

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

comment:12 Changed 3 years ago by igloo

  • Milestone changed from 7.6.1 to 7.6.2

comment:13 Changed 16 months ago by redneb

  • Cc redneb@… added
  • Type of failure set to None/Unknown

comment:14 Changed 13 months ago by thoughtpolice

  • Milestone changed from 7.6.2 to 7.10.1

Moving to 7.10.1.

comment:15 Changed 10 months ago by thoughtpolice

  • Component changed from libraries/process to Core Libraries
  • Owner set to ekmett

Moving over to new owning component 'Core Libraries'.

comment:16 Changed 7 months ago by thoughtpolice

  • Milestone changed from 7.10.1 to 7.12.1

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:17 Changed 7 months ago by thoughtpolice

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:18 Changed 6 months ago by snoyberg

  • Cc core-libraries-committee@… added
  • Owner changed from ekmett to snoyberg
Note: See TracTickets for help on using tickets.