mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:38:11 +00:00
13 lines
208 B
C++
13 lines
208 B
C++
#include <LibC/stdio.h>
|
|
#include <LibC/unistd.h>
|
|
|
|
int main(int, char**)
|
|
{
|
|
char* tty = ttyname(0);
|
|
if (!tty) {
|
|
perror("Error");
|
|
return 1;
|
|
}
|
|
printf("%s\n", tty);
|
|
return 0;
|
|
}
|