Rule 187p-proc-kill
Transitions
(187)
Comments
The killed process takes no further step, and if it was performing the task of a leaf it gives no message. Killing a process that has ended changes nothing. When a process kills itself, the second modification overrides the first, so it is not ended and goes on with .
Referred to from
- The comment on rule
p-proc-step(Chapter 9)
TeX source
\defnrule[r:p-proc-kill]
{P(\pid)=(\tk,s',\pgorig)\premsep\tk\effred{\effa}\tk'\premsep
\effa=\effdone{\effkill(\pid')}{\tk''}\\
P'=(P+\{\pid'\mapsto\pgended\})+\{\pid\mapsto(\tk',s,\pgorig)\}}
{(s,v,M,P,\sbv,Q,H)\step{\effa}(s,v,M,P',\sbv,Q,H)}Tests (5)
- elm / MinimalKillTestA process kills a process it spawned.
- elm-core / CoreIssue955KillProcessTwiceTestKilling a process that has already finished, a second time, throws a JavaScript error.
- elm-core / ProcessPrimitiveOutcomeTestThe primitive tasks `Process.sleep`, `Process.spawn` and `Process.kill` succeed with their outcomes.
- elm-core / ProcessSpawnKillHalfTestA process killed with `Process.kill` before its sleep finishes never runs the rest of its task, while the processes left alive do.
- elm-core / StandardA81SleepBeyond32BitsTest`Process.sleep d` waits at least `d` milliseconds, also when `d` is above 2^31 - 1.
Discussions
Discuss this rule·Search the discussions on GitHub
Discussions are on GitHub; one about this rule has [r:p-proc-kill] in its title.
A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.