Commit 0f1d37a
committed
DEBUG: cli: support closing "hard" using close() in addition to fd_delete()
"debug dev close <fd>" currently closes that FD using fd_delete() after
checking that it's known from the fdtab. Sometimes we also want to just
perform a pure close() of FDs not in the fdtab (pollers, etc) in order
to provoke certain error cases. The optional "hard" argument to the
command will make it use a plain close() instead of fd_delete() and skip
the fd owner check. The main visible effect when closing a traffic socket
with it is that instead of dying from a double fd_delete() by seeing that
fd.owner is already 0, it will die during the next fd_insert() seeing that
fd.owner was not 0.1 parent 3939579 commit 0f1d37a
1 file changed
+9
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
806 | 806 | | |
807 | 807 | | |
808 | 808 | | |
809 | | - | |
| 809 | + | |
810 | 810 | | |
811 | 811 | | |
812 | 812 | | |
813 | 813 | | |
814 | 814 | | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
815 | 820 | | |
816 | 821 | | |
817 | 822 | | |
818 | | - | |
819 | 823 | | |
| 824 | + | |
| 825 | + | |
820 | 826 | | |
821 | 827 | | |
822 | 828 | | |
| |||
2649 | 2655 | | |
2650 | 2656 | | |
2651 | 2657 | | |
2652 | | - | |
| 2658 | + | |
2653 | 2659 | | |
2654 | 2660 | | |
2655 | 2661 | | |
| |||
0 commit comments