2019-02-21 01:07:29 +00:00
|
|
|
function alarm --on-signal ALRM
|
|
|
|
echo ALRM received
|
|
|
|
end
|
|
|
|
|
|
|
|
kill -s ALRM $fish_pid
|
|
|
|
|
2019-02-23 20:41:01 +00:00
|
|
|
function anychild --on-process-exit 0
|
|
|
|
# Type and exit status
|
|
|
|
echo $argv[1] $argv[3]
|
|
|
|
end
|
|
|
|
|
2019-02-21 05:41:35 +00:00
|
|
|
echo "command false:"
|
2019-02-23 20:41:01 +00:00
|
|
|
command false
|
2019-02-21 05:41:35 +00:00
|
|
|
echo "command true:"
|
2019-02-23 20:41:01 +00:00
|
|
|
command true
|
2019-02-21 05:41:35 +00:00
|
|
|
echo "command false | true:"
|
2019-02-23 20:41:01 +00:00
|
|
|
command false | command true
|
2019-02-21 05:41:35 +00:00
|
|
|
|
|
|
|
function test_blocks
|
|
|
|
block -l
|
|
|
|
command echo "This is the process whose exit event shuld be blocked"
|
|
|
|
echo "This should come before the event handler"
|
|
|
|
end
|
|
|
|
test_blocks
|
|
|
|
echo "Now event handler should have run"
|