TIOCSETD(2const)
π TIOCSETD(2const) π
okay bestie, so this is a page from section 2const of the Linux man-pages β the little corner of the manual that holds the individual ioctl constants so they each get their own glow-up. sit down, grab a boba, and let's talk about line disciplines β¨
πΈ NAME πΈ
TIOCGETD, TIOCSETD β get or set the line discipline of the terminal
like. the whole vibe of this page. one gets, one sets. iconic behavior honestly π«Ά
π LIBRARY π
Standard C library (libc, -lc)
that's the one you already link against, no cap, nothing extra to install π
π§ SYNOPSIS π§
#include <asm/termbits.h> /* Definition of TIOC*ETD constants */
#include <sys/ioctl.h>
int ioctl(int fd, TIOCGETD, int *argp);
int ioctl(int fd, TIOCSETD, const int *argp);
so it's ioctl(2) but make it terminal line discipline. note that TIOCGETD does not take a const on argp and TIOCSETD does. the compiler is watching you π
β¨ DESCRIPTION β¨
π¦ TIOCGETD
Get the line discipline of the terminal.
like, you're asking the terminal "bestie what's your line discipline rn" and it tells you. lowkey the chill one π
π₯ TIOCSETD
Set the line discipline of the terminal.
and this one is the main character move β you're telling the terminal what its line discipline is gonna be now. periodt π
π RETURN VALUE π
On success, 0 is returned. on error? -1 is returned, and errno gets set to tell you exactly what went wrong.
so like β 0 = slay, -1 = check errno, it's giving diagnostics π
π SEE ALSO π
go read those next, iykyk β
and that's the whole page bestie!! this one came to you from Linux man-pages 6.20, dated 2026-02-08 β treat it like the little treasure it is ππβ¨
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: GPL-1.0-or-later
- Copyright 2002, Walter Harms <walter.harms@informatik.uni-oldenburg.de>
- Copyright 2002, Andries E. Brouwer <aeb@cwi.nl>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms