HP-UX Reference (11i v3 07/02) - 3 Library Functions N-Z (vol 7)
x
xdr_create(3N) xdr_create(3N)
Warning: this XDR stream implements an intermediate record stream. Therefore there are additional
bytes in the stream to provide record boundary information.
void xdrstdio_create()
This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to
or read from the standard I/O stream file. The parameter op determines the direction of the XDR
stream. The value of op can be either
XDR_ENCODE , XDR_DECODE ,orXDR_FREE.
Warning: the destroy routine associated with such XDR streams calls
fflush() on the file stream,
but never
fclose() (see fclose(3S)).
Failure of the
xdrrec_create()
function can be detected by first initializing the x_ops field in the XDR
structure (xdrs→x_ops) to NULL before calling the
xdrrec_create()
function. After the return from
the
xdrrec_create()
function, if the x_ops field is still NULL, the call has failed. If the x_ops field
contains some other value, assume the call has succeeded. Failures cannot be detected for the
xdrmem_create()
and xdrstdio_create()
functions.
MULTITHREAD USAGE
Thread Safe: Yes
Cancel Safe: Yes
Fork Safe: No
Async-cancel Safe: No
Async-signal Safe: No
These functions can be called safely in a multithreaded environment. They may be cancellation points in
that they call functions that are cancel points.
In a multithreaded environment, these functions are not safe to be called by a child process after
fork()
and before exec(). These functions should not be called by a multithreaded application that supports
asynchronous cancellation or asynchronous signals.
SEE ALSO
read(2), write(2), fclose(3S), malloc(3C), rpc(3N), xdr_admin(3N), xdr_complex(3N), xdr_simple(3N).
672 Hewlett-Packard Company − 2 − HP-UX 11i Version 3: February 2007