process_output(9)
π process_output β the output post processor, bestie
okay so real talk, this one's from the Kernel API Manual (yeah, the process_output(9) girlies know) and she is literally the post-processing queen of tty output. buckle up π
πΈ SYNOPSIS πΈ
int process_output (u8 c , struct tty_struct *tty );
β¨ ARGUMENTS β¨
cβ the character, or like... a partial unicode symbol π (yes, partial. she's doing her best)ttyβ the terminal device in question, the whole vibe holder
π¦ DESCRIPTION π¦
So what she does is: output one character with OPOST processing. That's it. That's the whole gig. One char, fully post-processed, slay β¨
Locking tea π: you're gonna want output_lock to protect the column state and the space left. Also (and this is the part where it gets spicy) β this function is called from n_tty_write under the tty layer write lock. So like, the lock situation is already handled upstream, no cap.
π RETURN π
Returns -1 when the output device is full and the character has to be retried π like when your fave is too busy to text back. the char will get another chance tho π«Ά
π SEE ALSO π
Kernel file ./drivers/tty/n_tty.c β and honestly the whole friend group:
n_tty_kick_worker(9)n_tty_write_wakeup(9)put_tty_queue(9)reset_buffer_flags(9)n_tty_flush_buffer(9)is_utf8_continuation(9)is_continuation(9)do_output_char(9)process_output_block(9)__process_echoes(9)add_echo_byte(9)echo_move_back_col(9)echo_set_canon_col(9)echo_erase_tab(9)echo_char_raw(9)echo_char(9)finish_erasing(9)eraser(9)isig(9)n_tty_receive_break(9)n_tty_receive_overrun(9)n_tty_receive_parity_error(9)n_tty_receive_char_flow_ctrl(9)n_tty_receive_char(9)n_tty_receive_buf_common(9)n_tty_set_termios(9)n_tty_close(9)n_tty_open(9)copy_from_read_buf(9)canon_copy_from_read_buf(9)job_control(9)n_tty_read(9)n_tty_write(9)n_tty_poll(9)n_tty_inherit_ops(9)
mwah π that's the whole page, go read the source bestie it's giving main character energy
β from ./drivers/tty, dated October 2026, in the process_output(9) era πβ¨
π¦ 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