improved %gall kill handling

This commit is contained in:
Ubuntu 2014-09-16 02:56:44 +00:00
parent c14d6b4d05
commit 0f7ce25b9e
2 changed files with 105 additions and 8 deletions

View File

@ -1,4 +1,4 @@
:: :: %gall, user-level applications
!: :: %gall, user-level applications
!? 164
::::
|= pit=vase
@ -33,6 +33,7 @@
== ::
++ knob :: pending action
$% [%boot ~] :: begin boot
[%cede ~] :: selficide
[%cide p=span] :: subprocessicide
[%crud p=@tas q=(list tank)] :: error
[%load p=cage] :: continue boot
@ -468,6 +469,7 @@
[[hun.mat 0 ~] ~ ~]
[[0 hun.mat] ~ ~]
==
=. bum.mat (~(put by bum.mat) imp sat)
~(. go [our imp] mat sat)
::
++ goad :: handle request
@ -487,10 +489,14 @@
sat=seat :: per application
== ::
++ abet :: resolve
~& [%abet-qic imp ?=(~ qic.sat)]
%_ ..$
all
%_ all
pol %+ ~(put by pol.all) our
?. (~(has by bum.mat) imp)
~& [%abet-gone imp]
mat
mat(bum (~(put by bum.mat) imp sat))
==
==
@ -640,6 +646,7 @@
^- toil
?> ?=([%pass p=* q=%g r=[p=%cide q=span]] q.caq)
:: [[[%g wir] hon] r.q.caq]
~& [%deff imp cub.sat]
[hon r.q.caq]
::
++ drug :: set dependencies
@ -701,6 +708,16 @@
^- silk
[%boil %core [[our %main [%da now]] app.sat %app ~] ~]
::
++ leav
%_ .
bum.mat (~(del by bum.mat) imp)
qic.sat ~
vey.sat
%- ~(gas by vey.sat)
%+ turn (~(tap by cub.sat))
|=([a=span @] [hen %cide a])
==
::
++ mack :: apply standard
|= sih=sign
?> ?=(%f -.sih)
@ -737,6 +754,15 @@
| [~ (give %crud %made p.p.+.sih)]
==
::
++ muck :: apply part
|= sih=sign
^- [(unit (list tank)) _+>]
?> ?=(%f -.sih)
?- -.p.+.sih
& [~ (obey q.q.p.p.+.sih)]
| [`p.p.+.sih (give %crud %made p.p.+.sih)]
==
::
++ murk :: apply park
|= sih=sign
^- [(unit cage) _+>]
@ -764,7 +790,7 @@
!=(~ qic.sat)
=(`[hen pax] onz.sat)
==
~& [%gall-mystery pax =(~ qic.sat) onz.sat]
~& [%gall-mystery imp pax =(~ qic.sat) onz.sat]
+>.$
=: onz.sat ~
qic.sat ~
@ -776,6 +802,11 @@
?~ gyd
+>.$
(quen %load u.gyd)
::
%part
=^ gud +>.$ (muck q.hin)
?^ gud +>.$
leav
::
%peek
?> ?=([@ *] t.t.pax)
@ -949,6 +980,7 @@
::
++ work :: eat queue
|- ^+ +
~& [%work imp ?~(qic.sat ~ [~ -.q.u.qic.sat (turn (~(tap by vey.sat)) |=(toil -.q))])]
?: |(?=(^ qic.sat) =(~ vey.sat)) +.$ :: nothing to do
=^ yev vey.sat [p q]:~(get to vey.sat)
?: (~(has in nuc.sat) p.yev) $
@ -963,7 +995,7 @@
++ yawn :: start event
|= kon=knob
^+ +>
:: ~& [%gall-yawn ost -.kon]
:: ~& [%gall-yawn ost imp -.kon]
=. qic.sat `[hen kon]
?- -.kon
%boot
@ -977,12 +1009,39 @@
?. (warm %park)
[%done ~ %$ (slot 13 u.huv.sat)]
(harm %park (conf (core u.huv.sat)))
::
%cede
~& [%cede imp (~(tap by cub.sat)) ?=(~ qic.sat)]
~& [%cede-bum (turn (~(tap by bum.mat)) |=([a=path *] a))]
?: (warm %part)
=+ sam=!>(ost)
?> ?=(^ huv.sat)
(yawl /part u.huv.sat sam)
leav
::
%cide
?. (~(has by bum.mat) [p.kon imp])
~& %cide-missed +>.$(qic.sat ~)
~& [%cide (~(tap by cub.sat))]
?~ p.kon
?~ imp +>.$(qic.sat ~)
?~ t.imp
$(kon [%cede ~])
=. qic.sat ~
=^ mew ..$.go
((goad($.go +:abet) hen ~) our t.imp [%cide i.imp])
=. mat (~(got by pol.all) our)
=. sat (~(got by bum.mat) imp)
%_ +>.$
bum.mat (~(del by bum.mat) [p.kon imp])
mow (weld (flop mew) mow)
==
?. (~(has by bum.mat) [p.kon imp])
~& >> %cide-missed +>.$(qic.sat ~)
~& > [%cide-a (~(has by bum.mat) /babe/test)]
=^ mew ..$.go
((goad($.go +:abet) hen ~) our [p.kon imp] [%cede ~])
=. mat (~(got by pol.all) our)
~& > [%cide-b (~(has by bum.mat) /babe/test)]
%_ +>.$
mow (weld (flop mew) mow)
cub.sat (~(del by cub.sat) p.kon)
qic.sat ~
==
@ -1034,8 +1093,9 @@
(give(qic.sat ~) %dumb ~)
::
%sire
:: ~& [%sire-found (~(put by cub.sat) q.kon p.kon)]
?: (~(has by bum.mat) [q.kon imp])
~& %sire-redundant +>.$(qic.sat ~)
~& >> %sire-redundant +>.$(qic.sat ~)
%_ +>.$
cub.sat (~(put by cub.sat) q.kon p.kon)
qic.sat ~

View File

@ -70,6 +70,43 @@
^- [(list move) _+>]
!!
--
++ cede
^- test
=> |%
++ sign
$% $: %g
$% [%nice ~]
== == ==
--
=| cnt=?
|%
++ poke
|+ [ost=bone you=ship]
^- [(list move) _+>]
~& [%cide-poke cub.hid sup.hid our.hid]
:_ +>.$(cnt !cnt)
?: cnt
:~
[ost %pass /cede/sire %g %sire %cede %babe]
:* ost %pass /cede/poke %g
%mess [our.hid babe/imp.hid] you
%json !>(~)
==
:* ost %pass /cede/ours %g
%mess [our.hid imp.hid] you
%json !>((joba %test %s %cede))
==
==
[ost %give %nice ~]~
++ pour
|+ [ost=bone pax=path sih=*]
^- [(list move) _+>]
?. ?=(sign sih) `+>
~& [%cede-pour pax]
?. ?=([%ours ~] pax) `+>
:_ +>.$ :_ ~
[ost %give +.sih]
--
++ cide
^- test
=> |%
@ -117,7 +154,6 @@
|+ [ost=bone pax=path sih=*]
^- [(list move) _+>]
=+ sih=((hard sign) sih)
~& [%sire-pour pax sih]
:_ +>.$
[ost %give %nice ~]~
--
@ -250,6 +286,7 @@
:~ [%succeed succeed]
[%sire sire]
[%cide cide]
[%cede cede]
[%ze ze]
[%poke-local poke-local]
==
@ -275,7 +312,7 @@
?~ tes [[ost %give %mean ~ %strange-json ~]~ +>.$]
=+ tst=(~(get by tests) +.u.tes)
?~ tst
[[ost %give %mean ~ %bad-test ~]~ +>.$]
[[ost %give %mean ~ %bad-test leaf/<+.u.tes> ~]~ +>.$]
~& [%running-test +.u.tes]
=+ res=(poke:u.tst ost you)
:- -.res