relay_open(9)
π« relay_open(9) β the Kernel API Manual, bestie edition π«
okay so you're reading the relay_open(9) page, iconic choice, this is genuinely one of the fun ones. it lives in the Kernel API Manual and it's all about making a brand new relay channel. let's get into it π
β¨ NAME β¨
relay_open β create a new relay channel. that's the whole vibe. new channel, fresh out the box, slay π
πΈ SYNOPSIS πΈ
struct rchan * relay_open (const char *base_filename , struct dentry
*parent , size_t subbuf_size , size_t n_subbufs , const struct
rchan_callbacks *cb , void *private_data );
like, look at her. six arguments, all main character energy π
π¦ ARGUMENTS π¦
base_filenameβ the base name of the files to create. this is the name-y part of the name, iykyk β¨parentβ the dentry of the parent directory,NULLfor the root directory or buffer. passNULLand she goes to root, no notes π«Άsubbuf_sizeβ size of sub-buffers. how big each lil sub-buffer is πn_subbufsβ number of sub-buffers. how many of them there are, literally just a count πcbβ client callback functions. your callbacks, your rules πprivate_dataβ user-defined data. whatever you want, no questions asked π
π₯ DESCRIPTION π₯
so what does it actually do? it returns the channel pointer if successful, NULL otherwise. that's the deal. NULL means nope π
it creates a channel buffer for each cpu using the sizes and attributes specified. not me giving every cpu its own lil buffer, generous queen π
the created channel buffer files will be named base_filename0...base_filenameN-1. note the naming, bestie β it's 0 through N-1, don't come for me with off-by-one nonsense π
file permissions will be S_IRUSR. that's it. that's the permission. read it and weep (or, like, just read it, that's the only thing you can do) πΈ
β SEE ALSO β
kernel file ./kernel/relay.c β and the whole relay fam, all of them, no cap:
relay_mmap_prepare_buf(9)relay_alloc_buf(9)relay_create_buf(9)relay_destroy_channel(9)relay_destroy_buf(9)relay_remove_buf(9)relay_buf_empty(9)relay_buf_full(9)wakeup_readers(9)__relay_reset(9)relay_reset(9)relay_close_buf(9)relay_switch_subbuf(9)relay_subbufs_consumed(9)relay_close(9)relay_flush(9)relay_stats(9)relay_file_open(9)relay_file_mmap_prepare(9)relay_file_poll(9)relay_file_release(9)relay_file_read_subbuf_avail(9)relay_file_read_start_pos(9)relay_file_read_end_pos(9)
go read all of them, or don't, I'm not your mom π§
π that's the whole page! go open a relay channel, you've got this!
mwah π this one came straight out of ./kernel and it's dated October 2026, so like, remember that when you cite her. periodt.
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms