CKB Pulse
Lessons

What CKB learned

Start here · Glossary · Test yourself · Feed

XuJiandong/ckb-script-ipc

Lessons from XuJiandong/ckb-script-ipc

github.com/XuJiandong/ckb-script-ipc

Do you maintain this project? Confirm its lessons in one issue

1 lessons found. All lessons

Close spawn pipe descriptors when an IPC channel is freedWorkingFrom one fix

A pipe fd created by ckb_pipe or inherited through spawn stays live until ckb_close is called on it, and the VM limits how many descriptors can be live at once. Code that creates channels repeatedly must therefore close both pipe ends when finished. In ckb-script-ipc, csi_free_channel did not close them before PR #32; it now closes the library-owned pipe fds, and the peer's ckb_read then returns CKB_OTHER_END_CLOSED.

#Other · Sources (1) · 2026-11-09

Text under CC BY 4.0: credit LusoCryptoLabs, CKB lessons, with a link to the lesson. JSON · Want a lesson changed or removed? Open an issue.