1
0
mirror of https://github.com/adtools/clib2.git synced 2025-12-08 14:59:05 +00:00

- isatty() now checks if the file descriptor refers to a real file before

it calls IsInteractive() on it.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15188 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2008-04-16 07:46:05 +00:00
parent 6c50657673
commit 4444438e8f
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,5 @@
- isatty() no longer crashes if passed a socket rather than a file.
- Rewrote the GetRexxVar()/SetRexxVar() functions (mostly) in 'C', using available
code as a reference. The 68k stubs currently only work for the 68k version of
the library, and a solution for the OS4 build still needs to be found. The code

View File

@ -1,5 +1,5 @@
/*
* $Id: unistd_isatty.c,v 1.9 2006-11-16 14:39:23 obarthel Exp $
* $Id: unistd_isatty.c,v 1.10 2008-04-16 07:46:05 obarthel Exp $
*
* :ts=4
*
@ -67,6 +67,12 @@ isatty(int file_descriptor)
goto out;
}
if(FLAG_IS_SET(fd->fd_Flags,FDF_IS_SOCKET))
{
__set_errno(ENOTTY);
goto out;
}
__fd_lock(fd);
result = 1;