build_interp_argv(9)
π NAME π
okay so bestie, welcome to build_interp_argv(9) β yes, that's the name, and this whole page is living in the Kernel API Manual. It's literally the function that splices the interpreter invocation into the argv. slay. β¨
β¨ SYNOPSIS β¨
int build_interp_argv (struct linux_binprm *bprm , const char
*interpreter , unsigned long flags );
π ARGUMENTS π
bprmβ the binary that is being executed. main character binary energy, honestly.interpreterβ the interpreter selected for this exec. the chosen one πflagsβ invocation flags in effect for this exec. all the flag vibes, gathered for this exact exec.
π¦ DESCRIPTION π¦
okay so here's the tea: the interpreter becomes argv[0] and the binary becomes its last argument, with an optional staged argument in between. cute, right? the caller's argv[0] is dropped unless 'P' keeps it. that's the whole vibe β no cap. π
πΈ RETURN πΈ
0 on success, and a negative error code on failure. periodt. π
π SEE ALSO π
- Kernel file
./fs/binfmt_misc.cstruct binfmt_misc_flag(9) search_binfmt_handler(9)get_binfmt_handler(9)binfmt_misc_find_interp(9)entry_attach_interpreter(9)put_binfmt_handler(9)current_binfmt_misc(9)entry_select_interpreter(9)entry_invocation_flags(9)entry_open_interpreter(9)i_binfmt_misc(9)bm_evict_inode(9)unlink_binfmt_handler(9)remove_binfmt_handler(9)bm_unlink(9)bm_entry_add_interp(9)
kisses and kernel crumbs π β this page comes from source ./fs, dated October 2026. bye bestie, go splice something iconic β¨π«Ά
π¦ 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