summary refs log tree commit diff
path: root/progs/tty/tty.c
blob: d906121668305bbdb597f58a38b1de0909073ddf (plain)
1
2
3
4
5
6
7
8
9
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);
}