execute winded handlers when exit is called
This commit is contained in:
parent
bea04325e5
commit
d21db9ae81
|
@ -26,6 +26,7 @@ pic_system_exit(pic_state *pic)
|
||||||
{
|
{
|
||||||
pic_value v;
|
pic_value v;
|
||||||
int argc, status = EXIT_SUCCESS;
|
int argc, status = EXIT_SUCCESS;
|
||||||
|
struct pic_block *blk;
|
||||||
|
|
||||||
argc = pic_get_args(pic, "|o", &v);
|
argc = pic_get_args(pic, "|o", &v);
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
|
@ -41,6 +42,12 @@ pic_system_exit(pic_state *pic)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
blk = pic->blk;
|
||||||
|
while (blk) {
|
||||||
|
pic_apply_argv(pic, blk->out, 0);
|
||||||
|
blk = blk->prev;
|
||||||
|
}
|
||||||
|
|
||||||
exit(status);
|
exit(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue