mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-14 22:31:29 +03:00
14 lines
208 B
C++
14 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;
|
||
|
}
|