Kernel/LibC: Implement SYS_ISATTY and isatty()
This commit is contained in:
@@ -77,6 +77,7 @@ __BEGIN_DECLS
|
||||
O(SYS_SMO_CREATE, smo_create) \
|
||||
O(SYS_SMO_DELETE, smo_delete) \
|
||||
O(SYS_SMO_MAP, smo_map) \
|
||||
O(SYS_ISATTY, isatty) \
|
||||
|
||||
enum Syscall
|
||||
{
|
||||
|
||||
@@ -114,6 +114,11 @@ int dup2(int fildes, int fildes2)
|
||||
return syscall(SYS_DUP2, fildes, fildes2);
|
||||
}
|
||||
|
||||
int isatty(int fildes)
|
||||
{
|
||||
return syscall(SYS_ISATTY, fildes) >= 0;
|
||||
}
|
||||
|
||||
int execl(const char* pathname, const char* arg0, ...)
|
||||
{
|
||||
if (arg0 == nullptr)
|
||||
|
||||
Reference in New Issue
Block a user