Open System Services System Calls Reference Manual (G06.28+)
spt_vfprintfx(2) OSS System Calls Reference Manual
#include <spthread.h>
void error(char *funct, char *fmt, ...)
{
va_list args;
/*
** Display the name of the function that called error
*/
spt_fprintfx(stderr, "ERROR in %s: ", funct);
/*
** Display the remainder of the message
*/
va_start(args, fmt);
spt_vfprintfx(stderr, fmt, args);
va_end(args);
abort();
}
RETURN VALUES
Upon successful completion, this function returns the number of bytes in the output string. Oth-
erwise, a negative value is returned.
If the file descriptor underlying stream becomes invalid (is closed by another thread), -1 is
returned with an errno value of [EBADF]. If a signal is received via the pthread_kill() function
and is not blocked, ignored, or handled, -1 is returned with an errno value of [EINTR].
ERRORS
The spt_vfprintfx() function fails if stream is unbuffered, or if stream’s buffer needed to be
flushed and the function call caused an underlying spt_writex() or lseek() function to be
invoked. In addition, if the spt_vfprintfx() function fails, errno is set to one of the following
values:
[EAGAIN] The O_NONBLOCK flag is set for the file descriptor underly-
ing stream and the process would be delayed in the write opera-
tion.
[EBADF] The file descriptor underlying stream is not a valid file descrip-
tor open for writing.
[EFBIG] An attempt was made to write to a file that exceeds the process’s
file size limit or the maximum file size.
[EILSEQ] An invalid wide character was detected.
[EINTR] The operation was interrupted by a signal that was caught, and
no data was transferred.
[EINVAL] There are insufficient arguments.
[EIO] The implementation supports job control; the process is a
member of a background process group attempting to write to its
controlling terminal; TOSTOP is set; the process is neither
ignoring nor blocking SIGTTOU; and the process group of the
process is orphaned. This error might also be returned under
implementation-defined conditions.
7−326 Hewlett-Packard Company 527186-005