diff options
author | WlodekM <[email protected]> | 2025-02-15 10:51:57 +0200 |
---|---|---|
committer | WlodekM <[email protected]> | 2025-02-15 10:51:57 +0200 |
commit | 545c5f85c38de8ddb8c026bf3b76658c8d8f3d6b (patch) | |
tree | a9df68df52ff273715b595efc7cd4cb20f7859a3 /progs/tty/tty.c | |
parent | 967d5cd81a190f6aa7ac44c269d60ae3a1071464 (diff) |
fix some stuff; add some coreutils
Diffstat (limited to 'progs/tty/tty.c')
-rw-r--r-- | progs/tty/tty.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/progs/tty/tty.c b/progs/tty/tty.c new file mode 100644 index 0000000..d906121 --- /dev/null +++ b/progs/tty/tty.c @@ -0,0 +1,10 @@ +#include <unistd.h> +#include <stdlib.h> + +__attribute__((force_align_arg_pointer)) +int main() { + char *tty = ttyname(1); + write(1, tty, sizeof(tty)); + write(1, "\n", 1); + exit(0); +} \ No newline at end of file |