1
0
mirror of https://github.com/adtools/clib2.git synced 2026-05-08 22:24:58 +00:00

- The thread-safe version of isatty() should now work for stdio

file descriptors, too.

- Retrofitted thread-safety into the termios code.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15010 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2005-07-06 18:48:53 +00:00
parent cd7b02f4d7
commit 882875d79a
22 changed files with 575 additions and 50 deletions

View File

@@ -1,5 +1,5 @@
/*
* $Id: termios_tcsendbreak.c,v 1.1 2005-06-04 10:46:21 obarthel Exp $
* $Id: termios_tcsendbreak.c,v 1.2 2005-07-06 18:48:53 obarthel Exp $
*
* :ts=4
*
@@ -63,6 +63,8 @@ tcsendbreak(int file_descriptor,int duration)
if(__check_abort_enabled)
__check_abort();
__stdio_lock();
fd = __get_file_descriptor(file_descriptor);
if(fd == NULL || FLAG_IS_CLEAR(fd->fd_Flags,FDF_TERMIOS))
{
@@ -70,6 +72,8 @@ tcsendbreak(int file_descriptor,int duration)
goto out;
}
__fd_lock(fd);
assert( fd->fd_Aux != NULL );
tios = fd->fd_Aux;
@@ -103,6 +107,10 @@ tcsendbreak(int file_descriptor,int duration)
out:
__fd_unlock(fd);
__stdio_unlock();
RETURN(result);
return(result);
}