trace_pid_list_first(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so this is the trace_pid_list_first(9) page from the Kernel API Manual, and the whole vibe is literally return the first pid in the list. that’s it, that’s the name, iconic and to the point πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

the signature is exactly this, no edits bestie:

int trace_pid_list_first (struct trace_pid_list *pid_list , unsigned int
       *pid );

πŸŽ€ ARGUMENTS πŸŽ€

  • pid_list β€” the pid list you’re examining. like, the list itself. πŸ‘€
  • pid β€” the pointer where the first found pid that is set gets placed. yes bestie, that’s where the pid lands. 🎯

πŸ’… DESCRIPTION πŸ’…

so it looks for the first pid that is set in pid_list, and places it into pid if found. no cap. 🫢

return values are giving very clear: 0 when a pid is found, and -1 if there are no pids set. periodt. πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

the kernel file is ./kernel/trace/pid_list.c β€” and the whole squad is here: trace_pid_list_is_set(9), trace_pid_list_set(9), trace_pid_list_clear(9), trace_pid_list_next(9), trace_pid_list_alloc(9), trace_pid_list_free(9). go off, little pid-list family 🌈


mwah πŸ’‹ β€” signed off from the ./kernel/trace corner of the kernel, dated October 2026 πŸŽ€

πŸ“¦ where this page comes from