'\"macro stdmacro
.if n .pH g3c.isastream @(#)isastream	40.4 of 10/10/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} isastream 3C "" "\&"
.if \nX=1 .ds x} isastream 3C ""
.if \nX=2 .ds x} isastream 3C "" "\&"
.if \nX=3 .ds x} isastream "" "" "\&"
.TH \*(x}
.SH NAME
\f4isastream\fP \- test a file descriptor
.SH SYNOPSIS
.nf
\f4int isastream(int fildes);\f1
.fi
.SH DESCRIPTION
The function \f4isastream\f1() determines if a file descriptor represents
a \s-1STREAMS\s+1 file.
\f2fildes\f1 refers to an open file.
.SH "RETURN VALUE"
If successful, \f4isastream\f1() returns 1 if
\f2fildes\f1 represents a \s-1STREAMS\s+1 file, and 0 if not.
On failure, \f4isastream()\f1 returns -1 with \f4errno\f1 set to
indicate an error.
.SH ERRORS
.br
Under the following conditions, \f4isastream\f1()
fails and sets \f4errno\f1 to:
.TP 13
\f4EBADF\fP
\f2fildes\f1 is not a valid open file.
.SH "SEE ALSO"
\f4streamio\fP(7).
.br
in the \f2Programmer's Guide: \s-1STREAMS\s0\f1
.Ee
