HP-UX Reference Section 3: Library Functions (N-Z) HP-UX 11i Version 3 Volume 7 of 10 Manufacturing Part Number : B2355-91023 E0207 Printed in USA © Copyright 1983-2007 Hewlett-Packard Development Company LP.
Legal Notices The information in this document is subject to change without notice. Warranty The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. U.S. Government License Confidential computer software.
Copyright 1996 Morning Star Technologies, Inc. Copyright 1996 Progressive Systems, Inc. Trademark Notices Intel and Itanium are registered trademarks of Intel Corporation in the US and other countries and are used under license. Java is a US trademark of Sun Microsystems, Inc. Microsoft and MS-DOS are U.S. registered trademarks of Microsoft Corporation. OSF/Motif is a trademark of The Open Group in the US and other countries. UNIX is a registered trademark of The Open Group.
Preface HP-UX is the Hewlett-Packard Company’s implementation of a UNIX operating system that is compatible with various industry standards. It is based on the System V Release 4 operating system and includes important features from the Fourth Berkeley Software Distribution. The ten volumes of this manual contain the system reference documentation, made up of individual entries called manpages, named for the man command (see man (1)) that displays them on the system.
Typographical Conventions audit (5) An HP-UX manpage reference. For example, audit is the name and 5 is the section in the HP-UX Reference. On the web and on the Instant Information CD, it may be a hyperlink to the manpage itself. From the HP-UX command line, you can enter “man audit” or “man 5 audit” to view the manpage. See man (1). Book Title The title of a book. On the web and on the Instant Information CD, it may be a hyperlink to the book itself.
Command Syntax Literal A word or character that you enter literally. Replaceable A word or phrase that you replace with an appropriate value. -chars One or more grouped command options, such as -ikx. The chars are usually a string of literal characters that each represent a specific option. For example, the entry -ikx is equivalent to the individual options -i, -k, and -x. The plus character (+) is sometimes used as an option prefix. -word A single command option, such as -help.
Function Synopsis and Syntax HP-UX functions are described in a definition format rather than a usage format. The definition format includes type information that is omitted when the function call is actually included in a program. The function syntax elements are the same as for commands, except for the options; see “Command Syntax” on page 7. Function General Definition The general definition form is: type func ( type param [ , type param ]...
Revision History Part Number Release; Date; Format; Distribution B2355-60130 HP-UX 11i Version 3; February 2007; one volume HTML; http://docs.hp.com and Instant Information. B2355-91017-26 HP-UX 11i Version 3; February 2007; ten volumes PDF; http://docs.hp.com, Instant Information and print. B2355-60127 HP-UX 11i Version 1; September 2005 Update; one volume HTML; http://docs.hp.com and Instant Information. B2355-90902-11 HP-UX 11i Version 1; September 2005 Update; ten volumes PDF; http://docs.hp.
Volume Seven Table of Contents Section 3
Volume Seven Table of Contents Section 3
Table of Contents Volumes Six and Seven Section 3: Library Functions Entry Name(Section): name Description intro(3C): intro ................................................................................ introduction to subroutines and libraries __data_start: last locations in program ...................................................................................... see end(3C) __text_start: last locations in program .....................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description _UNW_createContext(): allocate and deallocate unwind library data structure .................................................................................................. see _UNW_createContextForSelf(3X) _UNW_createContextForSelf(3X): _UNW_createContextForSelf(), _UNW_createContext(), _UNW_destroyContext() .....................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description acoshl(): arc hyperbolic cosine function (long double) .............................................................. see acosh(3M) acoshq(): arc hyperbolic cosine function (quad) ........................................................................ see acosh(3M) acoshw(): arc hyperbolic cosine function (extended) .................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description annuityq(): present value factor for annuity (quad) ............................................................. see annuity(3M) annuityw(): present value factor for annuity (extended) ...................................................... see annuity(3M) asctime(): convert date and time to string ...............................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description authdes_create(): obsolete library routine for RPC ............................................................ see rpc_soc(3N) authdes_getucred(): library routines for secure remote procedure calls ....................... see secure_rpc(3N) authdes_seccreate(): library routines for secure remote procedure calls ..................... see secure_rpc(3N) authnone_create(): library routines for client side rpc authentication ........
Table of Contents Volumes Six and Seven Entry Name(Section): name Description cargw(): complex argument function (extended) ......................................................................... see carg(3M) casin(3M): casin(), casinf(), casinl(), casinw(), casinq() ......................... complex arcsine functions casinf(): complex arcsine function (float) .................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description cimagl(): complex imaginary-part function (long double) ......................................................... see cimag(3M) cimagq(): complex imaginary-part function (quad) ................................................................... see cimag(3M) cimagw(): complex imaginary-part function (extended) ............................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description cmpt_getent(): map compartment name to number or number to name .................. see cmpt_getbynum(3) cmpt_setent(): map compartment name to number or number to name .................. see cmpt_getbynum(3) color_content(): color manipulation functions ..................................................... see can_change_color(3X) color_set(): window attribute control functions .....................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description cprojq(): complex projection function (quad) ............................................................................ see cproj(3M) cprojw(): complex projection function (extended) ..................................................................... see cproj(3M) cr_close(3): cr_close() .................................................................................... close a crash dump descriptor cr_info(3): cr_info() ....
Table of Contents Volumes Six and Seven Entry Name(Section): name Description datalock(3C): datalock() ............................. lock process into memory after allocating data and stack space daylight(): convert date and time to string ............................................................................. see ctime(3C) dbm(3X): dbminit(), fetch(), store(), delete(), firstkey(), nextkey(), dbmclose() ........................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description dn_expand(): resolver routines ............................................................................................ see resolver(3N) doupdate(3X): doupdate(), refresh(), wnoutrefresh(), wrefresh() ............. refresh windows and lines drand48(3C): drand48(), erand48(), lrand48(), nrand48(), mrand48(), jrand48(), srand48(), seed48(), lcong48() ......................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description elf_next(3E): elf_next() .......................................... provide sequential archive member access for ELF files elf_nextscn(): get section information for ELF files ........................................................ see elf_getscn(3E) elf_rand(3E): elf_rand() .......................................................... random archive member access for ELF files elf_rawdata(): manipulate section data for ELF files ..
Table of Contents Volumes Six and Seven Entry Name(Section): name Description EvmConnCreate(3): EvmConnCreate(), EvmConnCreatePoster(), EvmConnCreateSubscriber(), EvmConnDestroy(), EvmConnFdGet() ............... establish or destroy connection with the EVM daemon EvmConnCreatePoster(): establish or destroy connection with the EVM daemon ... see EvmConnCreate(3) EvmConnCreateSubscriber(): establish or destroy connection with the EVM daemon .....................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description EvmVarRelease(): manipulate event variables .................................................................. see EvmVarGet(3) EvmVarSet(): manipulate event variables .......................................................................... see EvmVarGet(3) EvmVarSetOpaque(): manipulate event variables ..............................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description fetch(): database subroutines ..................................................................................................... see dbm(3X) fetestexcept(3M): fetestexcept() ................................................................... test floating-point exceptions feupdateenv(3M): feupdateenv() ............................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description freenetconfigent(): get network configuration data base entry ................................. see getnetconfig(3N) freopen(): substitute a named file in place of an already open stream ...................................... see fopen(3S) frexp(3M): frexp(), frexpf(), frexpl(), frexpw(), frexpq() ......................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description getclock(3C): getclock() ................................................................... get current value of system-wide clock getcwd(3C): getcwd() ................................................................. get path-name of current working directory getdate(3C): getdate(), getdate_r() ..................................................... convert user format date and time getdate_r(): convert user format date and time .
Table of Contents Volumes Six and Seven Entry Name(Section): name Description getprdfent(3): getprdfent(), getprdfnam(), setprdfent(), endprdfent(), putprdfnam() ....................................... manipulate system default database entry for a trusted system getprdfent(): return pointer for system default database for trusted system .................... see getprdfent(3) getprdfnam(): return pointer for system default database for trusted system ....................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description .................................................................................. get a multi-byte character string from the terminal getsubopt(3C): getsubopt() .......................................................................... parse suboptions from a string. gettimer(3C): gettimer() ............................................................................. get value of a per-process timer gettxt(3C): gettxt() ........
Table of Contents Volumes Six and Seven Entry Name(Section): name Description ........................................... provide textual representation of an opaque internal name to an application gss_display_status(3): gss_display_status() ................................................ provides an application with the textual representation of a GSSAPI status code that can be displayed to a user or used for logging gss_duplicate_name(3): gss_duplicate_name() ........................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description hg_context_switch_voluntary(): Mercury Library Interfaces to transfer data between user and kernel space in a lightweight manner ................................................................................................... see hg(3) hg_gethrcycles(): Mercury Library Interfaces to transfer data between user and kernel space in a lightweight manner ...............................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description idcok(3X): idcok() ............................ enable or disable use of hardware insert- and delete-character features idlok(): terminal output control functions .............................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description inet_pton(): Internet address manipulation routines .................................................................. see inet6(3N) init_colors(): color manipulation functions ......................................................... see can_change_color(3X) init_pair(): color manipulation functions ............................................................. see can_change_color(3X) initgroups(3C): initgroups() ................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description io_search(): interface for interacting with kernel I/O subsystem ............................................. see libIO(3X) io_search_array(): interface for interacting with kernel I/O subsystem ................................. see libIO(3X) io_search_array_batch(): interface for interacting with kernel I/O subsystem ..................... see libIO(3X) io_str_to_hw_path(): interface for interacting with kernel I/O subsystem ....
Table of Contents Volumes Six and Seven Entry Name(Section): name Description keypad(3X): keypad() ................................................................. enable/disable abbreviation of function keys killchar(): single-byte line kill character ........................................................................... see erasechar(3X) killwchar(): current line kill character ............................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description lldiv(): long long integer division and remainder ......................................................................... see div(3C) llrint(3M): llrint(), llrintf(), llrintl(), llrintw(), llrintq() round to nearest long long functions llrintf(): round to nearest long long function (float) ............................................................... see llrint(3M) llrintl(): round to nearest long long function (long double) .
Table of Contents Volumes Six and Seven Entry Name(Section): name Description malloc(3C): malloc(), alloca(), calloc(), free(), mallinfo(), mallopt(), memorymap(), realloc(), valloc() ............................................. main memory allocator mallopt(): control memory space allocation ............................................................................ see malloc(3C) mblen(): multibyte characters and strings conversions .......................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description mvgetnstr(): get a multi-byte character length limited string from the terminal ...................... see getnstr(3X) mvgetstr(): get a multi-byte character string from the terminal ................................................. see getstr(3X) mvhline(): draw lines from single-byte characters and renditions ................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description mvwinsstr(): insert a multi-byte character into a window ........................................................ see insnstr(3X) mvwinstr(): input a multi-byte character string from a window ................................................. see innstr(3X) mvwinwstr(): input a string of wide characters from a window ................................................ see innwstr(3X) mvwprintw(): print formatted output in window .....
Table of Contents Volumes Six and Seven Entry Name(Section): name Description nlist_ia(3C): nlist(), nlist64() ......................................... get entries from name list on Integrity systems nlist_pa(3C): nlist(), nlist64() ........................................ get entries from name list on PA-RISC systems nocbreak(): input mode control functions ................................................................................. see cbreak(3X) nodelay(3X): nodelay() ..............................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description pow(3M): pow(), powf(), powl(), poww(), powq(), pown(), pownf(), pownl(), pownw(), pownq(), powlln(), powllnf(), powllnl(), powllnw(), powllnq() ........................................................................................................................................ power functions powf(): power function (float) ......................................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description ..................................................................................................................................... see privileges(3) privset_free(): privilege manipulation operations for checking and debugging purposes .....................................................................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description pthread_attr_setstack(): set stacksize and stackaddr attributes . see pthread_attr_getdetachstate(3T) pthread_attr_setstackaddr(): set stackaddr attribute ................. see pthread_attr_getdetachstate(3T) pthread_attr_setstacksize(): set stacksize attribute .................. see pthread_attr_getdetachstate(3T) pthread_cancel(3T): thread_cancel() .............................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description ..................................................................................................... see pthread_mutex_getspin_np(3T) pthread_mutex_init(3T): pthread_mutex_init(), pthread_mutex_destroy() ..................................................................................................................... initialize or destroy a mutex pthread_mutex_lock(3T): pthread_mutex_lock(), pthread_mutex_trylock() .
Table of Contents Volumes Six and Seven Entry Name(Section): name Description ........................................................................................................... see pthread_rwlock_rdlock(3T) pthread_rwlock_trywrlock(): attempt to lock a read-write lock for writing .......................................................................................................... see pthread_rwlock_wrlock(3T) pthread_rwlock_unlock(3T): pthread_rwlock_unlock() ..................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description ..................................................................................................... return a stream to a remote command rcmd(): return a stream to a remote command .......................................................................... see rcmd(3N) readdir(): get pointer to current entry in open directory ...................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description rnusers(3N): rnusers(), rusers() .................................. return information about users on remote machines round(3M): round(), roundf(), roundl(), roundw(), roundq() ....................................... round functions roundf(): round function (float) ............................................................................................... see round(3M) roundl(): round function (long double) ...................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description rpc_svc_create(3N): svc_control(), svc_create(), svc_destroy(), svc_dg_create(), svc_fd_create(), svc_raw_create(), svc_tli_create(), svc_tp_create(), svc_vc_create() ............................................... library routines for the creation of server handles, rpc rpc_svc_err(3N): svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth() ......................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description secure_rpc(3N): authdes_getucred(), authdes_seccreate(), getnetname(), host2netname(), key_decryptsession(), key_encryptsession(), key_gendes(), key_setsecret(), key_secretkey_is_set(), netname2host(), netname2user(), user2netname() ........................................................ library routines for secure remote procedure calls seed48(): generate pseudo-random numbers ....................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description shl_findsym(): explicit load of shared libraries ................................................................... see shl_load(3X) shl_findsym(): explicit load of shared libraries for Integrity systems ............................. see shl_load_ia(3X) shl_findsym(): explicit load of shared libraries for PA-RISC systems ............................ see shl_load_pa(3X) shl_get(): explicit load of shared libraries ................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description sindf(): sine function of degree argument (float) ........................................................................ see sind(3M) sindl(): sine function of degree argument (long double) ............................................................. see sind(3M) sindq(): sine function of degree argument (quad) .......................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description smfi_getsymval(3N): smfi_getsymval() ................................................. gets the value of a sendmail macro smfi_insheader(3N): smfi_insheader() ...................... prepends a header to the sendmail current message smfi_main(3N): smfi_main() .......................................................... passes control to the libmilter event loop smfi_opensocket(3N): smfi_opensocket() ..................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description strstr(): character string operations ....................................................................................... see string(3C) strtoacl(3C): strtoacl(), strtoacl_r(), strtoaclpatt(), strtoaclpatt_r(), aclentrystart ............. convert string form to access control list (ACL) structure, HFS file system only strtoacl_r(): convert string form to access control list (ACL) structure, HFS file system only ...............
Table of Contents Volumes Six and Seven Entry Name(Section): name Description svcerr_noprog(): library routine for server side remote procedure call errors .............. see rpc_svc_err(3N) svcerr_progvers(): library routine for server side remote procedure call errors .......... see rpc_svc_err(3N) svcerr_systemerr(): library routine for server side remote procedure call errors ........ see rpc_svc_err(3N) svcerr_weakauth(): library routine for server side remote procedure call errors ..........
Table of Contents Volumes Six and Seven Entry Name(Section): name Description tcdrain(): tty line control functions ...................................................................................... see tccontrol(3C) tcflow(): tty line control functions ........................................................................................ see tccontrol(3C) tcflush(): tty line control functions ......................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description uaddr2taddr(): generic transport name-to-address translation ..............................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description uwx_self_init_context(3X): uwx_self_init_context ........ initialize the current context for self-unwinding uwx_self_init_info(3X): uwx_self_init_info ............................................................... create and initialize a callback info structure for self-unwinding uwx_set_nofr(3X): uwx_set_nofr .................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description wchgat(): change renditions of characters in a window ................................................................ see chgat(3X) wclear(): clear a window .............................................................................................................. see clear(3X) wclrtobot(): clear from cursor to end of window ....................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description wgetstr(): get a multi-byte character string from the terminal ................................................... see getstr(3X) whline(): draw lines from single-byte characters and renditions .................................................. see hline(3X) whline_set(): draw lines from complex characters and renditions ........................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description xdr_char(): library routine for external data representation .......................................... see xdr_simple(3N) xdr_complex(3N): xdr_array(), xdr_bytes(), xdr_opaque(), xdr_pointer(), xdr_reference(), xdr_string(), xdr_string(), xdr_vector(), xdr_wrapstring() ......................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description yp_get_default_domain(): Network Information Service client interface ............................. see ypclnt(3C) yp_master(): Network Information Service client interface ..................................................... see ypclnt(3C) yp_match(): Network Information Service client interface ....................................................... see ypclnt(3C) yp_next(): Network Information Service client interface ........
Notes 64 Hewlett-Packard Company HP-UX 11i Version 3: February 2007
Section 3 Part 2 Library Functions N-Z
Section 3 Part 2 Library Functions N-Z
nan(3M) nan(3M) NAME nan(), nanf(), nanl(), nanw(), nanq() - string to NaN conversion functions SYNOPSIS #include double nan(const char *tagp); HP Integrity Server Only float nanf(const char *tagp); long double nanl(const char *tagp); extended nanw(const char *tagp); quad nanq(const char *tagp); DESCRIPTION The nan() function creates a quiet NaN from the specified string. If tagp does not point to an n-charsequence or an empty string, the call is equivalent to strtod(""NAN"", (char**) NULL) .
napms(3X) napms(3X) (ENHANCED CURSES) NAME napms — suspend the calling process SYNOPSIS #include int napms(int ms); DESCRIPTION The napms() function takes at least ms milliseconds to return. RETURN VALUE The napms() function returns OK. ERRORS No errors are defined. APPLICATION USAGE A more reliable method of achieving a timed delay is the usleep() function. SEE ALSO delay_output(3X), usleep(2) (in the X/Open System Interfaces and Headers, Issue 4, Version 2 specification), .
ndbm(3X) ndbm(3X) NAME dbm_open, dbm_close, dbm_fetch, dbm_store, dbm_delete, dbm_firstkey, dbm_nextkey, dbm_error, dbm_clearerr - database subroutines SYNOPSIS #include
ndbm(3X) ndbm(3X) aligned, the block should be copied to an appropriately aligned area. The .pag file will contain holes so that its apparent size is about four times its actual content. Some older UNIX systems create real file blocks for these holes when touched. These files cannot be copied by normal means (such as cp(1), cat(1), tar(1), or ar(1)) without expansion. dptr pointers returned by these subroutines point into static storage that is changed by subsequent calls.
net_aton(3C) net_aton(3C) NAME net_aton( ), net_ntoa( ) - network station address string conversion routines SYNOPSIS #include char *net_aton(char *dstr, const char *sstr, int size); char *net_ntoa(char *dstr, const char *sstr, int size); DESCRIPTION net_aton() and net_ntoa() translate station addresses between hexadecimal, octal or decimal, and binary formats: net_aton() net_ntoa() converts a hexadecimal, octal, or decimal address to a binary address.
netdir(3N) netdir(3N) NAME netdir: netdir_getbyname(), netdir_getbyaddr(), netdir_free(), netdir_options(), taddr2uaddr(), uaddr2taddr(), netdir_perror(), netdir_sperror() - generic transport name-to-address translation SYNOPSIS #include
netdir(3N) netdir(3N) getnetconfig(). (See getnetconfig(3N)). The netdir_getbyaddr() routine maps addresses to service names. This routine returns service , a list of host and service pairs that would yield this address.
netdir(3N) netdir(3N) char c_uaddr; /* client’s universal addr */ char m_uaddr; /* the result */ If s_uaddr is an address such as 0.0.0.0.1.12 , and the call is sucm_uaddr is set to an address such as cessful, 192.11.109.89.1.12. For most transports, m_uaddr is identical to s_uaddr . MULTITHREAD USAGE Thread Safe: Cancel Safe: Fork Safe: Async-cancel Safe: Async-signal Safe: Yes Yes No No No These functions can be called safely in a multithreaded environment.
newpad(3X) newpad(3X) (CURSES) NAME newpad, pnoutrefresh, prefresh — pad management functions SYNOPSIS #include WINDOW *newpad(int nlines, int ncols); int pnoutrefresh(WINDOW *pad, int pminrow, int pmincol, int sminrow, int smincol, int smaxrow, int smaxcol); int prefresh(WINDOW *pad, int pminrow, int pmincol, int sminrow, int smincol, int smaxrow, int smaxcol); DESCRIPTION The newpad() function creates a specialised WINDOW data structure representing a pad with nlines lines and ncols columns.
newwin(3X) newwin(3X) (CURSES) NAME newwin, subwin — window creation functions SYNOPSIS #include WINDOW *newwin(int nlines, int ncols, int begin_y, int begin_x); WINDOW *subwin(WINDOW *orig, int nlines, int ncols, int begin_y, int begin_x); DESCRIPTION The newwin() function creates a new window with nlines lines and ncols columns, positioned so that the origin is (begin_y, begin_x). If nlines is zero, it defaults to LINES − begin_y; if ncols is zero, it defaults to COLS − begin_x.
nextafter(3M) nextafter(3M) NAME nextafter( ), nextafterf( ), nextafterl( ), nextafterw( ), nextafterq( ), nexttoward( ), nexttowardl( ), nexttowardw( ), nexttowardq( ) - next representable floating-point values nexttowardf( ), SYNOPSIS #include
nextafter(3M) nextafter(3M) RETURN VALUE If x equals y, nextafter() returns y, and nexttoward() returns y converted to the type of x. If x or y is NaN, nextafter() and nexttoward() return NaN. If x is finite and the correct function value would overflow, nextafter() and nexttoward() return ±HUGE_VAL (equal to +INFINITY), according to the sign of x, and raise the overflow exception. If the return value is denormal and x!=y, these functions raise the underflow and inexact floating-point exceptions.
nl(3X) nl(3X) (CURSES) NAME nl, nonl — enable/disable newline translation SYNOPSIS #include int nl(void); int nonl(void); DESCRIPTION The nl() function enables a mode in which carriage return is translated to newline on input. The nonl() function disables the above translation. Initially, the above translation is enabled. RETURN VALUE Upon successful completion, these functions return OK. Otherwise, they return ERR. ERRORS No errors are defined.
nl_langinfo(3C) nl_langinfo(3C) NAME nl_langinfo( ) - language information SYNOPSIS #include char *nl_langinfo(nl_item item); DESCRIPTION nl_langinfo() returns a pointer to a null-terminated string containing information relevant to a particular language or cultural area defined in the program’s locale (see setlocale(3C)). The manifest constant names and values of item are defined in .
nlist(3C) nlist(3C) NAME nlist(), nlist64() - get entries from name list SYNOPSIS Remarks For Integrity systems, see nlist_ia(3C). For PA-RISC systems, see nlist_pa(3C). Use the uname command to determine your system type. uname -m returns ia64 on Integrity systems. All other values represent PA-RISC systems. SEE ALSO nlist_ia(3C), nlist_pa(3C), uname(1).
nlist_ia(3C) nlist_ia(3C) Integrity Systems Only NAME nlist_ia: nlist(), nlist64() - get entries from name list on Integrity systems SYNOPSIS Command: cc [flag]... -lelf [library]... #include int nlist( const char *file_name , struct nlist *nl ); int nlist64( const char *file_name , struct nlist64 *nl ); Remarks The use of symbol table type and value information is inherently nonportable.
nlist_ia(3C) Integrity Systems Only nlist_ia(3C) STANDARDS CONFORMANCE nlist() : SVID2, SVID3 n HP-UX 11i Version 3: February 2007 −2− Hewlett-Packard Company 83
nlist_pa(3C) nlist_pa(3C) PA-RISC Systems Only NAME nlist_pa: nlist(), nlist64() - get entries from name list on PA-RISC systems SYNOPSIS nlist() Command: cc [flag]... cfile... #include int nlist( const char *file_name , struct nlist *nl ); nlist64() Command: cc [flag]... cfile... -lelf [library]... #include int nlist64( const char *file_name , struct nlist64 *nl ); Remarks The use of symbol table type and value information is inherently nonportable.
nlist_pa(3C) PA-RISC Systems Only nlist_pa(3C) WARNINGS The header file is automatically included by for compatibility. However, including is discouraged if the only information needed from is for use by nlist() or nlist64() . If is included, the line #undef n_name may need to follow it. SEE ALSO ld(1), elf(3E), a.out(4), nlist(4).
nodelay(3X) nodelay(3X) (CURSES) NAME nodelay — enable or disable block during read SYNOPSIS #include int nodelay(WINDOW *win, bool bf); DESCRIPTION The nodelay() function specifies whether Delay Mode or No Delay Mode is in effect for the screen associated with the specified window. If bf is TRUE, this screen is set to No Delay Mode. If bf is FALSE, this screen is set to Delay Mode. The initial state is FALSE. RETURN VALUE Upon successful completion, nodelay() returns OK.
noqiflush(3X) noqiflush(3X) (ENHANCED CURSES) NAME noqiflush, qiflush — enable/disable queue flushing SYNOPSIS #include void noqiflush(void); void qiflush(void); DESCRIPTION The qiflush() function causes all output in the display driver queue to be flushed whenever an interrupt key (interrupt, suspend, or quit) is pressed. The noqiflush() causes no such flushing to occur. The default for the option is inherited from the display driver settings.
notimeout(3X) notimeout(3X) (ENHANCED CURSES) NAME notimeout, timeout, wtimeout — control blocking on input SYNOPSIS #include int notimeout(WINDOW *win, bool bf); void timeout(int delay); void wtimeout(WINDOW *win, int delay); DESCRIPTION The notimeout() function specifies whether Timeout Mode or No Timeout Mode is in effect for the screen associated with the specified window. If bf is TRUE, this screen is set to No Timeout Mode. If bf is FALSE, this screen is set to Timeout Mode.
overlay(3X) overlay(3X) (CURSES) NAME overlay, overwrite — copy overlapped windows SYNOPSIS #include int overlay(const WINDOW *srcwin, WINDOW *dstwin); int overwrite(const WINDOW *srcwin, WINDOW *dstwin); DESCRIPTION The overlay() and overwrite() functions overlay srcwin on top of dstwin. The scrwin and dstwin arguments need not be the same size; only text where the two windows overlap is copied.
pam(3) pam(3) NAME PAM - Pluggable Authentication Module SYNOPSIS #include cc [flag]... file... -lpam [library]... DESCRIPTION PAM gives system administrators the flexibility of choosing any authentication service available on the system to perform authentication. The framework also allows new authentication service modules to be plugged in and made available without modifying the applications.
pam(3) pam(3) To perform session management, applications call pam_open_session(). For example, the system may want to store the total time for the session. The function pam_close_session() closes the current session. When necessary, applications can call pam_get_item() and pam_set_item() to access and update specific authentication information. Such information may include the current username.
pam_acct_mgmt(3) pam_acct_mgmt(3) NAME pam_acct_mgmt() - perform PAM account validation procedures SYNOPSIS cc [ flag ... ] file ... -lpam [ library ... ] #include int pam_acct_mgmt(pam_handle_t *pamh , int flags ); DESCRIPTION The function pam_acct_mgmt() is called to determine if the current user’s account is valid. This includes checking for password expiration, account expiration, account locks and access hour restrictions.
pam_authenticate(3) pam_authenticate(3) NAME pam_authenticate - perform authentication within the PAM framework SYNOPSIS cc [ flag . . . ] file . . . -lpam [ library . . . ] #include int pam_authenticate(pam_handle_t *pamh , int flags ); DESCRIPTION pam_authenticate() is called to authenticate the current user. The user is usually required to enter a password or similar authentication token depending upon the authentication service configured within the system.
pam_chauthtok(3) pam_chauthtok(3) NAME pam_chauthtok - perform password related functions within the PAM framework SYNOPSIS cc [ flag ... ] file ... -lpam [ library ... ] #include int pam_chauthtok(pam_handle_t *pamh , int flags ); DESCRIPTION pam_chauthtok() is called to change the authentication token associated with a particular user referenced by the authentication handle, pamh.
pam_get_user(3) pam_get_user(3) NAME pam_get_user - PAM routine to retrieve user name. SYNOPSIS cc [ flag . . . ] file . . . -lpam [ library . . . ] #include int pam_get_user(pam_handle_t *pamh , char **user , const char *prompt ); DESCRIPTION pam_get_user() is used by PAM service modules to retrieve the current user name from the PAM handle.
pam_open_session(3) pam_open_session(3) NAME pam_open_session, pam_close_session - perform PAM session creation and termination operations SYNOPSIS cc [ flag . . . ] file . . . -lpam [ library . . . ] #include
pam_set_data(3) pam_set_data(3) NAME pam_set_data, pam_get_data - PAM routines to maintain module specific state SYNOPSIS cc [ flag . . . ] file . . . -lpam [ library . . . ] #include
pam_set_item(3) pam_set_item(3) NAME pam_set_item, pam_get_item - authentication information routines for PAM SYNOPSIS cc [ flag . . . ] file . . . -lpam [ library . . . ] #include int pam_set_item(pam_handle_t *pamh , int item_type , const void *item ); int pam_get_item(const pam_handle_t *pamh , int item_type , void **item ); DESCRIPTION pam_get_item() and pam_set_item() allow applications and PAM service modules to access and update PAM information as needed.
pam_setcred(3) pam_setcred(3) NAME pam_setcred - modify/delete user credentials for an authentication service SYNOPSIS cc [ flag . . . ] file . . . -lpam [ library . . . ] #include int pam_setcred(pam_handle_t *pamh , int flags ); DESCRIPTION pam_setcred() is used to establish, modify, or delete user credentials.
pam_sm(3) pam_sm(3) NAME pam_sm - PAM Service Module APIs SYNOPSIS #include #include cc [ flag . . . ] file . . . -lpam [ library . . . ] DESCRIPTION PAM gives system administrators the flexibility of choosing any authentication service available on the system to perform authentication. The framework also allows new authentication service modules to be plugged in and made available without modifying the applications.
pam_sm(3) pam_sm(3) Interaction With the User The PAM service modules do not communicate directly with the user; instead they rely on the application to perform all such interactions. The application passes a pointer to the function, conv( ), along with any associated application data pointers, through the pam_conv structure when it initiates an authentication transaction (via a call to pam_start() ).
pam_sm(3) pam_sm(3) RETURN VALUE The PAM service module functions may return any of the PAM error numbers specified in the specific man pages. It can also return a PAM_IGNORE error number to mean that the PAM framework should ignore this module regardless of whether it is required, optional or sufficient. This error number is normally returned when the module does not want to deal with the given user at all.
pam_sm_acct_mgmt(3) pam_sm_acct_mgmt(3) NAME pam_sm_acct_mgmt() - service provider implementation for pam_acct_mgmt SYNOPSIS cc [flag]... file... -lpam [library]... #include #include int pam_sm_acct_mgmt(pam_handle_t *pamh , int flags , int argc , const char **argv ); DESCRIPTION In response to a call to pam_acct_mgmt(3), the PAM framework calls pam_sm_acct_mgmt() from the modules listed in the pam.conf(4) file.
pam_sm_acct_mgmt(3) pam_sm_acct_mgmt(3) SEE ALSO pam(3), pam_acct_mgmt(3), syslog(3C), pam.conf(4).
pam_sm_authenticate(3) pam_sm_authenticate(3) NAME pam_sm_authenticate - Service provider implementation for pam_authenticate SYNOPSIS cc [ flag . . . ] file . . . -lpam [ library . . . ] #include #include int pam_sm_authenticate(pam_handle_t *pamh , int flags , int argc , const char **argv ); DESCRIPTION In response to a call to pam_authenticate(3), the PAM framework calls pam_sm_authenticate() from the modules listed in the pam.conf(4) file.
pam_sm_authenticate(3) PAM_USER_UNKNOWN PAM_IGNORE pam_sm_authenticate(3) User not known to underlying authentication module. Ignore underlying authentication module regardless of whether the control flag is required , optional or sufficient . SEE ALSO pam(3), pam_authenticate(3), pam.conf(4), pam_user.conf(4).
pam_sm_chauthtok(3) pam_sm_chauthtok(3) NAME pam_sm_chauthtok - Service provider implementation for pam_chauthtok SYNOPSIS cc [ flag . . . ] file . . . -lpam [ library . . . ] #include #include int pam_sm_chauthtok(pam_handle_t *pamh , int flags , int argc , const char **argv ); DESCRIPTION In response to a call to pam_chauthtok() the PAM framework calls pam_sm_chauthtok() from the modules listed in the pam.conf(4) file.
pam_sm_chauthtok(3) pam_sm_chauthtok(3) If a user’s password has aged or expired, a PAM account module could save this information as state in the authentication handle, pamh, using pam_set_data(). The related password management module could retrieve this information using pam_get_data() to determine whether or not it should prompt the user to update the password for this particular module. RETURN VALUES Upon successful completion, PAM_SUCCESS must be returned.
pam_sm_open_session(3) pam_sm_open_session(3) NAME pam_sm_open_session, pam_sm_close_session - Service provider implementation for pam_open_session and pam_close_session respectively SYNOPSIS cc [ flag . . . ] file . . . -lpam [ library . . . ] #include #include
pam_sm_setcred(3) pam_sm_setcred(3) NAME pam_sm_setcred - Service provider implementation for pam_setcred SYNOPSIS cc [ flag . . . ] file . . . -lpam [ library . . . ] #include #include int pam_sm_setcred(pam_handle_t *pamh , int flags , int argc , const char **argv ); DESCRIPTION In response to a call to pam_setcred(), the PAM framework calls pam_sm_setcred() from the modules listed in the pam.conf(4) file.
pam_start(3) pam_start(3) NAME pam_start(), pam_end() - authentication transaction routines for PAM SYNOPSIS Command: cc [flag]... file... -lpam [library]... #include int pam_start( const char *service , const char *user , const struct pam_conv *pam_conv , pam_handle_t **pamh ); int pam_end( pam_handle_t *pamh , int status ); DESCRIPTION pam_start() is called to initiate an authentication transaction.
pam_start(3) pam_start(3) The maximum size of the message and the response string is PAM_MAX_MSG_SIZE defined in . The structure pam_response is used by the authentication service to get the user’s response back from the application or user. The storage used by pam_response has to be allocated by the application and freed by the PAM modules.
pam_strerror(3) pam_strerror(3) NAME pam_strerror - get PAM error message string SYNOPSIS cc [ flag . . . ] file . . . -lpam [ library . . . ] #include const char *pam_strerror(pam_handle_t *pamh , int errnum ); DESCRIPTION pam_strerror() maps the PAM error number in errnum to a PAM error message string, and returns a pointer to that string. The application should not free or modify the string returned. The pamh argument is the PAM handle obtained by a prior call to pam_start() .
pathfind(3G) pathfind(3G) NAME pathfind() - search for named file in named directories SYNOPSIS #include char *pathfind (const char *path , const char *name , const char *mode ); DESCRIPTION pathfind searches the directories named in path for the file name. The directories named in path are separated by colons.
pechochar(3X) pechochar(3X) (ENHANCED CURSES) NAME pechochar, pecho_wchar — write a character and rendition and immediately refresh the pad SYNOPSIS #include int pechochar(WINDOW *pad, chtype ch); int pecho_wchar(WINDOW *pad, const cchar_t *wch); DESCRIPTION The pechochar() and pecho_wchar() functions output one character to a pad and immediately refresh the pad. They are equivalent to a call to waddch() or wadd_wch() , respectively, followed by a call to prefresh() .
perror(3C) perror(3C) NAME perror(), strerror(), strerror_r() - write system error messages SYNOPSIS #include void perror(const char *s); #include char *strerror(int errnum); #include extern char *sys_errlist[ ]; extern int sys_nerr; #include
perror(3C) perror(3C) WARNINGS The return value for strerror() points to data whose content is overwritten by subsequent calls to strerror() from the same thread. SEE ALSO errno(2), lang(5), environ(5), thread_safety(5). STANDARDS CONFORMANCE perror() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.
pfmt(3C) pfmt(3C) NAME pfmt(), vpfmt() - display message in standard format SYNOPSIS #include int pfmt(FILE *stream, long flags, char *fmt, /* [arg, ] */ ...); #include #include int vpfmt(FILE *stream, long flags, char *fmt, va_list ap); DESCRIPTION The pfmt() system call can be used to write a message in standard format to stream. It can also be used to write a localized string to stream. The arguments to pfmt() are formatted using printf() style formatting.
pfmt(3C) pfmt(3C) The pfmt() system call displays Message not found!! under the following conditions: • No message catalog is specified in fmt and no catalog is defined via setcat(3C). • msg_number is not positive. • No message could be retrieved and def_str is not specified. RETURN VALUE If successful, pfmt() and vpfmt() return the number of bytes written. Otherwise, they return a negative value.
popen(3S) popen(3S) NAME popen( ), pclose( ) - initiate pipe I/O to/from a process SYNOPSIS #include FILE *popen(const char *command, const char *type); int pclose(FILE *stream); DESCRIPTION popen() creates a pipe between the calling program and a command to be executed by the POSIX shell, /usr/bin/sh (see sh-posix(1)). The arguments to popen() are pointers to null-terminated strings containing, respectively, a shell command line and an I/O mode, either r for reading or w for writing.
posix_openpt(3C) posix_openpt(3C) NAME posix_openpt( ) - open a pseudo-terminal master device SYNOPSIS #include #include int posix_openpt(int oflag); Parameters oflag indicates the file status flags and file access modes of the open file description. Values for oflag are constructed by a bitwise-inclusive OR of flags from the following list, defined in : O_RDWR Open for reading and writing.
pow(3M) pow(3M) NAME pow( ), powf( ), powl( ), poww( ), powq( ), pown( ), pownf( ), pownl( ), pownw( ), pownq( ), powlln( ), powllnf( ), powllnl( ), powllnw( ), powllnq( ) - power functions SYNOPSIS #include
pow(3M) pow(3M) USAGE To use these functions, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options. To use (for Integrity servers) poww() , powq() , pownw() , pownq() , powllnw() , or powllnq() , compile also with the -fpwidetypes option. To use any of these functions, make sure your program includes , and link in the math library by specifying -lm on the compiler or linker command line.
pow(3M) pow(3M) The pown() and powlln() functions follow the specification for the pow() function in the applicable special and error cases. PA-RISC If x and y are both zero, pow() returns 1.0. If x or y is NaN, pow() returns NaN. If x is zero and y is a negative finite number, pow() returns −HUGE_VAL (equal to −INFINITY). If x is finite and less than zero and y is finite and not an integer, pow() returns NaN. If the correct value would overflow, pow() returns ±HUGE_VAL (equal to +/-INFINITY).
prcmd(3N) prcmd(3N) NAME prcmd(), prcmd_init() - return streams to parallel remote commands SYNOPSIS #include void prcmd_init ( struct prc_host *hostp, int num_hosts, int caller_status, char *command, time_t timeout ); int prcmd ( struct prc_host *hostp, int num_hosts ); Remarks These functions reside in libdc , and are linked using the -ldc option to the ld or cc command.
prcmd(3N) prcmd(3N) PRC_ERR_SELECT /* select() failed */ PRC_CSBIT_ERR /* connection has errored out */ PRC_CONN_NONE PRC_CONN1_WAIT PRC_CONN2_WAIT PRC_CONN3_WAIT PRC_READ_WAIT PRC_READ_READY PRC_CONN_DONE PRC_CONN_NO_IPS PRC_CONN_FAILED PRC_CONN_REFUSED PRC_CONN_TIMEOUT /* /* /* /* /* /* /* /* /* /* /* */ */ */ */ */ */ */ */ */ */ */ needs connection waiting for stdio connect() waiting for stderr connect() waiting for remshd reply waiting for data data is ready to read connection closed can’t g
prcmd(3N) prcmd(3N) prc_conn_status field for the host to PRC_CONN_TIMEOUT, and closes the files specified by the host’s prc_fp and prc_fp2 fields. A host specified by name can be listed with multiple IP addresses in the hosts database. In that case, when a connection to one of that host’s IP addresses fails, is refused, or times out before reaching the PRC_READ_WAIT state, prcmd() attempts to open a new connection on the host’s next IP address (up to a limit of five IP addresses per host).
prcmd(3N) prcmd(3N) standard error port). When neither connection is ready for prc_conn_status field is left unchanged. reading, the When the standard error connection is ready for reading, prcmd() does an accept() on it, closes the old prc_fp2 and revises the value to a new file pointer for the new socket/fd, changes prc_conn_status to PRC_CONN3_WAIT, and sets prc_conn_time to the current system clock in seconds. If only the stdout connection is ready for reading, this indicates a remshd failure.
prcmd(3N) prcmd(3N) Usage Notes Once a connection is made, and a host is in one of the PRC_READ_ * states, control of the "conversation" between the calling program and remote host belongs to the calling program. Conversations are of two types: 1. calling program communicates first 2.
prcmd(3N) prcmd(3N) due to failure on the local system. failed system call. prc_errno is set to the errno value from a PRC_CONN_REFUSED • Connection refused. Per errno(2): "This usually results from trying to connect to a service that is inactive on the foreign host." It can also be due to any other remote (remshd ) failure, including access denial; and to an improper connection attempt on the standard error port. The calling program should check the host’s prc_errmsg field.
prcmd(3N) PRC_ERR_SELECT prcmd(3N) A select() call failed (other than with [EINTR]); errno is set on return from prcmd() . The data in the host list is valid but no hosts are read-ready or write-ready, even if marked PRC_READ_READY from a previous successful call. DIAGNOSTICS Unlike rcmd() , prcmd() does not copy messages from remshd to the local standard error when remshd fails. It just puts the host in PRC_CONN_REFUSED state.
prcmd(3N) prcmd(3N) that have multiple internet addresses, only the specified internet address is tried. There is a limit of about 512 reserved ports on each system, and a soft limit for the number of available file descriptors for each process. Each specified host requires two reserved ports and two file descriptors for the connection to check its status.
printf(3S) printf(3S) NAME printf(), fprintf(), sprintf(), snprintf() - print formatted output SYNOPSIS #include int printf(const char *__restrict format, /* [arg,] */ ...); int fprintf(FILE *__restrict stream, const char *__restrict format, /* [arg,] */ ...); int sprintf(char *__restrict s, const char *__restrict format, /* [arg,] */ ...); int snprintf(char *__restrict s, size_t maxsize, const char *__restrict format, /* [arg,] */ ...
printf(3S) printf(3S) • an optional hh specifying that a following n conversion specifier applies to a pointer to a signed char argument • an optional hL specifying that a following a, e, f, or g conversion wide-character applies to a type extended which is the 80-bit IEEE-754 double-extended type in the Itanium architecture • an optional j specifying that a following d, i, o, u, x or X conversion specifier applies to an intmax_t or uintmax_t argument • an optional j specifying that a following n
printf(3S) printf(3S) (which they normally are). 0 Leading zeros (following any indication of sign or base) are used to pad to the field width for all conversion characters. No space padding is performed. If both the 0 and - appear, the 0 flag is ignored. For d, i, o, u, p, x, and X, conversions, if a precision is specified, the 0 flag is ignored.
printf(3S) printf(3S) If an l (ell) qualifier is present, the argument must be a pointer to an array of type wchar_t . Wide-characters from the array are converted to characters (each as if by a call to the wcrtomb() function, with the conversion state described by an mbstate_t object initialized to zero before the first wide-character is converted) up to and including a terminating null wide-character. The resulting characters are written up to (but not including) the terminating null character (byte).
printf(3S) printf(3S) The LC_NUMERIC category determines the radix character used to print floating-point numbers, and the thousands’ grouping characters if the grouping flag ’ is on. International Code Set Support Single byte character code sets are supported. Multibyte character code sets are also supported as described in the LC_CTYPE category above.
printf(3S) printf(3S) Sonntag, 3 Juli 10:02 WARNINGS Notice that with the c conversion character, an int arg is converted to an unsigned char. Hence, whole multibyte characters cannot be printed using a single c conversion character. A precision with the s conversion character might result in the truncation of a multibyte character. Use of a conversion character which doesn’t match the type of the corresponding argument passed in will result in invalid data being returned.
priv_add(3) priv_add(3) NAME priv_add: priv_add_effective(), priv_get(), priv_remove(), priv_set_effective(), privset_add_effective(), privset_get(), privset_remove(), privset_set_effective() - add, set, remove, and retrieve a process’ privileges SYNOPSIS #include #include
priv_add(3) priv_add(3) effective privilege set, the privilege should be present in the permitted privilege set of the calling process. priv_remove() Removes the given privilege(s) from the calling process’ privilege set. The priv_type argument specifies the privilege set to be modified. Privileges removed from permitted privilege set are also removed from effective and retained privilege sets of the calling process.
priv_add(3) priv_add(3) { if (priv_set_effective(priv_list, ",") ) { printf("priv_set failed \n"); exit(1); } printf("\nThe effective set of the process is %s\n", priv_set_to_str(privset_get(PRIV_EFFECTIVE, 0), ’,’, PRIV_STR_SHORT)); } WARNINGS Future product updates may introduce new privileges. In order to assure forward compatibility, applications must not remove a basic privilege from their effective, potential, or retained set that they do not recognize.
priv_getbyname(3) priv_getbyname(3) NAME priv_getbyname() - convert privilege name to privilege ID SYNOPSIS #include #include priv_t priv_getbyname(const char *priv_name ); Parameters priv_name char pointer to the string containing the privilege name. DESCRIPTION priv_getbyname() converts the external (string) representation of the privilege name to the internal (numeric) privilege representation.
priv_getbynum(3) priv_getbynum(3) NAME priv_getbynum() - convert privilege ID to privilege name SYNOPSIS #include #include const char *priv_getbynum(priv_t priv_id ); Parameters priv_id The internal (numeric) representation of a privilege to be converted to the external (string) representation. DESCRIPTION priv_getbynum() converts the internal privilege representation of the privilege ID to the external string representation.
priv_str_to_set(3) priv_str_to_set(3) NAME priv_str_to_set(), priv_set_to_str() - privilege name to set conversion function SYNOPSIS #include #include priv_set_t * priv_str_to_set(const char * priv_list , const char *delimiter , char **index_ptr ); char *priv_set_to_str(const priv_set_t * priv_vec , char delimiter , int flag ); Parameters priv_str_to_set() priv_list The list of privilege names, passed as a string, separated by one or more characters from delimiter.
priv_str_to_set(3) priv_str_to_set(3) ERRORS If any of the following conditions occur, the functions fail and set errno . [ENOMEM] Cannot allocate enough memory for the given data. [EINVAL] One or more arguments are invalid. EXAMPLES #include #include #include
privileges(3) privileges(3) NAME privileges: priv_addset(), priv_delset(), priv_ismember(), priv_isobserved(), privset_add(), privset_alloc(), privset_copy(), privset_del(), privset_empty(), privset_fill(), privset_free(), privset_intersect(), privset_inverse(), privset_isempty(), privset_isequal(), privset_isfull(), privset_ismember(), privset_issubset(), privset_subtract(), privset_union() - privilege manipulation operations for checking and debugging purposes SYNOPSIS #include
privileges(3) privileges(3) a privilege. privset_add() privset_alloc() Adds the privilege privid to the privilege set referred to by dstp. Allocates memory for a privilege set of type priv_set_t , but does not initialize the space. The space allocated by this routine should be released using the privset_free() routine. privset_copy() Copies the privilege set referred to by srcp to the privilege set referred to by dstp.
privileges(3) privileges(3) SEE ALSO priv_getbyname(3), priv_getbynum(3), priv_set_to_str(3), priv_str_to_set(3), privileges(5).
pthread(3T) pthread(3T) (Pthread Library) NAME pthread - introduction to POSIX.1c threads DESCRIPTION The POSIX.1c library developed by HP enables the creation of processes that can exploit application and multiprocessor platform parallelism. The pthread library libpthread consists of over 90 standardized interfaces for developing concurrent applications and synchronizing their actions within processes or between them.
pthread(3T) pthread(3T) (Pthread Library) pthread_detach() Makes it unnecessary to "join" the thread. Thread resources are reaped by the system at the time the thread terminates. PTHREAD ATTRIBUTES A set of thread attributes may be provided to pthread_create(). Any changes from default values must be made to the attribute set before the call to pthread_create() is made. Subsequent changes to the attribute set do not affect the created thread.
pthread(3T) pthread(3T) (Pthread Library) Set the characteristics of cancellation for the thread. Cancellation may be enabled or disabled, or it may be synchronous or deferred. pthread_cleanup_pop(), pthread_cleanup_push() Register or remove cancellation cleanup handlers. Refer to thread_safety(5) for the list of cancellation points in the pthread library, system functions, and libc. For libc functions, whether the thread is cancelled depends upon what action is performed while executing the function.
pthread(3T) pthread(3T) (Pthread Library) Read-Write locks permit concurrent read access by multiple threads to structures guarded by a read-write lock, but write access by only a single thread. pthread_mutex_init(), pthread_mutex_destroy() Initialize/destroy contents of a mutex lock. pthread_mutex_lock(), pthread_mutex_trylock(), pthread_mutex_unlock() Lock/unlock a mutex. pthread_mutex_getprioceiling(), pthread_mutex_setprioceiling() Manipulate mutex locking priorities.
pthread(3T) pthread(3T) (Pthread Library) Lock/unlock a read-write lock. pthread_rwlockattr_init(), pthread_rwlockattr_destroy(), pthread_rwlockattr_getpshared(), pthread_rwlockattr_setpshared() Manage read-write lock attributes used for pthread_rwlock_init(). POSIX 1.b SEMAPHORES The semaphore functions specified in the POSIX 1.b standard can also be used for synchronization in a multithreaded application. sem_init() , sem_destroy() Initialize/destroy contents of a semaphore.
pthread(3T) pthread(3T) (Pthread Library) zyx = 21; Each thread will have a different value associated with zyx . TLS variables can be statically initialized. Uninitialized TLS variables will be set to zero. Dynamically loaded libraries (with shl_load() ) can declare and use TLS variables. TLS does have a cost in thread creation/termination operations, as TLS space for each thread must be allocated and initialized, regardless of whether it will ever use the variables.
pthread(3T) pthread(3T) (Pthread Library) cc -D_POSIX_C_SOURCE=199506L -o myapp myapp.c -lpthread_tr -lcl When the application is executed, it produces a per-thread file of pthread events. This is used as input to the ttv thread trace visualizer facility available in the HP/PAK performance application kit. There are environment variables defined to control trace data files: THR_TRACE_DIR Where to place the trace data files. If this is not defined, the files go to the current working directory.
pthread(3T) pthread(3T) (Pthread Library) Async-Cancel Safe A function that may be called by a thread with the cancelability state set to PTHREAD_CANCEL_ENABLE and the cancelability type set to PTHREAD_CANCEL_ASYNCHRONOUS. If a thread is canceled in one of these functions, no state is left in the function. These functions generally do not acquire resources to perform the function’s task. Async-Signal Safe An async-signal safe function is a function that may be called by a signal handler.
pthread(3T) pthread(3T) (Pthread Library) Deadlock A deadlock occurs when one or more threads can no longer execute. For example, thread A holds lock 1 and is blocked on lock 2. Meanwhile, thread B holds lock 2 and is blocked on lock 1. Threads A and B are permanently deadlocked. Deadlocks can occur with any number of resource holding threads. An interactive deadlock involves two or more threads. A recursive (or self) deadlock involves only one thread.
pthread(3T) pthread(3T) (Pthread Library) Priority Inversion A situation where a low-priority thread has acquired a resource that is needed by a higher priority thread. As the resource cannot be acquired, the higher priority thread must wait for the resource. The end result is that a low-priority thread blocks a high-priority thread. Process A process can be thought of as a container for one or more threads of execution, an address space, and shared process resources.
pthread(3T) pthread(3T) (Pthread Library) countingsemaphore. A counting semaphore can be locked by multiple threads simultaneously. Each time the semaphore is locked, the value is decremented by one. After the value reaches zero, new attempts to lock the semaphore cause the locking thread to block until the semaphore is unlocked by another thread. Shared Object A shared object is a tangible entity that exists in the address space of a process and is accessible by all threads within the process.
pthread(3T) pthread(3T) (Pthread Library) thread can access the data directly. Thread-Safe Function A thread-safe function is one that may be safely called by multiple threads at the same time. If the function accesses shared data or resources, this access is regulated by a mutex or some other form of synchronization. Thread-Specific Data (TSD) Thread-specific data is global data that is specific to a thread. All threads access the same data variable.
pthread_atfork(3T) pthread_atfork(3T) (Pthread Library) NAME pthread_atfork() - register fork handlers. SYNOPSIS #include int pthread_atfork( void (*prepare)(void), void (*parent)(void), void (*child)(void) ); PARAMETERS prepare This function is called before performing the fork() . parent This function is called in the parent process after performing the fork() . child This function is called in the child process after performing the fork() .
pthread_attr_getdetachstate(3T) pthread_attr_getdetachstate(3T) (Pthread Library) NAME pthread_attr_getdetachstate(), pthread_attr_getguardsize(), pthread_attr_getinheritsched(), pthread_attr_getprocessor_np(), pthread_attr_getschedparam(), pthread_attr_getschedpolicy(), pthread_attr_getscope(), pthread_attr_getstackaddr(), pthread_attr_getstacksize(), pthread_attr_getstack(), pthread_attr_getrsestacksize_np(), pthread_attr_setdetachstate(), pthread_attr_setguardsize(), pthread_attr_setinheritsched(), pth
pthread_attr_getdetachstate(3T) pthread_attr_getdetachstate(3T) (Pthread Library) PARAMETERS attr Pointer to the thread attributes object whose attributes are to be set/retrieved. detachstate This parameter either specifies the new value of the detachstate attribute (set function) or it points to the memory location where the detachstate attribute of attr is to be returned (get function).
pthread_attr_getdetachstate(3T) pthread_attr_getdetachstate(3T) (Pthread Library) pthread_attr_setschedpolicy() - set the schedpolicy attribute. pthread_attr_getschedpolicy() - get the schedpolicy attribute. pthread_attr_setschedparam() - set the schedparam attributes. pthread_attr_getschedparam() - get the schedparam attributes. pthread_attr_setscope() - set the contentionscope attribute. pthread_attr_getscope() - get the contentionscope attribute.
pthread_attr_getdetachstate(3T) pthread_attr_getdetachstate(3T) (Pthread Library) ATTRIBUTE: rsestacksize The legal values for the rsestacksize are: rsestacksize This defines the size (in bytes) of the register stack for the threads created with the attributes object. pthread_attr_setrsestacksize_np() is used to set the register stack size for a thread and pthread_default_rsestacksize_np() to set the default register stack size.
pthread_attr_getdetachstate(3T) pthread_attr_getdetachstate(3T) (Pthread Library) are to be taken from this attributes object. These values will not be inherited from the creating thread. POSIX.1c does not define a default value for the inheritsched attribute. On HP-UX, the default value is PTHREAD_INHERIT_SCHED. pthread_attr_setinheritsched() is used to set the inheritsched attribute in the initialized attributes object attr.
pthread_attr_getdetachstate(3T) pthread_attr_getdetachstate(3T) (Pthread Library) PTHREAD_SPUINHERIT_NP Threads created with this processor attribute inherit their processor binding attributes from the creating thread. This is the default value of the processor attribute. Specifying PTHREAD_LDOMINHERIT_NP or PTHREAD_SPUINHERIT_NP cause both processor binding and locality domain binding attributes to be inherited. The binding_type attribute is ignored.
pthread_attr_getdetachstate(3T) pthread_attr_getdetachstate(3T) (Pthread Library) pthread_attr_getprocessor_np() retrieves the values of the processor and binding_type attributes from the thread attributes object attr. These values are returned in the processor and binding_type parameters, respectively.
pthread_attr_getdetachstate(3T) pthread_attr_getdetachstate(3T) (Pthread Library) [ENOTSUP] The value contained in policy is not a supported value. [ENOSYS] pthread_attr_setrsestacksize_np() and pthread_attr_getrsestacksize_np() are not supported on PA-RISC systems.
pthread_attr_init(3T) pthread_attr_init(3T) (Pthread Library) NAME pthread_attr_init(), pthread_attr_destroy() - initialize or destroy a thread attributes object SYNOPSIS #include int pthread_attr_init( pthread_attr_t *attr ); int pthread_attr_destroy( pthread_attr_t *attr ); PARAMETERS attr Pointer to the thread attributes object to be initialized or destroyed. DESCRIPTION pthread_attr_init() initializes a thread attributes object attr with the default value for all the thread attributes.
pthread_attr_init(3T) pthread_attr_init(3T) (Pthread Library) ERRORS If any of the following occur, the pthread_attr_init() function returns the corresponding error number: [ENOMEM] There is insufficient memory available in which to initialize the pthread attributes object. [EINVAL] The value specified by attr is invalid. If any of the following occur, the pthread_attr_destroy() function returns the corresponding error number: [EINVAL] The value specified by attr is invalid.
pthread_cancel(3T) pthread_cancel(3T) (Pthread Library) NAME pthread_cancel() - cancel execution of a thread SYNOPSIS #include int pthread_cancel( pthread_t thread ); PARAMETERS thread Target thread to be canceled. DESCRIPTION pthread_cancel() requests that thread (hereby referred to as target thread) be canceled. It allows a thread to terminate the execution of any thread in the process in a controlled manner.
pthread_cancel(3T) pthread_cancel(3T) (Pthread Library) STANDARDS CONFORMANCE pthread_cancel(): POSIX 1003.1c.
pthread_cleanup_pop(3T) pthread_cleanup_pop(3T) (Pthread Library) NAME pthread_cleanup_pop(), pthread_cleanup_push() - remove or register a cancellation cleanup handler SYNOPSIS #include void pthread_cleanup_push( void (*routine)(void *), void *arg ); void pthread_cleanup_pop( int execute ); PARAMETERS routine Routine registered as a cancellation cleanup handler. arg Parameter to be passed to the cancellation cleanup handler routine() .
pthread_cleanup_pop(3T) pthread_cleanup_pop(3T) (Pthread Library) SEE ALSO pthread_cancel(3T), pthread_setcancelstate(3T). STANDARDS CONFORMANCE pthread_cleanup_push(): POSIX 1003.1c. pthread_cleanup_pop(): POSIX 1003.1c.
pthread_cond_init(3T) pthread_cond_init(3T) (Pthread Library) NAME pthread_cond_init(), pthread_cond_destroy() - initialize or destroy a condition variable SYNOPSIS #include int pthread_cond_init( pthread_cond_t *__restrict cond, const pthread_condattr_t *__restrict attr ); pthread_cond_t cond = PTHREAD_COND_INITIALIZER; int pthread_cond_destroy( pthread_cond_t *cond ); PARAMETERS cond attr Pointer to the condition variable to be initialized or destroyed.
pthread_cond_init(3T) pthread_cond_init(3T) (Pthread Library) If any of the following occur, the pthread_cond_destroy() function returns the corresponding error number: [EBUSY] An attempt to destroy cond while it is in use by another thread. [EINVAL] cond is not a valid condition variable. WARNINGS The space for condition variable must be allocated before calling pthread_cond_init().
pthread_cond_signal(3T) pthread_cond_signal(3T) (Pthread Library) NAME pthread_cond_signal(), pthread_cond_broadcast() - unblock one or all threads waiting on a condition variable SYNOPSIS #include int pthread_cond_signal( pthread_cond_t *cond ); int pthread_cond_broadcast( pthread_cond_t *cond ); PARAMETERS cond Pointer to the condition variable to be signaled or broadcast.
pthread_cond_signal(3T) pthread_cond_signal(3T) (Pthread Library) SEE ALSO pthread_cond_init(3T), pthread_cond_wait(3T). STANDARDS CONFORMANCE pthread_cond_signal(): POSIX 1003.1c. pthread_cond_broadcast(): POSIX 1003.1c.
pthread_cond_wait(3T) pthread_cond_wait(3T) (Pthread Library) NAME pthread_cond_wait(), pthread_cond_timedwait() - wait or timed wait on a condition variable SYNOPSIS #include int pthread_cond_wait( pthread_cond_t *__restrict cond , pthread_mutex_t *__restrict mutex ); int pthread_cond_timedwait( pthread_cond_t *__restrict cond , pthread_mutex_t *__restrict mutex , const struct timespec *__restrict abstime ); Parameters cond Pointer to the condition variable to be waited on.
pthread_cond_wait(3T) pthread_cond_wait(3T) (Pthread Library) RETURN VALUE pthread_cond_wait() and pthread_cond_timedwait() return the following values: 0 Successful completion. <>0 Failure. An error number is returned to indicate the error. (The errno variable is not set.) ERRORS The following error value is returned by pthread_cond_timedwait() if the corresponding condition is detected. [ETIMEDOUT] One of abstime has passed and a condition signal has not been received.
pthread_cond_wait(3T) pthread_cond_wait(3T) (Pthread Library) } } } (void)pthread_mutex_unlock(&mutex); Code for success condition. AUTHOR pthread_cond_wait() and pthread_cond_timedwait() were derived from the IEEE POSIX P1003.1c standard. SEE ALSO pthread_cond_init(3T), pthread_cond_signal(3T). STANDARDS CONFORMANCE pthread_cond_wait(): POSIX 1003.1c. pthread_cond_timedwait(): POSIX 1003.1c.
pthread_condattr_getpshared(3T) pthread_condattr_getpshared(3T) (Pthread Library) NAME pthread_condattr_getpshared(), pthread_condattr_setpshared() - get or set the process-shared attribute SYNOPSIS #include
pthread_condattr_getpshared(3T) pthread_condattr_getpshared(3T) (Pthread Library) [EINVAL] WARNINGS If a condition The value specified by attr or pshared is invalid. variable is created with the process-shared attribute defined as PTHREAD_PROCESS_SHARED, the cooperating processes should have access to the memory in which the condition variable is allocated. AUTHOR pthread_condattr_setpshared() and pthread_condattr_getpshared() were derived from the IEEE POSIX P1003.1c standard.
pthread_condattr_init(3T) pthread_condattr_init(3T) (Pthread Library) NAME pthread_condattr_init(), pthread_condattr_destroy() - initialize or destroy a condition variable attributes object. SYNOPSIS #include int pthread_condattr_init( pthread_condattr_t *attr ); int pthread_condattr_destroy( pthread_condattr_t *attr ); PARAMETERS attr Pointer to the condition variable attributes object to be initialized or destroyed.
pthread_condattr_init(3T) pthread_condattr_init(3T) (Pthread Library) SEE ALSO pthread_create(3T), pthread_condattr_getpshared(3T), pthread_cond_init(3T). STANDARDS CONFORMANCE pthread_condattr_init(): POSIX 1003.1c. pthread_condattr_destroy(): POSIX 1003.1c.
pthread_create(3T) pthread_create(3T) (Pthread Library) NAME pthread_create() - create a new thread of execution. SYNOPSIS #include int pthread_create( pthread_t *__restrict thread, const pthread_attr_t *__restrict attr, void *(*start_routine)(void *), void *__restrict arg ); PARAMETERS thread attr Pointer to the location where the created thread’s ID is to be returned. Pointer to the thread attributes object describing the characteristics of the created thread.
pthread_create(3T) pthread_create(3T) (Pthread Library) [EINVAL] attr in an invalid thread attributes object. [EINVAL] The value specified by thread is invalid. [EAGAIN] The necessary resources to create another thread are not available, or the number of threads in the calling process already equals PTHREAD_THREADS_MAX. [EINVAL] The scheduling policy or scheduling attributes specified in attr are invalid.
pthread_default_rsestacksize_np(3T) pthread_default_rsestacksize_np(3T) (Pthread Library) NAME pthread_default_rsestacksize_np() - change the default stacksize. SYNOPSIS #include int pthread_default_rsestacksize_np( size_t new_size, size_t *old_size ); PARAMETERS new_size The new default register stack size. old_size Pointer to where the old default register stack size is returned.
pthread_default_stacksize_np(3T) pthread_default_stacksize_np(3T) (Pthread Library) NAME pthread_default_stacksize_np() - change the default stacksize SYNOPSIS #include int pthread_default_stacksize_np( size_t new_size, size_t *old_size ); PARAMETERS new_size The new default stack size. old_size Pointer to where the old default stack size is returned. DESCRIPTION The pthread_default_stacksize_np() function allows an application to change the default value for the stacksize attribute.
pthread_detach(3T) pthread_detach(3T) (Pthread Library) NAME pthread_detach() - mark a thread as detached to reclaim its resources when it terminates SYNOPSIS #include int pthread_detach( pthread_t thread ); PARAMETERS thread Thread whose resources are to be reclaimed immediately when it terminates. DESCRIPTION pthread_detach() is used to detach the thread thread. When thread terminates, its resources will automatically be reclaimed by the system.
pthread_equal(3T) pthread_equal(3T) (Pthread Library) NAME pthread_equal() - compare two thread identifiers SYNOPSIS #include int pthread_equal( pthread_t t1, pthread_t t2 ); PARAMETERS t1 t2 First thread ID to be compared. Second thread ID to be compared. DESCRIPTION pthread_equal() compares the thread IDs t1 and t2. Thread IDs are opaque data types. They should be compared only with this function.
pthread_exit(3T) pthread_exit(3T) (Pthread Library) NAME pthread_exit() - cause the calling thread to terminate SYNOPSIS #include void pthread_exit( void *value_ptr ); PARAMETERS value_ptr The calling thread’s exit status. DESCRIPTION pthread_exit() terminates the calling thread. The calling thread returns an exit status in value_ptr. This value is returned to a joining thread calling pthread_join() on the terminating thread.
pthread_get_nice_np(3T) pthread_get_nice_np(3T) (Pthread Library) NAME pthread_get_nice_np(), pthread_set_nice_np() - get or set the nice value of a thread SYNOPSIS #include int pthread_get_nice_np( pthread_t thread, int *nice_val ); int pthread_set_nice_np( pthread_t thread, int nice_val ); PARAMETERS thread nice_val The thread whose nice value is to be set/retrieved.
pthread_get_nice_np(3T) pthread_get_nice_np(3T) (Pthread Library) [ESRCH] No thread could be found corresponding to thread. AUTHOR pthread_get_nice_np() and pthread_set_nice_np() were developed by HP. SEE ALSO fork(2), nice(2), setpriority(2), pthread_attr_getschedpolicy(3T), pthread_setschedparam(3T).
pthread_getconcurrency(3T) pthread_getconcurrency(3T) (Pthread Library) NAME pthread_getconcurrency(), pthread_setconcurrency() - get or set the concurrency level of unbound threads SYNOPSIS #include int pthread_setconcurrency( int new_level ); int pthread_getconcurrency(void); PARAMETERS new_level New concurrency level for the unbound threads in the calling process. DESCRIPTION The unbound threads in a process may or may not be required to be simultaneously active.
pthread_getconcurrency(3T) pthread_getconcurrency(3T) (Pthread Library) SEE ALSO pthread_num_processors_np(3T), pthread_processor_bind_np(3T), pthread_processor_id_np(3T). STANDARDS CONFORMANCE pthread_getconcurrency(): X/Open. pthread_setconcurrency(): X/Open.
pthread_getschedparam(3T) pthread_getschedparam(3T) (Pthread Library) NAME pthread_getschedparam(), pthread_setschedparam() - get or set the scheduling policy and associated parameters SYNOPSIS #include
pthread_getschedparam(3T) pthread_getschedparam(3T) (Pthread Library) [EINVAL] policy or one of the scheduling parameters in param is invalid. [ENOTSUP] Either the policy or scheduling parameters contain an unsupported value. [EPERM] The caller does not have permission to set either the scheduling policy specified in policy or the scheduling parameters specified in param for thread. [ESRCH] No thread could be found corresponding to thread.
pthread_getspecific(3T) pthread_getspecific(3T) (Pthread Library) NAME pthread_getspecific(), pthread_setspecific() - get or set the thread-specific data associated with a key SYNOPSIS #include void *pthread_getspecific( pthread_key_t key ); int pthread_setspecific( pthread_key_t key, const void *value ); PARAMETERS key value Thread-specific data key whose value for the calling thread is to be set or retrieved. Value to be assigned to the thread-specific data key for the calling thread.
pthread_gettimeslice_np(3T) pthread_gettimeslice_np(3T) (Pthread Library) NAME pthread_gettimeslice_np(), pthread_settimeslice_np() - set or get the scheduling timeslice value for PTHREAD_SCOPE_PROCESS threads with SCHED_TIMESHARE scheduling policy SYNOPSIS #include int pthread_gettimeslice_np( int *tslice ); int pthread_settimeslice_np( int tslice ); PARAMETERS tslice This parameter specifies the timeslice value in milliseconds to be set.
pthread_join(3T) pthread_join(3T) (Pthread Library) NAME pthread_join() - wait for the termination of a specified thread SYNOPSIS #include int pthread_join( pthread_t thread, void **value_ptr ); PARAMETERS thread Thread whose termination is awaited by the caller. value_ptr Pointer to the location where the exit status of thread is returned. DESCRIPTION The pthread_join() function waits for the termination of the target thread.
pthread_key_create(3T) pthread_key_create(3T) (Pthread Library) NAME pthread_key_create(), pthread_key_delete() - create or delete a thread-specific data key SYNOPSIS #include int pthread_key_create( pthread_key_t *key, void (*destructor)(void *) ); int pthread_key_delete( pthread_key_t key ); PARAMETERS key This is either a pointer to the location where the new key value will to be returned (create function) or the thread-specific data key to be deleted (delete function).
pthread_key_create(3T) pthread_key_create(3T) (Pthread Library) The pthread_key_delete() function can be called from a destructor function. RETURN VALUE If successful, pthread_key_create() and pthread_key_delete() return zero. Otherwise, an error number is returned to indicate the error (the errno variable is not set). ERRORS If any of the following occur, the pthread_key_create() function returns the corresponding error number: [EINVAL] The value specified by key is invalid.
pthread_kill(3T) pthread_kill(3T) (Pthread Library) NAME pthread_kill() - send a signal to a thread SYNOPSIS #include int pthread_kill( pthread_t thread, int sig ); PARAMETERS thread sig Thread to which the signal is to be delivered. Signal to be delivered to thread. DESCRIPTION The pthread_kill() function is used to request that a signal be delivered to thread. The signal is asynchronously directed to thread in the calling process.
pthread_launch_policy_np(3T) pthread_launch_policy_np(3T) (Pthread Library) NAME pthread_launch_policy_np() - setting thread launch policies SYNOPSIS #include int pthread_launch_policy_np( int request, int *answer, pthread_t tid ); PARAMETERS request This parameter determines the precise action to be taken by these functions. answer This parameter is an output parameter in which values are returned. The meaning of answer depends on request parameter.
pthread_launch_policy_np(3T) pthread_launch_policy_np(3T) (Pthread Library) PTHREAD_POLICY_RR_NP This request establishes a round robin launch policy for the specified thread. The successive child threads of the specified thread will be launched on different locality domains in a round robin manner until all available locality domains have been used by threads in the launch tree. At that point, the selection of locality domains begins again from the original locality domain.
pthread_launch_policy_np(3T) pthread_launch_policy_np(3T) (Pthread Library) AUTHOR pthread_launch_policy_np() was developed by HP. SEE ALSO mpctl(2), sleep(3C), rtsched(2). STANDARDS CONFORMANCE pthread_launch_policy_np(): None.
pthread_mutex_getprioceiling(3T) pthread_mutex_getprioceiling(3T) (Pthread Library) NAME pthread_mutex_getprioceiling(), pthread_mutex_setprioceiling() - get or set the prioceiling of a mutex. SYNOPSIS #include
pthread_mutex_getprioceiling(3T) pthread_mutex_getprioceiling(3T) (Pthread Library) AUTHOR pthread_mutex_getprioceiling() and pthread_mutex_setprioceiling() were derived from the IEEE POSIX P1003.1c standard. SEE ALSO pthread_create(3T), pthread_mutex_init(3T), pthread_mutexattr_setprioceiling(3T), pthread_mutexattr_getprioceiling(3T), pthread_mutex_lock(3T), pthread_mutex_trylock(3T), pthread_mutex_unlock(3T). STANDARDS CONFORMANCE pthread_mutex_getprioceiling(): POSIX 1003.1c.
pthread_mutex_init(3T) pthread_mutex_init(3T) (Pthread Library) NAME pthread_mutex_init(), pthread_mutex_destroy() - initialize or destroy a mutex SYNOPSIS #include int pthread_mutex_init( pthread_mutex_t *__restrict mutex, const pthread_mutexattr_t *__restrict attr ); pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; int pthread_mutex_destroy( pthread_mutex_t *mutex ); PARAMETERS mutex attr Pointer to the mutex to be initialized or destroyed.
pthread_mutex_init(3T) pthread_mutex_init(3T) (Pthread Library) [EPERM] The caller does not have the necessary permission to perform the mutex initialization. If any of the following occur, the pthread_mutex_destroy() function returns the corresponding error number: [EBUSY] mutex is currently locked or in use by another thread. [EINVAL] mutex is not a valid mutex. WARNINGS The space for the mutex must be allocated before calling pthread_mutex_init().
pthread_mutex_lock(3T) pthread_mutex_lock(3T) (Pthread Library) NAME pthread_mutex_lock(), pthread_mutex_trylock() - lock or attempt to lock a mutex SYNOPSIS #include int pthread_mutex_lock( pthread_mutex_t *mutex ); int pthread_mutex_trylock( pthread_mutex_t *mutex ); PARAMETERS mutex Pointer to the mutex to be locked. DESCRIPTION The mutex object mutex is locked by calling the pthread_mutex_lock() function.
pthread_mutex_lock(3T) pthread_mutex_lock(3T) (Pthread Library) If any of the following occur, the pthread_mutex_lock() and pthread_mutex_trylock() functions return the corresponding error number: [EAGAIN] mutex could not be acquired because the maximum number of recursive locks for mutex has been exceeded. This error is not detected on HP-UX. [EINVAL] mutex is not an initialized mutex. [EFAULT] mutex parameter points to an illegal address.
pthread_mutex_unlock(3T) pthread_mutex_unlock(3T) (Pthread Library) NAME pthread_mutex_unlock() - unlock a mutex. SYNOPSIS #include int pthread_mutex_unlock( pthread_mutex_t *mutex ); PARAMETERS mutex Pointer to the mutex to be unlocked. DESCRIPTION The function pthread_mutex_unlock() is called by the owner of the mutex referenced by mutex to unlock the mutex. The manner in that the mutex is released is dependent upon the mutex’s type attribute.
pthread_mutexattr_getprotocol(3T) pthread_mutexattr_getprotocol(3T) (Pthread Library) NAME pthread_mutexattr_getprotocol(), pthread_mutexattr_setprotocol(), pthread_mutexattr_getprioceiling(), pthread_mutexattr_setprioceiling() - get and set the protocol and prioceiling attributes SYNOPSIS #include
pthread_mutexattr_getprotocol(3T) pthread_mutexattr_getprotocol(3T) (Pthread Library) POSIX.1c does not define a default value for the protocol attribute. On HP-UX, the default value is PTHREAD_PRIO_NONE. pthread_mutexattr_setprotocol() is used to set the protocol attribute in the initialized attributes object attr. The new value of the protocol attribute of attr is set to the value specified in the protocol parameter.
pthread_mutexattr_getpshared(3T) pthread_mutexattr_getpshared(3T) (Pthread Library) NAME pthread_mutexattr_getpshared(), pthread_mutexattr_setpshared(), pthread_mutexattr_gettype(), pthread_mutexattr_settype() - get and set the process-shared attribute and type attribute SYNOPSIS #include
pthread_mutexattr_getpshared(3T) pthread_mutexattr_getpshared(3T) (Pthread Library) error. This type of mutex is useful for debugging. PTHREAD_MUTEX_RECURSIVE Deadlock cannot occur with this type of mutex. An owner field is maintained. A thread attempting to relock this mutex shall successfully lock the mutex. Multiple locks of this mutex shall require the same number of unlocks to release the mutex before another thread can lock the mutex.
pthread_mutexattr_getpshared(3T) pthread_mutexattr_getpshared(3T) (Pthread Library) SEE ALSO pthread_create(3T), pthread_mutexattr_init(3T), pthread_mutex_init(3T). STANDARDS CONFORMANCE pthread_mutexattr_setpshared(): POSIX 1003.1c. pthread_mutexattr_getpshared(): POSIX 1003.1c. pthread_mutexattr_settype(): X/Open. pthread_mutexattr_gettype(): X/Open.
pthread_mutexattr_getspin_np(3T) pthread_mutexattr_getspin_np(3T) (Pthread Library) NAME pthread_mutexattr_getspin_np(), pthread_mutexattr_setspin_np(), pthread_mutex_getyieldfreq_np(), pthread_mutex_setyieldfreq_np(), pthread_mutexattr_disable_handoff_np(), pthread_mutex_disable_handoff_np() - get and set mutex spin and yield frequency attributes; disable mutex-specific or process-wide mutex handoff mode SYNOPSIS #include
pthread_mutexattr_getspin_np(3T) pthread_mutexattr_getspin_np(3T) (Pthread Library) positive integer The pthread_mutex_lock() function will busy-wait on the mutex lock for the specified number of iterations before blocking the thread, unless the lock is acquired sooner. Larger spin values would be appropriate for mutexes associated with longer critical sections. PTHREAD_MUTEX_SPINONLY_NP Inhibits blocking on the mutex lock altogether.
pthread_mutexattr_getspin_np(3T) pthread_mutexattr_getspin_np(3T) (Pthread Library) The programmer must analyze performance carefully to obtain an understanding of mutex contention within the application. Then, experiment with different attribute values, evaluating how mutex contention is affected, response time, and CPU consumption.
pthread_mutexattr_init(3T) pthread_mutexattr_init(3T) (Pthread Library) NAME pthread_mutexattr_init(), pthread_mutexattr_destroy() - initialize or destroy a mutex attributes object SYNOPSIS #include int pthread_mutexattr_init( pthread_mutexattr_t *attr ); int pthread_mutexattr_destroy( pthread_mutexattr_t *attr ); PARAMETERS attr Pointer to the mutex attributes object to be initialized or destroyed.
pthread_mutexattr_init(3T) pthread_mutexattr_init(3T) (Pthread Library) STANDARDS CONFORMANCE pthread_mutexattr_init(): POSIX 1003.1c. pthread_mutexattr_destroy(): POSIX 1003.1c.
pthread_once(3T) pthread_once(3T) (Pthread Library) NAME pthread_once() - call an initialization routine only once SYNOPSIS #include pthread_once_t once_control = PTHREAD_ONCE_INIT; int pthread_once( pthread_once_t *once_control , void (*init_routine )(void) ); Parameters once_control init_routine Pointer to the once-control object associated with the one-time initialization function init_routine (). The one-time initialization routine.
pthread_once(3T) pthread_once(3T) (Pthread Library) For a multithreaded process, a simple initialization flag is not sufficient; the flag must be protected against modification by multiple threads. Consequently, this flag has to be protected by a mutex that has to be initialized only once, and so on.
pthread_processor_bind_np(3T) pthread_processor_bind_np(3T) (Pthread Library) NAME pthread_processor_bind_np(), pthread_num_processors_np(), pthread_processor_id_np(), pthread_num_ldoms_np(), pthread_num_ldomprocs_np(), pthread_spu_to_ldom_np(), pthread_ldom_bind_np(), pthread_ldom_id_np(), pthread_pset_bind_np() - determine how many processors are available, bind threads to processors, and determine processor IDs; determine how many locality domains are available, bind threads to locality domains, and de
pthread_processor_bind_np(3T) pthread_processor_bind_np(3T) (Pthread Library) pset This parameter gives the value of the processor set for certain requests. REMARKS Much of the functionality of this capability is highly dependent on the underlying hardware. An application that uses these functions should not be expected to be portable across architectures or implementations. Some hardware platforms support online addition and deletion of processors.
pthread_processor_bind_np(3T) pthread_processor_bind_np(3T) (Pthread Library) The pthread_ldom_id_np() function obtains the locality domain ID of a specific locality domain on the system. The locality domain ID is returned in answer. The request parameter determines the precise action to be taken and is one of the following: PTHREAD_GETFIRSTLDOM_NP This request stores in the answer parameter the ID of the first locality domain in the processor set of the calling thread. The ldom argument is ignored.
pthread_processor_bind_np(3T) pthread_processor_bind_np(3T) (Pthread Library) processor binding will over rule the scheduling policy. For example, when a processor is ready to choose another thread to execute, if the highest priority SCHED_FIFO thread on the run queue is bound to a different processor, that thread will not be chosen by the available processor. That thread will wait until the wanted processor becomes available.
pthread_processor_bind_np(3T) pthread_processor_bind_np(3T) (Pthread Library) [EINVAL] The spu or ldom parameter contains an invalid ID. [EINVAL] The request parameter is PTHREAD_GETNEXTSPU_NP and spu identifies the last processor. [EINVAL] The request parameter is PTHREAD_GETNEXTLDOM_NP and ldom identifies the last locality domain. [EINVAL] The value specified by answer is illegal. [ESRCH] No thread could be found in the current process that matches the thread ID specified in tid.
pthread_resume_np(3T) pthread_resume_np(3T) (Pthread Library) NAME pthread_resume_np(), pthread_continue(), pthread_suspend() - resume execution of a thread, continue execution of a thread, and suspend execution of a thread SYNOPSIS #include int pthread_continue( pthread_t thread ); int pthread_resume_np( pthread_t thread, int flags ); int pthread_suspend( pthread_t thread ); PARAMETERS thread flags whose execution is to be suspended or resumed. Flags to be used by pthread_resume_np().
pthread_resume_np(3T) pthread_resume_np(3T) (Pthread Library) In either of the above conditions, it is strongly recommended to set the environment variable PTHREAD_SUSPEND_SYNC to 1 if the application uses pthread_suspend() which is not POSIX compliant. Failing to do so, can lead to undefined behavior. RETURN VALUE If successful, pthread_continue(), pthread_suspend() and pthread_resume_np() return zero. Otherwise, an error number shall be returned to indicate the error (the errno variable is not set).
pthread_rwlock_init(3T) pthread_rwlock_init(3T) (Pthread Library) NAME pthread_rwlock_init(), pthread_rwlock_destroy() - initialize or destroy a read-write lock SYNOPSIS #include int pthread_rwlock_init( pthread_rwlock_t *__restrict rwlock, const pthread_rwlockattr_t *__restrict attr ); pthread_rwlock_t rwlock = PTHREAD_RWLOCK_INITIALIZER; int pthread_rwlock_destroy( pthread_rwlock_t *rwlock ); PARAMETERS rwlock attr Pointer to the read-write lock to be initialized or destroyed.
pthread_rwlock_init(3T) pthread_rwlock_init(3T) (Pthread Library) If any of the following occur, the pthread_rwlock_destroy() function returns the corresponding error number: [EBUSY] rwlock is currently locked or being used by other threads. [EINVAL] The value specified by rwlock is invalid. WARNINGS The space for the read-write lock must to be allocated before calling pthread_rwlock_init().
pthread_rwlock_rdlock(3T) pthread_rwlock_rdlock(3T) (Pthread Library) NAME pthread_rwlock_rdlock(), pthread_rwlock_tryrdlock() - lock or attempt to lock a read-write lock for reading SYNOPSIS #include int pthread_rwlock_rdlock( pthread_rwlock_t *rwlock ); int pthread_rwlock_tryrdlock( pthread_rwlock_t *rwlock ); PARAMETERS rwlock Pointer to the read-write lock to be locked for reading.
pthread_rwlock_rdlock(3T) pthread_rwlock_rdlock(3T) (Pthread Library) STANDARDS CONFORMANCE pthread_rwlock_rdlock(): X/Open. pthread_rwlock_tryrdlock(): X/Open.
pthread_rwlock_unlock(3T) pthread_rwlock_unlock(3T) (Pthread Library) NAME pthread_rwlock_unlock() - unlock a read-write lock. SYNOPSIS #include int pthread_rwlock_unlock( pthread_rwlock_t *rwlock ); PARAMETERS rwlock Pointer to the read-write lock to be unlocked. DESCRIPTION The function pthread_rwlock_unlock() is called by the owner to release the read-write lock referenced by rwlock. Results are undefined if the read-write lock rwlock is not held by the calling thread.
pthread_rwlock_wrlock(3T) pthread_rwlock_wrlock(3T) (Pthread Library) NAME pthread_rwlock_wrlock(), pthread_rwlock_trywrlock() - lock or attempt to lock a read-write lock for writing SYNOPSIS #include int pthread_rwlock_wrlock( pthread_rwlock_t *rwlock ); int pthread_rwlock_trywrlock( pthread_rwlock_t *rwlock ); PARAMETERS rwlock Pointer to the read-write lock to be locked for writing.
pthread_rwlockattr_getpshared(3T) pthread_rwlockattr_getpshared(3T) (Pthread Library) NAME pthread_rwlockattr_getpshared(), pthread_rwlockattr_setpshared() - get or set the process-shared attribute SYNOPSIS #include
pthread_rwlockattr_getpshared(3T) pthread_rwlockattr_getpshared(3T) (Pthread Library) WARNINGS If a read-write lock is created with the process-shared attribute defined as PTHREAD_PROCESS_SHARED, the cooperating processes should have access to the memory in which the read-write lock is allocated. AUTHOR pthread_rwlockattr_setpshared() and pthread_rwlockattr_getpshared() were developed by X/Open. SEE ALSO pthread_create(3T), pthread_rwlockattr_init(3T), pthread_rwlock_init(3T).
pthread_rwlockattr_init(3T) pthread_rwlockattr_init(3T) (Pthread Library) NAME pthread_rwlockattr_init(), pthread_rwlockattr_destroy() - initialize or destroy a read-write lock attributes object SYNOPSIS #include int pthread_rwlockattr_init( pthread_rwlockattr_t *attr ); int pthread_rwlockattr_destroy( pthread_rwlockattr_t *attr ); PARAMETERS attr Pointer to the read-write lock attributes object to be initialized or destroyed.
pthread_rwlockattr_init(3T) pthread_rwlockattr_init(3T) (Pthread Library) STANDARDS CONFORMANCE pthread_rwlockattr_init(): X/Open. pthread_rwlockattr_destroy(): X/Open.
pthread_self(3T) pthread_self(3T) (Pthread Library) NAME pthread_self() - obtain the thread ID for the calling thread SYNOPSIS #include pthread_t pthread_self(void); PARAMETERS None. DESCRIPTION pthread_self() returns the thread ID of the calling thread. The thread ID returned is the same ID that is returned in the thread parameter to the creating thread at thread creation time. Thread IDs are guaranteed to be unique only within a process.
pthread_setcancelstate(3T) pthread_setcancelstate(3T) (Pthread Library) NAME pthread_setcancelstate(), pthread_setcanceltype() - set and retrieve current thread’s cancelability state or type. SYNOPSIS #include int pthread_setcancelstate( int state, int *oldstate ); int pthread_setcanceltype( int type, int *oldtype ); PARAMETERS state Value to which the cancelability state of the calling thread is to be set.
pthread_setcancelstate(3T) pthread_setcancelstate(3T) (Pthread Library) [EINVAL] state contains an invalid value. [EINVAL] type contains an invalid value. NOTES Only functions that are async-cancel safe should be called from a thread that is asynchronously cancelable. AUTHOR pthread_setcancelstate() and pthread_setcanceltype() were derived from the IEEE POSIX P1003.1c standard. SEE ALSO pthread_exit(3T), pthread_join(3T), pthread_cond_timedwait(3T).
pthread_setschedprio(3T) pthread_setschedprio(3T) (Pthread Library) NAME pthread_setschedprio() - sets scheduling priority of a thread SYNOPSIS #include int pthread_setschedprio(pthread_t thread, int prio) PARAMETERS thread prio The thread whose scheduling priority is to be set. The new priority for the thread. DESCRIPTION The pthread_setschedprio() function sets the scheduling priority of thread to the value prio.
pthread_sigmask(3T) pthread_sigmask(3T) (Pthread Library) NAME pthread_sigmask() - examine/change signal mask of calling thread SYNOPSIS #include int pthread_sigmask( int how, const sigset_t *__restrict set, sigset_t *__restrict oset ); PARAMETERS how This parameter defines how the signal mask of the calling thread will be changed. set Pointer to the set of signals that will be used to change the currently blocked signal set.
pthread_testcancel(3T) pthread_testcancel(3T) (Pthread Library) NAME pthread_testcancel() - process any pending cancellation requests SYNOPSIS #include void pthread_testcancel(void); PARAMETERS None. DESCRIPTION The pthread_testcancel() function checks for any pending cancellation requests against the calling thread. If a cancellation request is pending and the calling thread has its cancelability state enabled, the cancellation request will be acted upon.
ptsname(3C) ptsname(3C) NAME ptsname() - get the pathname of a slave pty (pseudo-terminal) SYNOPSIS #include char * ptsname (int fildes); Obsolescent Interfaces char * ptsname_r (int fildes, char *slavename, int len); Remarks ptsname() supports STREAMS pty (see ptm(7) and pts(7)), and non-STREAMS pty (see pty(7)) which have different device naming conventions. Notice that the STREAMS pty, being an optional feature, is supported only when it is installed on the system.
ptsname(3C) ptsname(3C) slave = ptsname(fd_master); fd_slave = open(slave, O_RDWR); ioctl(fd_slave, I_PUSH, "ptem"); ioctl(fd_slave, I_PUSH, "ldterm"); AUTHOR ptsname() and ptsname_r() were developed by HP and OSF. SEE ALSO insf(1M), devnm(3), pty(7), grantpt(3C), unlockpt(3C), ptm(7), pts(7), ptem(7), ldterm(7).
putc(3S) putc(3S) NAME putc( ), putchar( ), fputc( ), putw( ) - put character or word on a stream SYNOPSIS #include int putc(int c, FILE *stream); int putchar(int c); int fputc(int c, FILE *stream); int putw(int w, FILE *stream); int putc_unlocked(int c, FILE *stream); int putchar_unlocked(int c); Obsolescent Interfaces int putw_unlocked(int w, FILE *stream); DESCRIPTION putc() Writes the character c onto the output stream at the position where the file pointer, if defined, is pointing.
putc(3S) putc(3S) [EINTR] A signal was caught during the write() system call. [EIO] A physical I/O error has occurred, or the process is in a background process group and is attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking the SIGTTOU signal, and the process group of the process is orphaned. [ENOSPC] There was no free space remaining on the device containing the file.
putenv(3C) putenv(3C) NAME putenv( ) - change or add value to environment SYNOPSIS #include int putenv(const char *string); DESCRIPTION string points to a string of the form name=value. putenv() makes the value of the environment variable name equal to value by altering an existing variable or creating a new one. In either case, the string pointed to by string becomes part of the environment, so altering the string changes the environment.
putp(3X) putp(3X) (ENHANCED CURSES) NAME putp, tputs — output commands to the terminal SYNOPSIS #include int putp(const char *str); int tputs(const char *str, int affcnt, int (*putfunc)(int)); DESCRIPTION These functions output commands contained in the terminfo database to the terminal. The putp() function is equivalent to tputs(str, 1, putchar). The output of putp() always goes to stdout, not to the fildes specified in setupterm() . The tputs() function outputs str to the terminal.
putpwent(3C) putpwent(3C) NAME putpwent( ) - write password file entry SYNOPSIS #include #include int putpwent(const struct passwd *p, FILE *f); DESCRIPTION putpwent() is the inverse of getpwent() (see getpwent(3C)). Given a pointer to a passwd structure as created by getpwent() , getpwuid() , or getpwnam() ; putpwent() writes a line on the stream f, which matches the format of /etc/passwd .
puts(3S) puts(3S) NAME puts( ), fputs( ) - put a string on a stream SYNOPSIS #include int puts(const char *s); int fputs(const char *__restrict s, FILE *__restrict stream); Obsolescent Interfaces int puts_unlocked(const char *s); int fputs_unlocked(const char *s, FILE *stream); DESCRIPTION puts() writes the null-terminated string pointed to by s, followed by a new-line character, to the standard output stream stdout .
puts(3S) puts(3S) STANDARDS CONFORMANCE puts() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C fputs() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.
putspent(3C) putspent(3C) NAME putspent - write shadow password file entry SYNOPSIS #include int putspent (const struct spwd *sp, FILE *f); DESCRIPTION putspent() is the inverse of getspent() . See getspent(3C). Given a pointer to an spwd structure as created by the getspent() or getspnam() functions, putspent() writes a line on the stream f, which matches the format of /etc/shadow . APPLICATION USAGE In a multithreaded application, putspent() is thread-safe. It is not async-cancel-safe.
putwc(3C) putwc(3C) NAME putwc( ), putwchar( ), fputwc( ) - put a wide character on a stream file SYNOPSIS #include
putwc(3C) putwc(3C) written. On failure, they return the constant WEOF , set the error indicator for the stream, and set errno to indicate the error.
putws(3C) putws(3C) NAME putws( ), fputws( ) - put a wide character string on a stream file SYNOPSIS #include int putws(const wchar_t *ws); int fputws(const wchar_t *__restrict ws, FILE *__restrict stream); Obsolescent Interfaces int putws_unlocked(const wchar_t *ws); int fputws_unlocked(const wchar_t *ws, FILE *stream); Remarks: fputws is compliant with the XPG4 Worldwide Portability Interface wide-character I/O functions.
putws(3C) putws(3C) SIGTTOU signal, and the process group of the process is orphaned. [ENOSPC] There was no free space remaining on the device containing the file. [EPIPE] An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal is also sent to the process. [EILSEQ] A wide character in ws does not correspond to a valid character. Additional errno values may be set by the underlying write() function (see write(2)).
qsort(3C) qsort(3C) NAME qsort( ) - quicksort SYNOPSIS #include void qsort( void *base, size_t nel, size_t size, int (*compar)(const void *, const void *) ); DESCRIPTION qsort() is an implementation of the quicksort algorithm. It sorts a table of data in place. base Pointer to the element at the base of the table. nel Number of elements in the table. size Size of each element in the table.
rand(3C) rand(3C) NAME rand( ), rand_r( ), srand( ) - simple random-number generator SYNOPSIS #include int rand(void); int rand_r(unsigned int *seed); void srand(unsigned int seed); DESCRIPTION rand() uses a multiplicative, congruential, random-number generator with period 232 that returns successive pseudo-random numbers in the range from 0 to 215−1. srand() can be called at any time to reset the random-number generator to a random starting point.
random(3M) random(3M) NAME random( ), srandom( ), initstate( ), setstate( ) - generate a pseudorandom number SYNOPSIS #include long random(void); void srandom(unsigned seed); char *initstate(unsigned seed, char *state, size_t size); char *setstate(char *state); DESCRIPTION The random() and srandom() functions are random-number generators that have virtually the same calling sequence and initialization properties as the rand() and srand() functions, but produce sequences that are more random.
random(3M) random(3M) SEE ALSO drand48(3C), rand(3C), random(7). STANDARDS CONFORMANCE random() COSE API, XPG 4.2 srandom() COSE API, XPG 4.2 initstate() COSE API, XPG 4.2 setstate() COSE API, XPG 4.
rcmd(3N) rcmd(3N) NAME rcmd(), rcmd_af(), rresvport(), rresvport_af(), ruserok() - return a stream to a remote command SYNOPSIS int rcmd( char **ahost, int remport, const char *locuser, const char *remuser, const char *cmd, int *fd2p); int rcmd_af( char **ahost, int remport, const char *locuser, const char *remuser, const char *cmd, int *fd2p, int af); int rresvport(int *port); int rresvport_af(int *port,int af); int ruserok( const char *rhost, int superuser, const char *ruser, const char *luser); DESCRI
rcmd(3N) rcmd(3N) rcmd_af() rcmd_af() function behaves the same as rcmd() , but it can also create an AF_INET6 TCP socket. The type of socket to be created is specified through the af argument. rcmd_af() fails with [EAFNOSUPPORT] if the address family af is not supported. rresvport() The rresvport() function creates a socket and binds it to a reserved port. This socket is suitable for use by rcmd() and several other routines.
rcmd(3N) rcmd(3N) Error writing to the socket connection set up for error message transmission. system call : ... Error executing the system call. Appended to this error is a message specifying the reason for the failure. socket: Protocol failure in circuit setup Socket connection not established on a reserved port or socket address not of the Internet family type. read: hostname : ... Error in reading information from the standard socket connection.
rcmd(3N) rcmd(3N) struct passwd *getpwuid(); char *host[] = { "hpxzgy" }; char *cmd = "date"; char *ruser = "chm"; main(argc,argv) int argc; char **argv; { struct servent *sp; struct passwd *pwd; FILE *fp; char ch; int rem; sp = getservbyname("shell","tcp"); pwd = getpwuid(getuid()); rem = rcmd(host, sp->s_port, pwd->pw_name, ruser, cmd, 0); if (rem < 0) exit(1); /* rcmd outputs its own error messages */ fp = fdopen(rem, "r"); while ((ch = getc(fp)) != EOF) putchar(ch); } WARNINGS There is no way to speci
realpath(3X) realpath(3X) NAME realpath - resolve pathname SYNOPSIS #include char *realpath(const char *file_name__restrict fP , char *resolved_name__restrict ); DESCRIPTION The realpath() function derives, from the pathname pointed to by file_name, an absolute pathname that names the same file, whose resolution does not involve ., .. , or symbolic links. The generated pathname is stored, up to a maximum of {PATH_MAX} bytes, in the buffer pointed to by resolved_name.
redrawwin(3X) redrawwin(3X) (ENHANCED CURSES) NAME redrawwin, wredrawln — line update status functions SYNOPSIS #include int redrawwin(WINDOW *win); int wredrawln(WINDOW *win, int beg_line, int num_lines); DESCRIPTION The redrawwin() and wredrawln() functions inform the implementation that some or all of the information physically displayed for the specified window may have been corrupted.
regcomp(3C) regcomp(3C) NAME regcomp( ), regerror( ), regexec( ), regfree( ) - regular expression matching routines SYNOPSIS #include
regcomp(3C) regcomp(3C) Within bracket expressions: Collation ranges, character classes, and equivalence classes are effectively expanded into equivalent lists of collation elements and characters. Opposite-case counterpoints are then generated for each collation element or character to form the complete matching list or non-matching list for the bracket expression.
regcomp(3C) regcomp(3C) If the preg argument to regexec() or regfree() is not a compiled regular expression returned by regcomp() , the result is undefined. A preg can no longer be treated as a compiled regular expression after it is given to regfree() . regerror() provides a mapping from error codes returned by regcomp() and regexec() to printable strings.
regcomp(3C) REG_ESPACE REG_ESUBREG REG_NOMATCH regcomp(3C) There is insufficient memory space. The number in \digit is invalid or in error. The regexec() function failed to match. EXAMPLES /* match string against the extended regular expression in pattern, treating errors as no match. Return 1 for match, 0 for no match. Print an error message if an error occurs.
regexp(3X) regexp(3X) NAME compile( ), step( ), advance( ) - regular expression compile and match routines SYNOPSIS #define INIT declarations #define GETC() getc statements #define PEEKC() peekc statements #define UNGETC(c) ungetc statements #define RETURN(pointer) return statements #define ERROR(val) error statements #include
regexp(3X) regexp(3X) 43 44 45 46 49 50 Too many \( . More than 2 numbers given in \{ \}. } expected after \. First number exceeds second in \{ \}. [ ] imbalance. Regular expression overflow. The syntax of the compile() routine is as follows: compile( instring, expbuf, endbuf, eof) The first parameter instring is never used explicitly by the compile() routine, but is useful for programs that pass down different pointers to input characters. It is sometimes used in the INIT declaration (see below).
regexp(3X) regexp(3X) The additional external variables sed and nbra are used for special purposes. EXTERNAL INFLUENCES Locale The LC_COLLATE category determines the collating sequence used in compiling and executing regular expressions. The LC_CTYPE category determines the interpretation of text as single and/or multi-byte characters, and the characters matched by character class expressions in regular expressions. International Code Set Support Single- and multi-byte character code sets are supported.
reltimer(3C) reltimer(3C) NAME reltimer - relatively arm a per-process timer SYNOPSIS #include int reltimer( timer_t timerid, struct itimerspec *value, struct itimerspec *ovalue ); DESCRIPTION The reltimer() function sets the it_value of the specified timer to an offset from the current clock setting. If reltimer() specifies a value argument with the it_value member equal to zero, the timer is disabled. reltimer() updates the it_interval value of the timer to the value specified.
remainder(3M) remainder(3M) NAME remainder( ), remainderf( ), remainderl( ), remainderw( ), remainderq( ) - remainder functions SYNOPSIS #include double remainder(double x, double y); HP Integrity Server Only float remainderf(float x, float y); long double remainderl(long double x, long double y); extended remainderw(extended x, extended y); quad remainderq(quad x, quad y); DESCRIPTION The remainder() function returns the floating-point remainder r = x − ny when y is a nonzero number.
remainder(3M) remainder(3M) remainderf() , remainderl() : ISO/IEC C99 (including Annex F, ‘‘IEC 60559 floating-point arithmetic’’) r 284 Hewlett-Packard Company −2− HP-UX 11i Version 3: February 2007
remove(3C) remove(3C) NAME remove( ) - remove a file SYNOPSIS #include int remove(const char *path); DESCRIPTION remove() removes the file named by path. If path does not name a directory, remove( path ) is equivalent to unlink( path ). If path names a directory, remove( path ) is equivalent to rmdir( path ). SEE ALSO rmdir(2), unlink(2), thread_safety(5). STANDARDS CONFORMANCE remove() : AES, SVID3, XPG3, XPG4, FIPS 151-2, POSIX.
remquo(3M) remquo(3M) NAME remquo( ), remquof( ), remquol( ), remquow( ), remquoq( ) - remainder function with quotients SYNOPSIS #include double remquo(double x, double y, int *quo); HP Integrity Server Only float remquof(float x, float y, int *quo); long double remquol(long double x, long double y, int *quo); extended remquow(extended x, extended y, int *quo); quad remquoq(quad x, quad y, int *quo); DESCRIPTION The remquo() function computes the same remainder as the remainder() function.
resetty(3X) resetty(3X) (CURSES) NAME resetty, savetty — save/restore terminal mode SYNOPSIS #include int resetty(void); int savetty(void); DESCRIPTION The resetty() function restores the program mode as of the most recent call to savetty() . The savetty() function saves the state that would be put in place by a call to reset_prog_mode(). RETURN VALUE Upon successful completion, these functions return OK. Otherwise, they return ERR. ERRORS No errors are defined.
resolver(3N) resolver(3N) NAME resolver: dn_comp(), dn_expand(), get_resfield(), herror(), res_search(), res_send(), set_resfield() - resolver routines res_init(), res_mkquery(), res_query(), SYNOPSIS #include #include #include #include
resolver(3N) resolver(3N) ); int get_resfield( int field, void *value, sizeof value ); OBSOLESCENT INTERFACE void herror(const char *s); DESCRIPTION These routines are used for making, sending, and interpreting query and reply messages with Internet domain name servers. Global configuration and state information used by the resolver routines are kept in the structure _res and are defined in . Most of the fields have reasonable defaults and can be ignored.
resolver(3N) resolver(3N) Alternatively in resolv.conf the following name-value pairs can be added : retrans value in milliseconds retry number of retries While the Environmental Variables and entries in the resolv.conf file are interpreted when the res_init() API is called, the API set_resfield() has to be explicitly called from within the code. Setting the retrans and retry values through a lower precedence option will be ignored if these values have been configured through higher precedence option.
resolver(3N) resolver(3N) dn_comp() Compresses the domain name exp_dn and stores it in comp_dn. The size of the compressed name is returned or −1 if there were errors. length is the size of the array pointed to by comp_dn. The compression uses an array of pointers dnptrs to previously compressed names in the current message. The first pointer points to to the beginning of the message and the list ends with NULL. The limit to the array is specified by lastdnptr.
rexec(3N) rexec(3N) NAME rexec(), rexec_af() - return stream to a remote command SYNOPSIS int rexec(char **ahost, int inport, const char *user, const char *passwd, const char *cmd, int *fd2p); int rexec_af(char **ahost, int inport, const char *user, const char *passwd, const char *cmd, int *fd2p, int af); DESCRIPTION The rexec() routine performs the necessary tasks to arrange for the remote execution of cmd on the remote host *ahost as user, who is authenticated with passwd.
rexec(3N) rexec(3N) Error in connecting to the socket obtained for rexec() . The message specifies the cause of the failure. Secondary socket: message Error in creating a secondary socket for error transmission to be used by rexec() . read: hostname : message Error in reading information transmitted over the socket. The message specifies the cause of the failure. Connection timeout The remote host did not connect within 30 seconds to the secondary socket set up as an error connection.
rexec(3N) rexec(3N) int argc; { char ch; struct servent *servent; FILE *fp; int sd; servent = getservbyname("exec", "tcp"); sd = rexec(host, servent->s_port, user, passwd, cmd, 0); fp = fdopen(sd, "r"); while ((ch = getc(fp)) != EOF) putchar(ch); } WARNINGS There is no way to specify options to the socket() call that rexec() makes. A program using rexec() should not be put in the background when rexec() is expected to prompt for a password or user name.
rint(3M) rint(3M) NAME rint( ), rintf( ), rintl( ), rintw( ), rintq( ), nearbyint( ), nearbyintf( ), nearbyintl( ), nearbyintw( ), nearbyintq( ) round to nearest integer functions SYNOPSIS #include
rint(3M) rint(3M) ERRORS No errors are defined. SEE ALSO ceil(3M), floor(3M), fabs(3M), fmod(3M), fegetround(3M), fesetround(3M), lrint(3M), llrint(3M), lround(3M), llround(3M), round(3M), trunc(3M), math(5), fenv(5). STANDARDS CONFORMANCE rint() : XPG4.
ripoffline(3X) ripoffline(3X) (ENHANCED CURSES) NAME ripoffline — reserve a line for a dedicated purpose SYNOPSIS #include int ripoffline(int line, int (*init)(WINDOW *win, int columns)); DESCRIPTION The ripoffline() function reserves a screen line for use by the application. Any call to ripoffline() must precede the call to initscr() or newterm() . If line is positive, one line is removed from the beginning of stdscr; if line is negative, one line is removed from the end.
rmtimer(3C) rmtimer(3C) NAME rmtimer - free a per-process timer SYNOPSIS #include int rmtimer(timer_t timerid); DESCRIPTION The rmtimer() function is used to free a previously allocated timer (returned by mktimer() . Any pending timer event to be generated by this timer has been canceled when the call returns. RETURN VALUE Upon successful completion, rmtimer() returns zero; otherwise, it returns −1 and sets errno to indicate the error.
rnusers(3N) rnusers(3N) NAME rnusers(), rusers() - return information about users on remote machines SYNOPSIS #include #include int rnusers(char *host); int rusers(char *host, struct utmpidlearr *up); DESCRIPTION rnusers() returns the number of users logged in on host or −1 if it cannot determine that number. The host string is either the official name of the host or an alias for it. See hosts(4) for more information regarding host names.
rnusers(3N) rnusers(3N) Procs: RUSERSPROC_NUM No arguments, returns number of users as an unsigned long . RUSERSPROC_NAMES No arguments, returns utmparr or utmpidlearr , depending on version number. RUSERSPROC_ALLNAMES No arguments, returns utmparr or utmpidlearr , depending on version number. Returns listing even for utmp entries satisfying nonuser() in utmp.h . Versions: RUSERSVERS_ORIG RUSERSVERS_IDLE WARNINGS User applications that call this routine must be linked with /usr/lib/librpcsvc.a.
round(3M) round(3M) NAME round( ), roundf( ), roundl( ), roundw( ), roundq( ) - round functions SYNOPSIS #include double round(double x); HP Integrity Server Only float roundf(float x); long double roundl(long double x); extended roundw(extended x); quad roundq(quad x); DESCRIPTION The round() function rounds its argument to the nearest integral value in floating-point format.
rpc(3N) rpc(3N) NAME rpc - library routines for remote procedure calls SYNOPSIS cc [ flag ]... file... -lnsl [ library ]... #include #include DESCRIPTION These routines allow C language programs to make procedure calls on other machines across a network. First, the client sends a request to the server. On receipt of the request, the server calls a dispatch routine to perform the requested service, and then sends back a reply. All RPC routines require the header .
rpc(3N) rpc(3N) If nettype is NULL, it defaults to netpath . The transports are tried in left to right order in the NETPATH variable or in top to down order in the /etc/netconfig file.
rpc(3N) rpc(3N) * Created by individual implementations. * Client is responsible for initializing */ typedef struct { AUTH *cl_auth; struct clnt_ops { enum clnt_stat (*cl_call)(); void (*cl_abort)(); void (*cl_geterr)(); bool_t (*cl_freeres)(); void (*cl_destroy)(); bool_t (*cl_control)(); int (*cl_settimers)(); } *cl_ops; caddr_t cl_private; char *cl_netid; char *cl_tp; } CLIENT; auth.
rpc(3N) The svc_req Structure struct svc_req { rpcprog_t rpcvers_t rpcproc_t struct opaque_auth caddr_t SVCXPRT }; rpc(3N) rq_prog; rq_vers; rq_proc; rq_cred; rq_clntcred; *rq_xprt; /* /* /* /* /* /* service program number */ service protocol version */ the desired procedure */ raw creds from the wire */ read only cooked cred */ associated transport */ The XDR Structure /* * XDR operations. * XDR_ENCODE causes the type to be encoded into the stream.
rpc(3N) caddr_t int } XDR; rpc(3N) x_base; x_handy; /* private used for position info */ /* extra private word */ Index to Routines The following table lists RPC routines and the manual reference pages on which they are described: r 306 RPC Routine Manual Reference Page auth_destroy authdes_create authdes_getucred authdes_seccreate authnone_create authsys_create authsys_create_default authunix_create authunix_create_default callrpc clnt_broadcast clnt_call clnt_control clnt_create clnt_create_time
rpc(3N) rpc_call rpc_reg svc_create svc_destroy svc_dg_create svc_dg_enablecache svc_fd_create svc_fds svc_freeargs svc_getargs svc_getcaller svc_getreq svc_getreqset svc_getrpccaller svc_raw_create svc_reg svc_register svc_run svc_sendreply svc_tli_create svc_tp_create svc_unreg svc_unregister svc_vc_create svcerr_auth svcerr_decode svcerr_noproc svcerr_noprog svcerr_progvers svcerr_systemerr svcerr_weakauth svcfd_create svcraw_create svctcp_create svcudp_bufcreate svcudp_create user2netname xdr_accepted_
rpc_clnt_auth(3N) rpc_clnt_auth(3N) NAME rpc_clnt_auth: auth_destroy(), authnone_create(), authsys_create(), authsys_create_default() - library routines for client side remote procedure call authentication SYNOPSIS #include
rpc_clnt_auth(3N) rpc_clnt_auth(3N) 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 rpc(3N), rpc_clnt_calls(3N), rpc_clnt_create(3N), secure_rpc(3N).
rpc_clnt_calls(3N) rpc_clnt_calls(3N) NAME rpc_clnt_calls: clnt_call(), clnt_freeres(), clnt_geterr(), clnt_perrno(), clnt_perror(), clnt_sperrno(), clnt_sperror(), rpc_broadcast(), rpc_broadcast_exp(), rpc_call() - library routines for client side calls SYNOPSIS #include
rpc_clnt_calls(3N) rpc_clnt_calls(3N) If the remote call succeeds, the status returned is RPC_SUCCESS . Otherwise, an appropriate status is returned. bool_t clnt_freeres() A function macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns 1 if the results were successfully freed; otherwise it returns 0.
rpc_clnt_calls(3N) rpc_clnt_calls(3N) enum clnt_stat rpc_call() Calls the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. in is the address of the procedure’s argument(s), and out is the address of where to place the result(s). nettype can be any of the values listed on rpc(3N).
rpc_clnt_create(3N) rpc_clnt_create(3N) NAME rpc_clnt_create: clnt_control(), clnt_create(), clnt_create_timed(), clnt_create_vers(), clnt_create_vers_timed(), clnt_destroy(), clnt_dg_create(), clnt_pcreateerror(), clnt_raw_create(), clnt_spcreateerror(), clnt_tli_create(), clnt_tp_create(), clnt_tp_create_timed(), clnt_vc_create(), rpc_createerr - library routines for dealing with creation and manipulation of CLIENT handles SYNOPSIS #include
rpc_clnt_create(3N) rpc_clnt_create(3N) CLIENT *clnt_tp_create_timed(const char *host , const rpcprog_t prognum , const rpcvers_t versnum , const struct netconfig *netconf , const struct timeval *timeout ); CLIENT *clnt_vc_create(const int fildes , const struct netbuf *svcaddr , const rpcprog_t prognum , const rpcvers_t versnum , const u_int sendsz , const u_int recvsz ); struct rpc_createerr rpc_createerr; DESCRIPTION RPC library routines allow C language programs to make procedure calls on other machine
rpc_clnt_create(3N) rpc_clnt_create(3N) CLSET_XID unsigned long * CLGET_PROG CLSET_PROG rpcprog_t rpcprog_t set the XID of the next remote procedure call get program number set program number The following operations are valid for connection-oriented transports only: CLSET_IO_MODE rpciomode_t * set the IO mode used to send one-way requests. The argument for this operation can be either: RPC_CL_BLOCKING All sending operations block until the underlying transport protocol has accepted requests.
rpc_clnt_create(3N) rpc_clnt_create(3N) is not used in this mode. The following operations are valid for connectionless transports only: CLSET_RETRY_TIMEOUT struct timeval * set the retry timeout CLGET_RETRY_TIMEOUT struct timeval * get the retry timeout The retry timeout is the time that RPC waits for the server to reply before retransmitting the request. clnt_control() returns TRUE on success and FALSE on failure.
rpc_clnt_create(3N) rpc_clnt_create(3N) send and receive buffers with the parameters sendsz and recvsz; values of 0 choose suitable defaults. This routine returns NULL if it fails. void clnt_pcreateerror() Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with the string s and a colon, and appended with a newline. CLIENT *clnt_raw_create() This routine creates an RPC client handle for the remote program prognum and version versnum.
rpc_clnt_create(3N) MULTITHREAD USAGE Thread Safe: Cancel Safe: Fork Safe: Async-cancel Safe: Async-signal Safe: rpc_clnt_create(3N) Yes Yes No No 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() .
rpc_control(3N) rpc_control(3N) NAME rpc_control - library routine for manipulating global RPC attributes for client and server applications SYNOPSIS bool_t rpc_control(int op , void *info ); DESCRIPTION This RPC library routine allows applications to set and modify global RPC attributes that apply to clients as well as servers. At present, it supports only server side operations. op indicates the type of operation, and info is a pointer to the operation specific information.
rpc_control(3N) Cancel Safe: Fork Safe: Async-cancel Safe: Async-signal Safe: rpc_control(3N) Yes No No 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() .
rpc_gss_get_error(3N) rpc_gss_get_error(3N) NAME rpc_gss_get_error() - get error codes on failure SYNOPSIS #include bool_t rpc_gss_get_error(rpc_gss_error_t *error ); DESCRIPTION rpc_gss_get_error() fetches an error code when an RPCSEC_GSS routine fails.
rpc_gss_get_mechanisms(3N) rpc_gss_get_mechanisms(3N) NAME rpc_gss_get_mechanisms(), rpc_gss_get_mech_info(), rpc_gss_get_versions(), rpc_gss_is_installed() - get information on mechanisms and RPC version SYNOPSIS #include
rpc_gss_get_mechanisms(3N) rpc_gss_get_mechanisms(3N) BUGS The service argument for rpc_gss_get_mech_info() is currently irrelevant. FILES /etc/gss/mech File containing valid security mechanisms. /etc/gss/qop File containing valid QOP values. SEE ALSO rpc(3N), rpcsec_gss(3N), mech(4), qop(4).
rpc_gss_get_principal_name(3N) rpc_gss_get_principal_name(3N) NAME rpc_gss_get_principal_name() - get principal names at server SYNOPSIS #include bool_t rpc_gss_get_principal_name( rpc_gss_principal_ *principal , char *mech , char *name , char *node , char *domain ); DESCRIPTION Servers need to be able to operate on a client’s principal name.
rpc_gss_get_principal_name(3N) rpc_gss_get_principal_name(3N) FILES /etc/gss/mech File containing valid security mechanisms. SEE ALSO free(3C), rpc(3N), rpc_gss_set_svc_name(3N), rpc_gss_get_mechanisms(3N), rpcsec_gss(3N), mech(4).
rpc_gss_getcred(3N) rpc_gss_getcred(3N) NAME rpc_gss_getcred() - get credentials of client SYNOPSIS #include bool_t rpc_gss_getcred( struct svc_req *req , rpc_gss_rawcred_t ** rcred , rpc_gss_ucred **ucred , void **cookie ); DESCRIPTION rpc_gss_getcred() is used by a server to fetch the credentials of a client. These credentials may either be network credentials (in the form of a rpc_gss_rawcred_t structure) or UNIX credentials.
rpc_gss_max_data_length(3N) rpc_gss_max_data_length(3N) NAME rpc_gss_max_data_length(), rpc_gss_svc_max_data_length() - get maximum data length for transmission SYNOPSIS #include int rpc_gss_max_data_length( AUTH *handle, int max_tp_unit_len ); int rpc_gss_svc_max_data_length( struct svc_req *req , int max_tp_unit_len ); DESCRIPTION Performing a security transformation on a piece of data generally produces data with a different (usually greater) length.
rpc_gss_mech_to_oid(3N) rpc_gss_mech_to_oid(3N) NAME rpc_gss_mech_to_oid(), rpc_gss_qop_to_num() - map mechanism, QOP strings to non-string values SYNOPSIS #include
rpc_gss_seccreate(3N) rpc_gss_seccreate(3N) NAME rpc_gss_seccreate() - create a security context using the RPCSEC_GSS protocol SYNOPSIS #include
rpc_gss_seccreate(3N) rpc_gss_seccreate(3N) by calling rpc_gss_get_error(). WARNINGS Contexts may be destroyed normally, with auth_destroy(). See the auth_destroy(3N) manpage. FILES /etc/gss/mech File containing valid security mechanisms. /etc/gss/qop File containing valid QOP values. SEE ALSO auth_destroy(3N), rpc(3N), rpc_gss_get_error(3N), rpc_gss_get_mechanisms(3N), rpcsec_gss(3N), mech(4), qop(4).
rpc_gss_set_callback(3N) rpc_gss_set_callback(3N) NAME rpc_gss_set_callback() - specify callback for context SYNOPSIS #include bool_t rpc_gss_set_callback( struct rpc_gss_callback_t *cb ); DESCRIPTION A server may want to specify a callback routine so that it knows when a context gets first used. This userdefined callback may be specified through the rpc_gss_set_callback() routine.
rpc_gss_set_callback(3N) rpc_gss_set_callback(3N) WARNING If a server does not specify a callback, all incoming contexts will be accepted. Because the GSS-API is not currently exposed, the deleg and gss_context arguments are mentioned for informational purposes only, and the user-defined callback function may choose to do nothing with them. SEE ALSO rpc(3N), rpc_gss_getcred(3N), rpcsec_gss(3N).
rpc_gss_set_defaults(3N) rpc_gss_set_defaults(3N) NAME rpc_gss_set_defaults - change service, QOP for a session SYNOPSIS #include bool_t rpc_gss_set_defaults( AUTH *auth , rpc_gss_service_t service , char *qop ); DESCRIPTION rpc_gss_set_defaults() allows an application to change the service (privacy, integrity, authentication, or none) and Quality of Protection (QOP) for a transfer session. New values apply to the rest of the session only unless they are changed again.
rpc_gss_set_svc_name(3N) rpc_gss_set_svc_name(3N) NAME rpc_gss_set_svc_name() - send a principal name to a server SYNOPSIS #include bool_t rpc_gss_set_svc_name( char *principal , char *mechanism , u_int req_time , u_int program , u_int version ); DESCRIPTION rpc_gss_set_svc_name() sets the name of a principal the server is to represent. If a server is going to act as more than one principal, this procedure can be invoked for every such principal.
rpc_soc(3N) rpc_soc(3N) (OBSOLETE) NAME rpc_soc: authdes_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clntraw_create(), clnttcp_create(), clntudp_bufcreate(), clntudp_create(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_fds, svc_getcaller(), svc_getreq(), svc_register(), svc_unregister(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_authunix_parms() - obs
rpc_soc(3N) rpc_soc(3N) (OBSOLETE) void svc_unregister(rpcprog_t prognum , rpcvers_t versnum ); bool_t xdr_authunix_parms(XDR *xdrs , struct authunix_parms *aupp ); DESCRIPTION RPC routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a request to the server. Upon receipt of the request, the server calls a dispatch routine to perform the requested service, and then sends back a reply.
rpc_soc(3N) rpc_soc(3N) (OBSOLETE) Warning: this routine exists for backward compatibility only, and is made obsolete by authsys_create_default() (see rpc_clnt_auth(3N)). callrpc() Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; in is the address of the procedure’s argument, and out is the address of where to place the result(s).
rpc_soc(3N) rpc_soc(3N) (OBSOLETE) for the call to time out is specified by clnt_call() (see rpc_clnt_calls(3N)). If successful it returns a client handle, otherwise it returns NULL. The error can be printed using the clnt_pcreateerror() (see rpc_clnt_create(3N)) routine. The user can specify the maximum packet size for sending and receiving by using sendsz and recvsz arguments for UDP-based RPC messages.
rpc_soc(3N) rpc_soc(3N) (OBSOLETE) enum clnt_stat pmap_rmtcall() Request that the portmap on the host at IP address *addr make an RPC on the behalf of the caller to a procedure on that host. *portp is modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call() (see rpc_clnt_calls(3N)). This procedure is only available for the UDP transport.
rpc_soc(3N) rpc_soc(3N) (OBSOLETE) pointer. The transport is really a buffer within the process’ address space, so the corresponding RPC client should live in the same address space; see clntraw_create(3N). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.
rpc_soc(3N) rpc_soc(3N) (OBSOLETE) dispatch(struct svc_req *request , SVCXPRT *xprt ); The svc_register() routine returns 1 if it succeeds, and 0 otherwise. Warning: this routine exists for backward compatibility only; enhanced functionality is provided by svc_reg() (see rpc_svc_calls(3N)). void svc_unregister() Remove all mapping of the double [prognum, versnum] to dispatch routines, and of the triple [prognum, versnum, all-protocols] to port number from portmap .
rpc_svc_calls(3N) rpc_svc_calls(3N) NAME rpc_svc_calls: svc_dg_enablecache(), svc_done(), svc_exit(), svc_fd_negotiate_ucred(), svc_fdset(), svc_freeargs(), svc_getargs(), svc_getreq_common(), svc_getreq_poll(), svc_getreqset(), svc_getrpccaller(), svc_pollset(), svc_run(), svc_sendreply() - library routines for RPC servers SYNOPSIS #include
rpc_svc_calls(3N) rpc_svc_calls(3N) cache_size entries. Once enabled, there is no way to disable caching. This routine returns 1 if space necessary for a cache of the given size was successfully allocated, and 0 otherwise. This function is safe in multithreaded applications. int svc_done() This function frees resources allocated to service a client request directed to the service endpoint xprt. This call pertains only to servers executing in the User MT mode.
rpc_svc_calls(3N) rpc_svc_calls(3N) procedure is usually waiting for the poll() library call to return. Applications executing in the Automatic or User MT modes should invoke the svc_run() function exactly once. In the Automatic MT mode, the function creates threads to service client requests. In the User MT mode, the function provides a framework for service developers to create and manage their own threads for servicing client requests.
rpc_svc_create(3N) rpc_svc_create(3N) NAME rpc_svc_create: svc_control(), svc_create(), svc_destroy(), svc_dg_create(), svc_fd_create(), svc_raw_create(), svc_tli_create(), svc_tp_create(), svc_vc_create() - library routines for the creation of server handles SYNOPSIS #include
rpc_svc_create(3N) rpc_svc_create(3N) an RPC_PROGVERSMISMATCH error will be returned); 1 indicates that the out of range request will be silently ignored. SVCSET_VERSQUIET If a request is received for a program number served by this server but the version number is outside the range registered with the server, an RPC_PROGVERSMISMATCH error will normally be returned. It is sometimes desirable to change this behavior.
rpc_svc_create(3N) rpc_svc_create(3N) SVCXPRT *svc_raw_create(void) This routine creates an RPC service handle and returns a pointer to it. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; (see clnt_raw_create() in rpc_clnt_create(3N)). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel and networking interference.
rpc_svc_err(3N) rpc_svc_err(3N) NAME rpc_svc_err: svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth() - library routines for server side remote procedure call errors SYNOPSIS #include
rpc_svc_err(3N) Fork Safe: Async-cancel Safe: Async-signal Safe: rpc_svc_err(3N) No No 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.
rpc_svc_reg(3N) rpc_svc_reg(3N) NAME rpc_svc_reg: rpc_reg(), svc_reg(), svc_unreg(), svc_auth_reg(), xprt_register(), xprt_unregister() - library routines for registering servers SYNOPSIS #include
rpc_svc_reg(3N) rpc_svc_reg(3N) invoked to authenticate RPC requests received with authentication type cred_flavor. This interface allows developers to add new authentication types to their RPC applications without needing to modify the libraries. Service implementors usually do not need this routine. Typical service application would call svc_auth_reg() after registering the service and prior to calling svc_run() .
rpc_xdr(3N) rpc_xdr(3N) NAME rpc_xdr: xdr_accepted_reply(), xdr_authsys_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_rejected_reply(), xdr_replymsg() - XDR library routines for remote procedure calls SYNOPSIS #include
rpc_xdr(3N) rpc_xdr(3N) asynchronous cancellation or asynchronous signals. RETURN VALUE These routines return TRUE if they succeed, FALSE otherwise. SEE ALSO rpc(3N), xdr(3N).
rpcbind(3N) rpcbind(3N) NAME rpcbind: rpcb_getmaps(), rpcb_getaddr(), rpcb_gettime(), rpcb_rmtcall(), rpcb_set(), rpcb_unset() - library routines for RPC bind service SYNOPSIS #include
rpcbind(3N) rpcbind(3N) transport. The parameter *svcaddr will be modified to the server’s address if the procedure succeeds (see rpc_call() and clnt_call() in rpc_clnt_calls(3N) for the definitions of other parameters). This procedure should normally be used for a ping and nothing else. This routine allows programs to do lookup and call, all in one step. Note: Even if the server is not running, rpcbind does not return any error messages to the caller. In such a case, the caller times out.
rpcsec_gss(3N) rpcsec_gss(3N) NAME rpcsec_gss - security flavor incorporating GSS-API protections SYNOPSIS cc [flag]... file... -lnsl [library]... #include DESCRIPTION RPCSEC_GSS is a security flavor which sits "on top" of the GSS-API (Generic Security Service Application Programming Interface) for network transmissions.
rpcsec_gss(3N) rpcsec_gss(3N) rpc_gss_options_ret_t Structure containing GSS-API options returned to the calling function, rpc_gss_seccreate(). MAX_GSS_MECH is defined as 128. typedef struct { int major_status; int minor_status; u_int rpcsec_version; /* vers.
rpcsec_gss(3N) rpcsec_gss(3N) } rpc_gss_lock_t; rpc_gss_error_t Structure used by rpc_gss_get_error() to fetch an error code when a RPCSEC_GSS routine fails. typedef struct { int rpc_gss_error; int system_error; } rpc_gss_error_t; /* same as errno */ Index to Routines The following lists RPCSEC_GSS routines and the manual reference pages on which they are described. An (S) indicates it is a server-side function.
rpcsec_gss(3N) rpcsec_gss(3N) ONC+ Developer’s Guide. Network Working Group RFC 2743.
rsqrt(3M) rsqrt(3M) (HP Integrity Server Only) NAME rsqrt( ), rsqrtf( ), rsqrtl( ), rsqrtw( ), rsqrtq( ) - reciprocal square root functions SYNOPSIS #include double rsqrt(double x); float rsqrtf(float x); long double rsqrtl(long double x); extended rsqrtw(extended x); quad rsqrtq(quad x); DESCRIPTION These functions are available only for Integrity servers. rsqrt() returns the reciprocal of the non-negative square root of x.
rstat(3N) rstat(3N) NAME rstat( ), havedisk( ) - get performance data from remote kernel SYNOPSIS #include #include int havedisk(char *host); int rstat(char *host, struct statstime *statp); DESCRIPTION havedisk() returns 1 if host has a disk, 0 if it does not, and −1 if this cannot be determined. The host string is either the official name of the host or an alias for it. See hosts(4) for more information regarding host names.
rstat(3N) rstat(3N) int if_ierrors; int if_opackets; int if_oerrors; int if_collisions; unsigned v_swtch; long avenrun[3]; struct timeval boottime; struct timeval curtime; /* /* /* /* /* /* /* /* inbound errors on all interfaces */ outbound packets on all interfaces */ outbound errors on all interfaces */ collisions seen on all interfaces */ total context switches */ average number of running jobs */ time of last boot */ current system time */ }; RPC Info Program number: RSTATPROG XDR routines: int x
rwall(3N) rwall(3N) NAME rwall( ) - write to specified remote machines SYNOPSIS #include int rwall(char *host, char *msg); DESCRIPTION rwall() causes host to print the string msg to all its users. It returns 0 if successful. RPC Info Program number: WALLPROG Procs: WALLPROC_WALL Takes string as argument (wrapstring), returns no arguments. Executes wall on remote host with string.
scalb(3M) scalb(3M) NAME scalb( ), scalbf( ), scalbl( ), scalbw( ), scalbq( ) - scale exponent of a radix-independent floating-point number SYNOPSIS #include double scalb(double x, double y); HP Integrity Server Only float scalbf(float x, float n); long double scalbl(long double y, long double n); extended scalbw(extended x, extended n); quad scalbq(quad x, quad n); DESCRIPTION The scalb() function returns x * ry , where r is the radix of the machine’s floating-point arithmetic.
scalb(3M) scalb(3M) SEE ALSO scalbn(3M), scalbln(3M), ilogb(3M), ldexp(3M), logb(3M), math(5).
scalbln(3M) scalbln(3M) NAME scalbln(), scalblnf(), scalblnl(), scalblnq(), scalblnw() - scale exponent of a radix-independent floating-point number SYNOPSIS #include double scalbln(double x, long n); HP Integrity Servers Only float scalblnf(float x, long n); long double scalblnl(long double y, long n); extended scalblnw(extended x, long n); quad scalblnq(quad x, long n); DESCRIPTION The scalbln() function returns x * rn , where r is the radix of the machine’s floating-point arithmetic.
scalbn(3M) scalbn(3M) NAME scalbn(), scalbnf(), scalbnl(), scalbnq(), scalbnw() - scale exponent of a radix-independent floating-point number SYNOPSIS #include double scalbn(double x, int n); HP Integrity Servers Only float scalbnf(float x, int n); long double scalbnl(long double y, int n); extended scalbnw(extended x, int n); quad scalbnq(quad x, int n); DESCRIPTION The scalbn() function returns x * rn , where r is the radix of the machine’s floating-point arithmetic.
scandir(3C) scandir(3C) NAME scandir( ), alphasort( ) - scan a directory SYNOPSIS #include extern int scandir( const char *dirname, struct dirent ***namelist, int (*select) (const struct dirent *), int (*compar) (const struct dirent **, const struct dirent ** ) ); int alphasort( const struct dirent **d1, const struct dirent **d2 ); DESCRIPTION scandir() reads the directory dirname and builds an array of pointers to directory entries using malloc() (see malloc(3C)).
scandir(3C) scandir(3C) #include
scanf(3S) scanf(3S) NAME scanf, fscanf, sscanf - formatted input conversion, read from stream file SYNOPSIS #include int scanf(const char *__restrict format, /* [pointer,] */ ...); int fscanf(FILE *__restrict stream, const char *__restrict format, /* [pointer,] */ ...); int sscanf(const char *__restrict s, const char *__restrict format, /* [pointer,] */ ...); DESCRIPTION scanf() reads from the standard input stream stdin. fscanf() reads from the named input stream.
scanf(3S) scanf(3S) assumed. hL An extended type is expected; the corresponding argument should be an extended pointer which is the 80-bit IEEE-754 double-extended type in the Itanium architecture; should be used with the floating-point specifiers a, A, e, E, f, F, g, and G. n Cause the total number of bytes (including white space) scanned since the function call to be stored; the corresponding argument should be an integer pointer. No input is consumed.
scanf(3S) scanf(3S) certain conventions. A range of characters may be represented by the construct first-last, enabling [0123456789] to be expressed [0-9]. Using this convention, first must be lexically less than or equal to last; otherwise, the dash stands for itself. The dash also stands for itself when it is the first or the last character in the scanset.
scanf(3S) scanf(3S) [EIO] The process is a member of a background process and is attempting to read from its controlling terminal, and either the process is ignoring or blocking the SIGTTIN signal or the process group of the process is orphaned. [EILSEQ] The data obtained from the input stream does not form a valid wide character. Additional errno values can be set by the underlying read() function (see read(2)).
scanf(3S) scanf(3S) APPLICATION USAGE After scanf() or fscanf() is applied to a stream, the stream becomes byte-oriented (see orientation(5)). WARNINGS Trailing white space (including a newline) is left unread unless matched in the control string. Truncation of multi-byte characters may occur if a field width is used with the conversion character. AUTHOR scanf() was developed by AT&T and HP.
scr_dump(3X) scr_dump(3X) (ENHANCED CURSES) NAME scr_dump, scr_init, scr_restore, scr_set — screen file input/output functions SYNOPSIS #include int scr_dump(const char *filename); int scr_init(const char *filename); int scr_restore(const char *filename); int scr_set(const char *filename); DESCRIPTION The scr_dump() function writes the current contents of the virtual screen to the file named by filename in an unspecified format.
scrl(3X) scrl(3X) (ENHANCED CURSES) NAME scrl, wscrl — enhanced scroll a Curses window functions SYNOPSIS #include int scrl(int n); int wscrl(WINDOW *win, int n); DESCRIPTION The scrl() and wscrl() functions scroll the current or specified window. If n is positive, the window scrolls n lines toward the first line. Otherwise, the window scrolls −n lines toward the last line. These functions do not change the cursor position.
scroll(3X) scroll(3X) (CURSES) NAME scroll — scroll a Curses window SYNOPSIS #include int scroll(WINDOW *win); DESCRIPTION The scroll() function scrolls win one line in the direction of the first line. This function does not change the cursor position. If scrolling is disabled for the current or specified window, this function has no effect. RETURN VALUE Upon successful completion, this function returns OK. Otherwise, it returns ERR. ERRORS No errors are defined. SEE ALSO scrl(3X), .
secdef(3) secdef(3) NAME secdef: open_secdef(), close_secdef(), get_secdef_str(), get_secdef_int() - security defaults configuration file routines SYNOPSIS #include int open_secdef (void); int close_secdef (void); int get_secdef_str(char *parameter, char *value); int get_secdef_int(char *parameter, char *value); DESCRIPTION open_secdef opens the security configuration file /etc/default/security. This function must be called prior to calling get_secdef_str or get_secdef_int.
secure_rpc(3N) secure_rpc(3N) NAME secure_rpc: authdes_getucred(), authdes_seccreate(), getnetname(), host2netname(), key_decryptsession(), key_encryptsession(), key_gendes(), key_setsecret(), key_secretkey_is_set(), netname2host(), netname2user(), user2netname() - library routines for secure remote procedure calls SYNOPSIS #include #include
secure_rpc(3N) secure_rpc(3N) The authdes_getucred() and authdes_seccreate() routines implement the AUTH_DES authentication flavor. The keyserver daemon keyserv (see keyserv(1M)) must be running for the AUTH_DES authentication system to work, and keylogin(1) must have been run. Only the AUTH_DES style of authentication is discussed here. For information about the AUTH_NONE and AUTH_SYS styles of authentication, refer to rpc_clnt_auth(3N). The routines documented on this page are Thread Safe.
secure_rpc(3N) secure_rpc(3N) int key_decryptsession() This function is an interface to the keyserver daemon, which is associated with RPC’s secure authentication system (AUTH_DES authentication). User programs rarely need to call key_decryptsession() or the associated functions key_encryptsession(), key_gendes() , and key_setsecret().
secure_rpc(3N) secure_rpc(3N) asynchronous cancellation or asynchronous signals. SEE ALSO chkey(1), keyserv(1M), newkey(1M), rpc(3N), rpc_clnt_auth(3N).
set_term(3X) set_term(3X) (CURSES) NAME set_term — switch between screens SYNOPSIS #include SCREEN *set_term(SCREEN *new); DESCRIPTION The set_term() function switches between different screens. The new argument specifies the new current screen. RETURN VALUE Upon successful completion, set_term() returns a pointer to the previous screen. Otherwise, it returns a null pointer. ERRORS No errors are defined.
setaclentry(3C) setaclentry(3C) NAME setaclentry( ), fsetaclentry( ) - add, modify, or delete one entry in file’s access control list (ACL) (HFS File Systems only) SYNOPSIS #include #include int setaclentry(const char *path, uid_t uid, gid_t gid, int mode); int fsetaclentry(int fd, uid_t uid, gid_t gid, int mode); DESCRIPTION Both forms of this call add, modify, or delete one entry in a file’s access control list (ACL).
setaclentry(3C) setaclentry(3C) AUTHOR setaclentry() and fsetaclentry() were developed by HP. SEE ALSO getacl(2), setacl(2), stat(2), acltostr(3C), cpacl(3C), chownacl(3C), strtoacl(3C), acl(5), thread_safety(5).
setauduser(3) setauduser(3) NAME setauduser - start auditing the current process as owned by a given user SYNOPSIS #include int setauduser(const char *user, const char *stime); DESCRIPTION setauduser() sets audit tag which uniquely identifies the user for the current process. The user argument points to the name of the login user associated with the current process, and must not exceed the longest user name that HP-UX supports.
setbuf(3S) setbuf(3S) NAME setbuf(), setvbuf(), setlinebuf() - assign buffering to a stream file SYNOPSIS #include void setbuf(FILE *__restrict stream, char *__restrict buf); int setvbuf(FILE *__restrict stream, char *__restrict buf, int type, size_t size); void setlinebuf(FILE *stream); Obsolescent Interface int setvbuf_unlocked(FILE *stream, char *buf, int type, size_t size); DESCRIPTION setbuf() can be used after a stream has been opened but before it is read or written.
setbuf(3S) setbuf(3S) SEE ALSO flockfile(3S), fopen(3S), getc(3S), malloc(3C), putc(3S), stdio(3S), thread_safety(5), glossary(9). STANDARDS CONFORMANCE setbuf() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.
setcat(3C) setcat(3C) (TO BE OBSOLETED) NAME setcat() - set the default message catalog SYNOPSIS #include char *setcat(const char *msgcat); DESCRIPTION The setcat() routine sets the default message catalog for use by other formatting routines (see gettxt (3C) and pfmt(3C)). msgcat specifies the file to use as the default catalog. The file name is limited to 14 characters. No checking is done to make sure that the file exists.
setcchar(3X) setcchar(3X) (ENHANCED CURSES) NAME setcchar() - set cchar_t from a wide-character string and rendition SYNOPSIS #include int setcchar(cchar_t *wcval, const wchar_t *wch, const attr_t attrs, short color_pair , const void *opts); DESCRIPTION The setcchar() function initialises the object pointed to by wcval according to the character attributes in attrs, the colour pair in color_pair and the wide-character string pointed to by wch.
setclock(3C) setclock(3C) NAME setclock - set value of system-wide clock SYNOPSIS #include int setclock(int clock_type, struct timespec *tp); DESCRIPTION The setclock() function sets the current value tp of the specified system-wide clock, clock_type . setclock() supports a clock_type of TIMEOFDAY , defined in , which represents the time-of-day clock for the system. For this clock, the values returned by setclock() represent the amount of time since the Epoch.
setenv(3C) setenv(3C) NAME setenv(), unsetenv() - add, update or remove an environment variable SYNOPSIS #include int setenv(const char *envname, const char *envval, int overwrite); int unsetenv(const char *envname); Parameters envname Points to a string containing the name of an environment variable to be added or altered. This should not be a NULL pointer or null string, and the string should not contain an equal (=) character.
setenv(3C) setenv(3C) const char *envname="HOME"; const char *envval="/tmp/home"; setenv(envname,envval,1); The following code removes the variable NEWHOME from the current environment. unsetenv("NEWHOME"); WARNINGS The setenv() and unsetenv() functions manipulate the environment pointed to by environ, and can be used in conjunction with getenv() . However, envp (the third argument to main) is not changed. The setenv() uses malloc() to enlarge the environment (see malloc(3C)).
setjmp(3C) setjmp(3C) NAME setjmp( ), longjmp( ), sigsetjmp( ), siglongjmp( ) - non-local goto SYNOPSIS #include int setjmp(jmp_buf env); void longjmp(jmp_buf env, int val); int _setjmp(jmp_buf env); void _longjmp(jmp_buf env, int val); int sigsetjmp(sigjmp_buf env, int savemask); void siglongjmp(sigjmp_buf env, int val); DESCRIPTION setjmp() and longjmp() are useful for dealing with errors and interrupts encountered in a low-level subroutine of a program.
setjmp(3C) setjmp(3C) corresponding setjmp() is not inside the scope of the try/recover, the recover block will not be executed and the currently active recover block will become the one enclosing the setjmp() , if one exists. WARNINGS A call to longjmp() to leave the guaranteed stack space reserved by sigspace() might remove the guarantee that the ordinary execution of the program will not extend into the guaranteed space.
setlabel(3C) setlabel(3C) NAME setlabel() - define label for formatting routines SYNOPSIS #include int setlabel(const char *label); DESCRIPTION The setlabel() system call defines a label to be printed by formatting routines (see pfmt(3C)) in the standard message format. label is a character string limited to 25 characters in length. If label is NULL or an empty string, the label is reset to no label. No label is defined before setlabel() .
setlocale(3C) setlocale(3C) NAME setlocale( ), getlocale( ) - set and get the locale of a program SYNOPSIS #include
setlocale(3C) "" setlocale(3C) If the value of locale is the empty string, the setting of that part of the NLS environment associated with category depends upon the setting of the following environment variables in the user’s environment (see environ(5)): LANG LC_ALL LC_COLLATE LC_CTYPE LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME If category is any defined value other than LC_ALL , setlocale() sets that category as specified by the value of the LC_ALL environment.
setlocale(3C) setlocale(3C) The string returned by setlocale() is such that a subsequent call with that string as the locale argument and its associated category restores that part of the program’s locale. ERRORS If a language name given through the locale argument does not identify a valid language name, or if the language name is more than 256 characters, or if the language is not available on the system (see lang(5)), then a null pointer is returned and the program’s locale is not changed.
setlocale(3C) setlocale(3C) LC_CTYPE=ru_RU.iso88595 All categories will be loaded with da_DK.iso88591. Another example with the LC_ALL environment variable: setlocale(LC_TIME, "pl_PL.iso88592"); with the following settings in the user’s environment: LANG=it_IT.iso88591 LC_ALL=nl_NL.iso88591 The LC_TIME category will be set to pl_PL.iso88592, but all other categories will be set to nl_NL.iso88591. To set the date/time formats to fr_FR.iso88591: setlocale(LC_TIME, "fr_FR.
setlocale(3C) setlocale(3C) It should be noted that the locale state is common to all threads within a process. getlocale_r() and setlocale_r() are obsolescent interfaces supported for compatibility with existing DCE applications. New multithreaded applications should use getlocale() and setlocale() .
shl_load(3X) shl_load(3X) NAME shl_load(), shl_definesym(), shl_findsym(), shl_get(), shl_get_r(), shl_gethandle(), shl_getsymbols(), shl_unload(), dld_getenv() - explicit load of shared libraries shl_gethandle_r(), SYNOPSIS Remarks For Integrity systems, see shl_load_ia(3X). For PA-RISC systems, see shl_load_pa(3X). Use the uname command to determine your system type. uname -m returns ia64 on Integrity systems. All other values represent PA-RISC systems.
shl_load_ia(3X) Integrity Systems Only shl_load_ia(3X) NAME shl_load_ia: shl_load(), shl_definesym(), shl_findsym(), shl_get(), shl_get_r(), shl_gethandle(), shl_gethandle_r(), shl_getsymbols(), shl_unload() - explicit load of shared libraries for Integrity systems SYNOPSIS #include
shl_load_ia(3X) shl_load_ia(3X) Integrity Systems Only BIND_IMMEDIATE Resolve symbol references when the library is loaded. BIND_DEFERRED Delay code symbol resolution until actual reference. Zero or more of the following can be specified by doing a bitwise OR operation: BIND_FIRST Place the library at the head of the symbol search order. In default mode, the library and its dependent libraries are bound independently of each other (see BIND_TOGETHER).
shl_load_ia(3X) shl_load_ia(3X) Integrity Systems Only shl_definesym() Adds a symbol to the user hash table for the current process. If value falls in the range of a currently loaded library, an association will be made and the symbol is undefined once the associated library is unloaded. The defined symbol can be overridden by a subsequent call to this routine or by loading a more visible library that provides a definition.
shl_load_ia(3X) shl_load_ia(3X) Integrity Systems Only specified. The value field contains the address of the symbol, while the handle field is the handle of the library that defined the symbol, or NULL for symbols defined via the shl_definesym() routine and is useful in conjunction with the GLOBAL_VALUES flag. If successful, shl_getsymbols() returns the number of symbols found; otherwise it returns −1. shl_unload() Can be used to detach a shared library from the process.
shl_load_ia(3X) shl_load_ia(3X) Integrity Systems Only [ENOMEM] There is insufficient room in the address space to load the library. [ENOENT] The specified path does not exist, or the specified handle is invalid. [ETXTBSY] The specified shared library is currently in use and cannot be unloaded. [EACCES] Read or execute permission is denied for the specified library.
shl_load_pa(3X) PA-RISC Systems Only shl_load_pa(3X) NAME shl_load_pa: shl_load(), shl_definesym(), shl_findsym(), shl_get(), shl_get_r(), shl_gethandle(), shl_gethandle_r(), shl_getsymbols(), shl_unload(), dld_getenv() - explicit load of shared libraries for PARISC systems SYNOPSIS #include
shl_load_pa(3X) shl_load_pa(3X) PA-RISC Systems Only shared library contains thread local storage, you cannot load it with this routine. The flags argument is made up of several fields. One of the following must be specified: BIND_IMMEDIATE Resolve symbol references when the library is loaded. BIND_DEFERRED Delay code symbol resolution until actual reference.
shl_load_pa(3X) shl_load_pa(3X) PA-RISC Systems Only shl_definesym() Adds a symbol to the user hash table for the current process. If value falls in the range of a currently loaded library, an association will be made and the symbol is undefined once the associated library is unloaded. The defined symbol can be overridden by a subsequent call to this routine or by loading a more visible library that provides a definition.
shl_load_pa(3X) PA-RISC Systems Only shl_load_pa(3X) The type field in the return structure can have the values TYPE_PROCEDURE, or TYPE_DATA . On PA-RISC 32i-bit systems, you can also have the values TYPE_STORAGE or TYPE_TSTORAGE. These are a subset of TYPE_DATA . The value and handle fields are only valid if export symbols are requested and the NO_VALUES flag is not specified.
shl_load_pa(3X) shl_load_pa(3X) PA-RISC Systems Only DIAGNOSTICS If a library cannot be loaded, shl_load() returns NULL and sets errno to indicate the error. This includes trying to shl_load() a library containing thread local storage. All other functions return −1 on error and set errno . If shl_findsym() cannot find the indicated symbol, errno is set to zero.
shl_load_pa(3X) dlget(3C) dlgetname(3C) dlmodinfo(3C) dlopen(3C) dlsym(3C) shl_load_pa(3X) PA-RISC Systems Only return information about a loaded module return the name of the storage containing a load module return information about a loaded module load a shared library get the address of a symbol in a shared library Texts and Tutorials HP-UX Linker and Libraries Online User Guide (See the +help option to ld(1)) HP-UX Linker and Libraries User’s Guide (See manuals(5) for ordering information) s HP-U
signbit(3M) signbit(3M) NAME signbit( ) - floating-point sign-determination SYNOPSIS #include int signbit( floating-type x); DESCRIPTION The signbit() macro determines whether the sign of its argument value (which may be a floating-point number, zero, infinity, or NaN) is negative. The argument must be of floating type. For HP Integrity servers, the argument can be any floating type. For PA-RISC, the argument must be either double or float .
sigpause(3C) sigpause(3C) NAME sigpause - signal management SYNOPSIS #include int sigpause(int sig); Obsolescent long sigpause(long mask); DESCRIPTION The sigpause() function, along with the sighold() , sigignore() , sigrelse() , and sigset() functions provide simplified signal management. The sigpause() function removes sig from the calling thread’s signal mask and suspends the calling thread until a signal is received.
sigpause(3C) sigpause(3C) STANDARDS CONFORMANCE sigpause() : SVID2, SVID3 s 416 Hewlett-Packard Company −2− HP-UX 11i Version 3: February 2007
sigset(3C) sigset(3C) NAME sigset(), sighold(), sigrelse(), sigignore() - signal management SYNOPSIS #include void (*sigset(int sig, void (*func)(int)))(int); int sighold(int sig); int sigrelse(int sig); int sigignore(int sig); DESCRIPTION The system defines a set of signals that can be delivered to a process. The set of signals is defined in signal(5), along with the meaning and side effects of each signal. An alternate mechanism for handling these signals is defined here.
sigset(3C) sigset(3C) sigset() , sighold() , sigrelse() , and sigignore() and fail and the defined action for sig is not changed if any of the following occur: [EINVAL] sig is not a valid signal number. [EINVAL] An attempt is made to ignore, hold, or supply a handler for a signal that cannot be ignored, held, or caught; see signal(5). WARNINGS These signal facilities should not be used in conjunction with signal(2) and sigspace(2).
sigsetops(3C) sigsetops(3C) NAME sigemptyset( ), sigfillset( ), sigaddset( ), sigdelset( ), sigismember( ) - initialize, manipulate, and test signal sets SYNOPSIS #include int sigemptyset(sigset_t *set); int sigfillset(sigset_t *set); int sigaddset(sigset_t *set, int signo); int sigdelset(sigset_t *set, int signo); int sigismember(const sigset_t *set, int signo); DESCRIPTION sigemptyset() initializes the signal set pointed to by set, to exclude all signals supported by HP-UX.
sin(3M) sin(3M) NAME sin( ), sinf( ), sinl( ), sinw( ), sinq( ) - sine functions SYNOPSIS #include double sin(double x); float sinf(float x); HP Integrity Server Only long double sinl(long double x); extended sinw(extended x); quad sinq(quad x); DESCRIPTION sin() returns the sine of x (x specified in radians). On PA-RISC systems, sin() may lose accuracy when x is far from zero. sinf() is a float version of sin() ; it takes a float argument and returns a float result.
sincos(3M) sincos(3M) (HP Integrity Server Only) NAME sincos( ), sincosf( ), sincosl( ), sincosw( ), sincosq( ) - functions that compute both sine and cosine SYNOPSIS #include
sincosd(3M) sincosd(3M) (HP Integrity Server Only) NAME sincosd( ), sincosdf( ), sincosdl( ), sincosdw( ), sincosdq( ) - functions that compute both sine and cosine of an argument specified in degrees SYNOPSIS #include
sind(3M) sind(3M) NAME sind( ), sindf( ), sindl( ), sindw( ), sindq( ) - sine functions of argument specified in degrees SYNOPSIS #include double sind(double x); float sindf(float x); HP Integrity Server Only long double sindl(long double x); extended sindw(extended x); quad sindq(quad x); DESCRIPTION sind() returns the sine of x (x specified in degrees). On PA-RISC systems, sind() may lose accuracy when x is far from zero.
sinh(3M) sinh(3M) NAME sinh( ), sinhf( ), sinhl( ), sinhw( ), sinhq( ) - hyperbolic sine functions SYNOPSIS #include double sinh(double x); float sinhf(float x); HP Integrity Server Only long double sinhl(long double x); extended sinhw(extended x); quad sinhq(quad x); DESCRIPTION sinh() returns the hyperbolic sine of x. sinhf() is a float version of sinh() ; it takes a float argument and returns a float result.
sinhcosh(3M) sinhcosh(3M) (HP Integrity Server Only) NAME sinhcosh( ), sinhcoshf( ), sinhcoshl( ), sinhcoshw( ), sinhcoshq( ) - functions that compute both hyperbolic sine and hyperbolic cosine SYNOPSIS #include
sleep(3C) sleep(3C) NAME sleep() - suspend execution for interval SYNOPSIS #include unsigned int sleep(unsigned int seconds); DESCRIPTION sleep() suspends the current process from execution for the number of seconds specified by the argument.
slk_attroff(3X) slk_attroff(3X) (ENHANCED CURSES) NAME slk_attroff, slk_attr_off, slk_attron, slk_attr_on, slk_attrset, slk_attr_set, slk_clear, slk_color, slk_init, slk_label, slk_noutrefresh, slk_refresh, slk_restore, slk_set, slk_touch, slk_wset — soft label functions SYNOPSIS #include
slk_attroff(3X) slk_attroff(3X) (ENHANCED CURSES) The slk_touch() function forces all the soft labels to be output the next time slk_noutrefresh() or slk_refresh() is called. The slk_attron() , slk_attrset() and slk_attroff() functions correspond to attron() , attrset() , and attroff() . They have an effect only if soft labels are simulated on the bottom line of the screen.
SLPError(3N) SLPError(3N) NAME SLPError - Service Location Protocol (SLP) error codes SYNOPSIS #include typedef int SLPError; DESCRIPTION SLP APIs return error code when the call does not succeed. These SLP error codes are defined in .
SLPError(3N) SLPError(3N) If an unimplemented feature is used, this error is returned. SLP_BUFFER_OVERFLOW (-18 ) An outgoing request overflowed the maximum network MTU size. The request should be reduced in size or broken into pieces and tried again. SLP_NETWORK_TIMED_OUT (-19 ) This error is returned when no reply can be obtained in the time specified by the configured timeout interval for a unicast request.
smfi_addheader(3N) smfi_addheader(3N) NAME smfi_addheader() - adds a header to the current sendmail message SYNOPSIS #include int smfi_addheader( SMFICTX *ctx , char *headerf , char *headerv ); PARAMETERS smfi_addheader() includes the following arguments: ctx Specifies the opaque context structure. headerf Specifies the header name, which is a non-NULL, null- terminated string. headerv Specifies the header value to be added.
smfi_addheader(3N) smfi_addheader(3N) SEE ALSO smfi_chgheader(3N), smfi_insheader(3N), smfi_addrcpt(3N), smfi_delrcpt(3N), smfi_replacebody(3N). Sendmail 8.13.3 Programmer’s Guide on docs.hp.com .
smfi_addrcpt(3N) smfi_addrcpt(3N) NAME smfi_addrcpt() - adds a recipient for the current sendmail message SYNOPSIS #include int smfi_addrcpt( SMFICTX *ctx , char *rcpt ); PARAMETERS ctx Specifies the opaque context structure. rcpt Specifies the new address of the recipient. DESCRIPTION smfi_addrcpt() adds a recipient to the message envelope. smfi_addrcpt() can be called only from the xxfi_eom() routine.
smfi_chgheader()(3N) smfi_chgheader()(3N) NAME smfi_chgheader() - changes or deletes a sendmail message header SYNOPSIS #include int smfi_chgheader( SMFICTX *ctx , char *headerf , mi_int32 hdridx , char *headerv ); PARAMETERS ctx Specifies the opaque context structure. headerf Specifies the header name, which is a non-NULL, null-terminated string. hdridx Specifies the header index value (1-based). A hdridx value of 1 modifies the first occurrence of a header named headerf .
smfi_chgheader()(3N) smfi_chgheader()(3N) SEE ALSO smfi_addheader(3N), smfi_insheader(3N), smfi_addrcpt(3N), smfi_delrcpt(3N), smfi_replacebody(3N). Sendmail 8.13.3 Programmer’s Guide on docs.hp.com .
smfi_delrcpt(3N) smfi_delrcpt(3N) NAME smfi_delrcpt() - removes a recipient from envelope of current sendmail message SYNOPSIS #include int smfi_delrcpt( SMFICTX *ctx ; char *rcpt ; ); PARAMETERS ctx Specifies the opaque context structure. rcpt Specifies the recipient address to be removed, which is a non-NULL, null-terminated string. DESCRIPTION smfi_delrcpt() removes the named recipient from the envelope of the current message.
smfi_getpriv(3N) smfi_getpriv(3N) NAME smfi_getpriv() - gets connection-specific data pointer for the sendmail connection SYNOPSIS #include void* smfi_getpriv( SMFICTX *ctx ); PARAMETERS ctx Specifies the opaque context structure. DESCRIPTION The smfi_getpriv() routine gets the connection-specific data smfi_getpriv() can be called from the xxfi_* callback functions. pointer for a connection.
smfi_getsymval(3N) smfi_getsymval(3N) NAME smfi_getsymval() - gets the value of a sendmail macro SYNOPSIS #include char* smfi_getsymval( SMFICTX *ctx , ); PARAMETERS ctx Specifies the opaque context structure. symname Specifies the name of a sendmail macro. Single letter macros can optionally be enclosed in braces ({ and }); longer macro names must be enclosed in braces, similar to the macro names in the sendmail.cf file. For information on default macros, see the Notes section.
smfi_insheader(3N) smfi_insheader(3N) NAME smfi_insheader() - prepends a header to the current sendmail message SYNOPSIS #include int smfi_insheader( SMFICTX *ctx , int hdridx , char *headerf , char *headerv ); PARAMETERS ctx Specifies the opaque context structure. hdridx Specifies the location in the internal header list where the header must be inserted. A value of 0 (zero) places the header in the beginning of the header.
smfi_insheader(3N) smfi_insheader(3N) AUTHOR smfi_insheader() was developed by the Sendmail Inc. SEE ALSO smfi_chgheader(3N), smfi_addheader(3N), smfi_addrcpt(3N), smfi_delrcpt(3N), smfi_replacebody(3N). Sendmail 8.13.3 Programmer’s Guide on docs.hp.com .
smfi_main(3N) smfi_main(3N) NAME smfi_main() - passes control to the libmilter event loop SYNOPSIS #include int smfi_main( ); DESCRIPTION smfi_main() hands control to the Milter event loop. smfi_main() is called after initializing a filter. RETURN VALUE smfi_main() returns MI_FAILURE if it fails to establish a connection. This may occur for any reason, such as, address passed to smfi_setconn(). The reason for the failure is logged.
smfi_opensocket(3N) smfi_opensocket(3N) NAME smfi_opensocket() - attempts to create the interface socket that MTAs use to connect to the filter SYNOPSIS #include int smfi_opensocket ( bool rmsocket ); PARAMETERS The smfi_opensocket() contains the following parameters: rmsocket A flag that indicates whether the library must try to remove any existing UNIX domain socket before attempting to create a new socket.
smfi_progress(3N) smfi_progress(3N) NAME smfi_progress() - notifies the MTA that a sendmail operation is still in progress SYNOPSIS #include int smfi_progress( SMFICTX *ctx ; ); PARAMETERS ctx Specifies the opaque context structure. DESCRIPTION smfi_progress() notifies the MTA (Mail Transfer Agent) that the filter is still working on a message causing the MTA to restart its timeout values. smfi_progress() can be called from the xxfi_eom() function.
smfi_quarantine(3N) smfi_quarantine(3N) NAME smfi_quarantine() - quarantines the sendmail message using the given reason SYNOPSIS #include int smfi_quarantine( SMFICTX *ctx ; char * reason ; ); PARAMETERS smfi_quarantine() contains the following parameters: ctx Specifies the opaque context structure. reason Specifies the quarantine reason, which is a non-NULL and non-empty null-terminated string. DESCRIPTION smfi_quarantine() quarantines the message using a specific reason.
smfi_register(3N) smfi_register(3N) NAME smfi_register() - registers a set of filter callbacks for sendmail SYNOPSIS #include int smfi_register( smfiDesc descr ); PAMAMETERS descr Specifies a filter descriptor of type smfiDesc describing the filter’s functions. DESCRIPTION The smfi_register() creates a filter using the information given in the smfiDesc argument. smfi_register() must be called before the smfi_main() routine.
smfi_register(3N) smfi_register(3N) RETURN VALUE The smfi_register() routine may return MI_FAILURE for any of the following reasons: • • Memory allocation failure Incompatible version or illegal flags value AUTHOR smfi_register() was developed by the Sendmail Inc. SEE ASLO smfi_main(3N), smfi_setconn(3N), smfi_setdbg(3N), smfi_stop(3N). smfi_settimeout(3N), smfi_opensocket(3N), smfi_setbacklog(3N), Sendmail 8.13.3 Programmer’s Guide on docs.hp.com .
smfi_replacebody(3N) smfi_replacebody(3N) NAME smfi_replacebody() - replaces the data in the sendmail message body SYNOPSIS #include int smfi_replacebody( SMFICTX *ctx , unsigned char *bodyp , int bodylen ); PARAMETERS ctx Specifies the opaque context structure. bodyp Specifies a pointer to the start of the new body data, which does not have to be null-terminated. If bodyp is set to NULL, the length of the body is considered to be 0 (zero). The body data must be in CR or LF form.
smfi_setbacklog(3N) smfi_setbacklog(3N) NAME smfi_setbacklog() - sets the listen backlog value of the filter for sendmail SYNOPSIS #include int smfi_setbacklog( int obacklog ); PARAMETERS obacklog Specifies the number of incoming connections in the listen queue. DESCRIPTION The smfi_setbacklog() routine sets the incoming socket backlog used by the listen() function. If smfi_setbacklog() is not called, the operating system default is used.
smfi_setconn(3N) smfi_setconn(3N) NAME smfi_setconn() - sets the socket for filter to communicate with sendmail SYNOPSIS #include #include int smfi_setconn( char *oconn ; }; xxx PARAMETERS oconn Specifies the address of the desired communication socket. The address must be a NULLterminated string in the following proto :address format: {unix |local }:path_to_file Specifies a named pipe.
smfi_setdbg(3N) smfi_setdbg(3N) NAME smfi_setdbg() - sets the debugging (tracing) level for the Milter library, for sendmail SYNOPSIS #include int smfi_setdbg( int level ; ); PARAMETERS level Specifies the debugging level. DESCRIPTION The smfi_setdbg() routine sets the internal debugging level of the Milter library for tracing purposes, for sendmail. A level of 0 (zero) turns off debugging. A detailed dubugging can be obtained with a higher (> 0) debugging level.
smfi_setmlreply(3N) smfi_setmlreply(3N) NAME smfi_setmlreply() - sets default SMTP error reply code to a multi-line response SYNOPSIS #include int smfi_setmlreply( SMFICTX *ctx , char *rcode , char *xcode , ... ); PARAMETERS ctx Specifies the opaque context structure. rcode Specifies the 3-digit (RFC 821/2821) SMTP reply code, as a null-terminated string. rcode must not be a NULL value, and must be a valid 4XX or 5XX reply code.
smfi_setmlreply(3N) smfi_setmlreply(3N) EXAMPLES Consider the following sample code: ret = smfi_setmlreply(ctx, "550", "5.7.0", "Spammer access rejected", "Please see our policy at:", "http://www.example.com/spampolicy.html", NULL); The following is the SMTP response of the sample code: 550-5.7.0 Spammer access rejected 550-5.7.0 Please see our policy at: 550 5.7.0 http://www.example.com/spampolicy.html AUTHOR The smfi_setmlreply() routine was developed by the Sendmail Inc.
smfi_setpriv(3N) smfi_setpriv(3N) NAME smfi_setpriv() - sets the private data pointer for the sendmail connection SYNOPSIS #include int smfi_setpriv( SMFICTX *ctx , void *privatedata ); PARAMETERS ctx privatedata Specifies the opaque context structure. Pointer to the private data. This value is returned by subsequent calls to the smfi_getpriv() function using the ctx argument.
smfi_setreply(3N) smfi_setreply(3N) NAME smfi_setreply() - sets the default SMTP error reply code SYNOPSIS #include int smfi_setreply( SMFICTX *ctx , char *rcode , char *xcode , char *message ); PARAMETERS ctx Specifies the opaque context structure. rcode Specifies the 3-digit (RFC 821/2821) SMTP reply code as a null-terminated string. rcode cannot be set to NULL value. rcode must be a valid 4XX or 5XX reply code. xcode Specifies the extended (RFC 1893/2034) reply code.
smfi_settimeout(3N) smfi_settimeout(3N) NAME smfi_settimeout() - sets the sendmail connection timeout value of a filter SYNOPSIS #include int smfi_settimeout( int otimeout ); PARAMETERS otimeout Specifies the number of seconds to wait before timing out a socket. The otimeout value must be greater than 0 (zero) second. Note: A timeout value of 0 (zero) second means not to wait indefinitely.
smfi_stop(3N) smfi_stop(3N) NAME smfi_stop() - starts an orderly shutdown of the Milter for sendmail SYNOPSIS #include int smfi_stop(void); PARAMETERS void Specifies that the function does not accept any argument. DESCRIPTION The smfi_stop() routine causes each thread to finish its current connection and then exit the connection. When all the threads have exited, the call to the smfi_main() routine returns to the calling program, which may then exit or warm restart the function.
smonitor(3C) smonitor(3C) NAME smonitor( ) - prepare execution profile SYNOPSIS #include #include void smonitor( struct text_region *regions, int nregions, void *buffer, size_t bufsize, int nfunc, unsigned flags ); DESCRIPTION smonitor() is an interface to sprofil(2) for collecting sampling information for execution profiles. To use smonitor() , link in the gprof library by specifying -lgprof on the linker command line or -G on the compiler command line. See gprof(1).
smonitor(3C) smonitor(3C) LD_PROFILE="" libgprof.so does not set up the buffers to collect sampling information. It is expected that smonitor() will be called explicitly to collect the sampling information. So it is the ideal case to call the smonitor() explicitly. LD_PROFILE=ALL libgprof.so sets up the sampling buffer for all the load modules and starts sprofil() to collect the sampling information. Now if smonitor() is invoked explicitly, sprofil() is stopped, the buffer allocated by libgprof.
sockatmark(3N) sockatmark(3N) NAME sockatmark() - determine whether a socket is at the out-of-band mark SYNOPSIS #include int sockatmark(int s); DESCRIPTION The sockatmark() function determines whether the socket specified by the descriptor s is at the outof-band data mark.
spray(3N) spray(3N) NAME spray - scatter data in order to check the network SYNOPSIS #include #include DESCRIPTION This reference page describes the data structures and XDR routines used by the spray(1M) program. A spray() function call does not exist. Refer to spray(1M) for more information.
sqrt(3M) sqrt(3M) NAME sqrt( ), sqrtf( ), sqrtl( ), sqrtw( ), sqrtq( ) - square root functions SYNOPSIS #include double sqrt(double x); float sqrtf(float x); HP Integrity Server Only long double sqrtl(long double x); extended sqrtw(extended x); quad sqrtq(quad x); DESCRIPTION sqrt() returns the non-negative square root of x. sqrtf() is a float version of sqrt() ; it takes a float argument and returns a float result.
ssignal(3C) ssignal(3C) NAME ssignal( ), gsignal( ) - software signals SYNOPSIS #include int (*ssignal(int sig, int (*action)(int)))(int); int gsignal(int sig); DESCRIPTION ssignal() and gsignal() implement a software facility similar to signal(5). This facility is used by the Standard C Library to enable users to indicate the disposition of error conditions, and is also made available to users for their own purposes.
standend(3X) standend(3X) (CURSES) NAME standend, standout, wstandend, wstandout — set and clear window attributes SYNOPSIS #include int standend(void); int standout(void); int wstandend(WINDOW *win); int wstandout(WINDOW *win); DESCRIPTION The standend() and wstandend() functions turn off all attributes of the current or specified window. The standout() and wstandout() functions turn on the standout attribute of the current or specified window. RETURN VALUE These functions always return 1.
statfsdev(3C) statfsdev(3C) NAME statfsdev(), fstatfsdev() - get file system statistics SYNOPSIS #include int statfsdev(const char *path, struct statfs *buf); int fstatfsdev(int fildes, struct statfs *buf); DESCRIPTION statfsdev() returns information about the file system contained in the file specified by path. buf is a pointer to a statfs structure into which information is placed concerning the file system.
statfsdev(3C) statfsdev(3C) Both fstatfsdev() and statfsdev() fail if one or more of the following is true: [EAGAIN] Enforcement-mode record locking was set, and there was a blocking write lock. [EDEADLK] A resource deadlock would occur as a result of this operation. [EINTR] A system call was interrupted by a signal. [EINVAL] The file specified by path or filedes does not contain a file system of any known type.
statvfsdev(3C) statvfsdev(3C) NAME statvfsdev(), fstatvfsdev() - get file system information SYNOPSIS #include int statvfsdev(const char *path, struct statvfs *buf); int fstatvfsdev(int fildes, struct statvfs *buf); DESCRIPTION statvfsdev() returns information about the file system on the device file specified by path. The file system need not be mounted. fstatvfsdev() returns similar information for an open file.
statvfsdev(3C) statvfsdev(3C) [ESOCKETSHUTDOWN] Check with your system administrator to make sure the fsdaemon is running properly on your system. AUTHOR statvfsdev() and fstatvfsdev() were developed by HP. SEE ALSO bdf(1M), df(1M), stat(2), statvfs(2), fgetpos64(3S), thread_safety(5).
stdio(3S) stdio(3S) NAME stdio( ) - standard buffered input/output stream file package SYNOPSIS #include DESCRIPTION The Standard I/O functions described in the subsection (3S) entries of this manual constitute an efficient, user-level I/O buffering scheme. The getc() and putc() functions handle characters quickly.
stdio(3S) stdio(3S) STANDARDS CONFORMANCE stderr : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C stdin : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C stdout : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.
stdscr(3X) stdscr(3X) (ENHANCED CURSES) NAME stdscr — default window SYNOPSIS #include extern WINDOW *stdscr; DESCRIPTION The external variable stdscr specifies the default window used by functions that do not specify a window using an argument of type WINDOW *. Other windows may be created using newwin() . SEE ALSO derwin(3X), . CHANGE HISTORY First released in X/Open Curses, Issue 4.
strfmon(3C) strfmon(3C) NAME strfmon - convert monetary value to string SYNOPSIS #include ssize_t strfmon(char *__restrict s, size_t maxsize, const char *__restrict format, ...); Remarks The ANSI C ", ... " construct denotes a variable length argument list whose optional [or required] members are given in the associated comment (/* */ ). DESCRIPTION The strfmon() function places characters into the array pointed to by s as controlled by the string pointed to by format.
strfmon(3C) strfmon(3C) To ensure alignment, any characters appearing before or after the number in the formatted output such as currency or sign symbols are padded as necessary with space characters to make their positive and negative formats an equal length. Right Precision .
strfmon(3C) Conversion Specification %n %11n %#5n %=*#5n %=0#5n %ˆ#5n %ˆ#5.0n %ˆ#5.4n %(#5n %!(#5n strfmon(3C) Output Comments $123.45 -$123.45 $3,456.78 $123.45 -$123.45 $3,456.78 $ 123.45 -$ 123.45 $ 3,456.78 $***123.45 -$***123.45 $*3,456.78 $000123.45 -$000123.45 $03,456.78 $ 123.45 -$ 123.45 $ 3456.78 $ 123 -$ 123 $ 3457 $ 123.4500 -$ 123.4500 $ 3456.7810 $ 123.45 ($ 123.45) $ 3,456.78 123.45 ( 123.45) 3,456.
strftime(3C) strftime(3C) NAME strftime() - convert date and time to string SYNOPSIS #include size_t strftime( char *s, size_t maxsize, const char *format, const struct tm *timeptr ); DESCRIPTION The strftime() function converts the contents of a tm structure (see ctime(3C)) to a formatted date and time string. strftime() places characters into the array pointed to by s as controlled by the string pointed to by format.
strftime(3C) %w %W %x %X %y %Y %z %Z %% strftime(3C) is week 1. Weekday as a decimal number [0(Sunday),6]. Week number of the year (Monday as the first day of the week) as a decimal number [00,53]. All days in a new year preceding the first Monday are considered to be in week 0. Locale’s appropriate date representation. Locale’s appropriate time representation. Year without century as a decimal number [00,99]. Year with century as a decimal number.
strftime(3C) strftime(3C) Field Width and Precision An optional field width and precision specification can immediately follow the initial % of a directive in the following order: [-0]w The decimal digit string w specifies a minimum field width in which the result of the conversion is right- or left-justified. It is right-justified (with space padding) by default. If the optional flag - is specified, it is left-justified with space padding on the right.
strftime(3C) en_US.roman8 fr_FR.roman8 any* any* any* strftime(3C) %X %X %H:%M:%S %.1H:%.1M:%.1S %2.1H:%-3M:%03.1S 03:09:04 PM 15h09 04 15:09:04 15:9:4 15:9 :004 * The directives used in these examples are not affected by the LC_TIME category of the locale. WARNINGS If the arguments s and format are defined such that they overlap, the behavior is undefined. The function tzset() is called upon every invocation of strftime() (whether or not the time zone name is copied to the output array).
string(3C) string(3C) NAME string: strcasecmp(), strcat(), strchr(), strcmp(), strcoll(), strcpy(), strcspn(), strdup(), strlen(), strncasecmp(), strncat(), strncmp(), strncpy(), strpbrk(), strrchr(), strrstr(), strspn(), strstr(), strtok(), strtok_r(), strxfrm(), index(), rindex() - character string operations SYNOPSIS #include #include
string(3C) string(3C) unsigned char . Null pointer values for s1 and s2 are treated the same as pointers to empty strings. strncmp() makes the same comparison but examines a maximum of n characters (n less than or equal to zero yields equality). strcasecmp() and strncasecmp() are identical in function to strcmp() and strncmp() respectively, but characters are folded by _tolower() (see conv(3C)) prior to comparison. The returned lexicographic difference reflects the folding to lowercase.
string(3C) string(3C) strxfrm() offers better performance in, for example, a sorting routine where a number of strings are each transformed just once and the transformed versions are compared against each other many times. EXTERNAL INFLUENCES Locale The LC_CTYPE category determines the interpretation of the bytes within the string arguments to the strcoll() and strxfrm() functions as single and/or multibyte characters.
string(3C) string(3C) strncat() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C strncmp() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C strncpy() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C strpbrk() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C strrchr() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C strspn() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.
strord(3C) strord(3C) (TO BE OBSOLETED) NAME strord - convert string data order SYNOPSIS #include char *strord(char *s1, const char *s2, nl_mode m); DESCRIPTION The text orientation (mode) of a file can be right-to-left (non-Latin) or left-to-right (Latin). This text orientation can affect the way data is arranged in the file. The data arrangements that result are called screen order and keyboard order.
strptime(3C) strptime(3C) NAME strptime() - date and time conversion SYNOPSIS #include char *strptime(const char *buf, const char *format, struct tm *tm); DESCRIPTION The strptime() function converts the character string pointed to by buf to values which are stored in the tm structure pointed to by tm, using the format specified by format. The format is composed of zero or more directives.
strptime(3C) strptime(3C) considered to be in week 0. %x is the date, using the locale’s date format. %X is the time, using the locale’s time format. %y is the year within the century [0,99]; leading zeros are permitted but not required. If no century has been specified (for example, via the %C directive), the 20th century (1900s) is assumed for inputs in the range 69-99, and the 21st century (2000s) is assumed for inputs in the range 00-68. %Y is the year, including the century (for example, 1992).
strptime(3C) strptime(3C) maximum time representable by the time_t data type in 32-bit HP-UX (which represents Tuesday January 19 03:14:07 UTC, 2038) or if the date exceeds the maximum date supported in 64-bit HP-UX (which is Friday December 31 23:59:59 UTC, 9999), strptime() fails and a null pointer is returned. EXTERNAL INFLUENCES Environment Variables LC_NUMERIC may define the alternative symbols (alt_digit; see localedef(4)) used by the %O modifier.
strtoacl(3C) strtoacl(3C) NAME strtoacl(), strtoaclpatt(), aclentrystart - convert string form to access control list (ACL) structure, HFS file system only SYNOPSIS #include
strtoacl(3C) strtoacl(3C) The @ character for user and group IDs (see acl(5)) is converted to special values (ACL_FILEOWNER or ACL_FILEGROUP, respectively, defined in ), not to specific user or group names provided by the caller. Thus, strtoaclpatt() need not be called to reparse the ACL pattern for each file, but the caller must handle the special values when comparing an ACL pattern to an ACL.
strtoacl(3C) strtoacl(3C) of pointers equal to its return value plus one (never more than NACLENTRIES + 1). The last valid element points to the null character at the end of string. After calling strtoaclpatt(), an entry pattern’s corresponding input string can be used by the caller for error reporting by (temporarily) putting a null at the start of the next entry pattern in string.
strtoacl(3C) strtoacl(3C) if (setacl ("../myfile2", nentries, acl) < 0) error (...); The following code fragment calls strtoacl() with special values of fuid and fgid, then checks to see if they show up in acl[] . #include int perfile = 0; /* need to stat() and reparse per file? */ int entry; if ((nentries = strtoacl (string, 0, NACLENTRIES, acl, ACL_FILEOWNER, ACL_FILEGROUP)) < 0) { error (...); } for (entry = 0; entry < nentries; entry++) { if ((acl[entry].
strtoacl(3C) strtoacl(3C) FILES /etc/passwd /etc/group SEE ALSO getacl(2), setacl(2), acltostr(3C), cpacl(3C), chownacl(3C), setaclentry(3C), acl(5), thread_safety(5).
strtod(3C) strtod(3C) NAME strtod(), strtof(), strtold(), strtow(), strtoq(), atof() - convert string to floating-point number SYNOPSIS #include
strtod(3C) strtod(3C) RETURN VALUE If the correct value would cause overflow, strtod() returns +/-HUGE_VAL (equal to +/INFINITY ), according to the sign of the value, and sets errno to [ERANGE]. If the correct value would be nonzero but too small in magnitude to represent as a nonzero double , then strtod() returns zero and sets errno to [ERANGE].
strtoimax(3C) strtoimax(3C) NAME strtoimax( ), strtoumax( ) - convert string to integer SYNOPSIS #include intmax_t strtoimax(const char *__restrict str, char **__restrict int base); uintmax_t strtoumax(const char *__restrict str, char **__restrict int base); ptr, ptr, DESCRIPTION strtoimax() or strtoumax() converts the character string pointed to by str to intmax_t or uintmax_t representation, respectively. The string is scanned up to the first character inconsistent with the base.
strtol(3C) strtol(3C) NAME strtol(), atol(), atoll(), atoi(), strtoul(), strtoll(), strtoull() - convert string to integer SYNOPSIS #include
strtol(3C) strtol(3C) [EINVAL] The value of base is not supported. [ERANGE] The value to be returned would have caused overflow. AUTHOR These interfaces were developed by OSF and HP. SEE ALSO ctype(3C), strtod(3C), strtoimax(3C), scanf(3S), thread_safety(5), glossary(9). STANDARDS CONFORMANCE strtol() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, ANSI C atoi() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C atol() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.
subpad(3X) subpad(3X) (ENHANCED CURSES) NAME subpad — enhanced pad management function SYNOPSIS #include WINDOW *subpad(WINDOW *orig, int nlines, int ncols, int begin_y, int begin_x); DESCRIPTION The subpad() function creates a subwindow within a pad with nlines lines and ncols columns. Unlike subwin() , which uses screen coordinates, the window is at position (begin_y, begin_x) on the pad.
swab(3C) swab(3C) NAME swab( ) - swap bytes SYNOPSIS #include void swab(const void *from, void *to, ssize_t nbytes); DESCRIPTION swab() copies nbytes bytes pointed to by from to the array pointed to by to, exchanging adjacent even and odd bytes. It is useful for carrying binary data between byte-swapped and non-byte-swapped machines. nbytes should be even and non-negative. If nbytes is odd and positive swab() uses nbytes−1 instead. If nbytes is negative, swab() does nothing.
syncok(3X) syncok(3X) (ENHANCED CURSES) NAME syncok(), wcursyncup(), wsyncdown(), wsyncup() - synchronize a window with its parents or children SYNOPSIS #include int syncok(WINDOW *win , bool bf ); void wcursyncup(WINDOW *win ); void wsyncdown(WINDOW *win ); void wsyncup(WINDOW *win ); DESCRIPTION The syncok() function determines whether all ancestors of the specified window are implicitly touched whenever there is a change in the window. If bf is TRUE, such implicit touching occurs.
syslog(3C) syslog(3C) NAME syslog( ), openlog( ), closelog( ), setlogmask( ) - control system log SYNOPSIS #include void syslog(int priority, const char *message, ...); void openlog(const char *ident, int logopt, int facility); void closelog(void); int setlogmask(int maskpri); Remarks The ANSI C ", ... " construct denotes a variable length argument list whose optional [or required] members are given in the associated comment (/* */ ).
syslog(3C) syslog(3C) LOG_NOWAIT Do not wait for children forked to log messages on the console. This option should be used by processes that enable notification of child termination via SIGCLD , because syslog() might otherwise block, waiting for a child whose exit status has already been collected. facility encodes a default facility to be assigned to all messages written subsequently by syslog() with no explicit facility encoded. LOG_KERN Messages generated by the kernel.
syslog(3C) syslog(3C) EXAMPLES who logs a message regarding some sort of unexpected and serious error: syslog(LOG_ALERT, "who: internal error 23"); ftpd uses openlog() to arrange to log its process ID, to log to the console if necessary, and to log in the name of the daemon facility: openlog("ftpd", LOG_PID|LOG_CONS, LOG_DAEMON); Arrange to log messages only at levels LOG_ERR and lower: setlogmask(LOG_UPTO(LOG_ERR)); Typical usage of syslog() to log a connection: syslog(LOG_INFO, "Connection from host %
system(3S) system(3S) NAME system( ) - issue a shell command SYNOPSIS #include int system(const char *command); DESCRIPTION system() executes the command specified by the string pointed to by command.
system(3S) system(3S) STANDARDS CONFORMANCE system() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.
t_accept(3) t_accept(3) NAME t_accept() - accept a connect request SYNOPSIS #include /* for X/OPEN Transport Interface - XTI */ /* or */ #include /* for Transport Layer Interface - TLI */ int t_accept (fd, resfd, call); int fd; int resfd; struct t_call *call; DESCRIPTION The t_accept() function is issued by a transport user to accept a connect request. fd identifies the local transport endpoint where the connect indication arrived.
t_accept(3) t_accept(3) resfd (fd != resfd): T_IDLE Caveats There may be transport provider-specific restrictions on address binding. Some transport providers do not differentiate between a connect indication and the connection itself. If the connection has already been established after a successful return of t_listen() , t_accept() will assign the existing connection to the transport endpoint specified by resfd. Fork Safety t_accept is not fork-safe.
t_accept(3) /usr/include/tiuser.h t_accept(3) TLI data structures SEE ALSO t_connect(3), t_getstate(3), t_listen(3), t_open(3), t_rcvconnect(3), thread_safety(5).
t_alloc(3) t_alloc(3) NAME t_alloc() - allocate transport function library structure SYNOPSIS #include /* for X/OPEN Transport Interface - XTI */ — or — #include /* for Transport Layer Interface - TLI char *t_alloc (fd, struct_type, fields); int fd; int struct_type; int fields; */ DESCRIPTION The t_alloc() function dynamically allocates memory for the various transport function argument structures as specified below.
t_alloc(3) t_alloc(3) ERRORS On failure, t_errno is set to one of the following: [TBADF] fd, the specified endpoint identifier, does not refer to a transport endpoint. [TSYSERR] A system error has occurred during execution of this function. [TPROTO] (XTI only) This error indicates that a communication problem has been detected between XTI and the transport provider for which there is no suitable XTI (t_errno ). [TNOSTRUCTYPE] Unsupported struct_type requested.
t_bind(3) t_bind(3) NAME t_bind() - bind an address to a transport endpoint SYNOPSIS #include /* or */ #include int t_bind (fd, req, ret); int fd; struct t_bind *req; struct t_bind *ret; /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ DESCRIPTION The t_bind() function associates a protocol address with the transport endpoint specified by fd and activates that transport endpoint.
t_bind(3) t_bind(3) If fd refers to a connection-mode service, this function allows more than one transport endpoint to be bound to the same protocol address (however, the transport provider must also support this capability), but it is not possible to bind more than one protocol address to the same transport endpoint. If a user binds more than one transport endpoint to the same protocol address, only one endpoint can be used to listen for the connect indications associated with that protocol address.
t_bind(3) [TPROTO] t_bind(3) (XTI only) This error indicates that a communication problem has been detected between XTI and the transport provider for which there is no suitable XTI (t_errno ). FILES /usr/include/xti.h /usr/include/xti_iso.h /usr/include/tiuser.h XTI data structures XTI data structures TLI data structures SEE ALSO t_alloc(3), t_close(3), t_open(3), t_unbind(3), thread_safety(5).
t_close(3) t_close(3) NAME t_close() - close a transport endpoint SYNOPSIS #include /* or */ #include int t_close (fd); int fd; /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ DESCRIPTION The t_close() function informs the transport provider that the user is finished with the transport endpoint specified by fd, and frees any local library resources associated with the endpoint.
t_connect(3) t_connect(3) NAME t_connect() - establish a connection with another transport user SYNOPSIS #include /* for X/OPEN Transport Interface - XTI */ /* or */ #include /* for Transport Layer Interface - TLI */ int t_connect (fd, sndcall, rcvcall); int fd; struct t_call *sndcall; struct t_call *rcvcall; DESCRIPTION This function enables a transport user to request a connection to the specified destination transport user. This function can only be issued in the T_IDLE state.
t_connect(3) t_connect(3) By default, t_connect() executes in synchronous mode and will wait for the destination user’s response before returning control to the local user. A successful return (i.e., return value of zero) indicates that the requested connection has been established. However, if O_NONBLOCK is set (via t_open() or fcntl() ), t_connect() executes in asynchronous mode.
t_connect(3) t_connect(3) STANDARDS CONFORMANCE t_connect() : SVID2, XPG3, XPG4 t HP-UX 11i Version 3: February 2007 −3− Hewlett-Packard Company 515
t_error(3) t_error(3) NAME t_error() - produce error message SYNOPSIS #include /* or */ #include void t_error (errmsg); char *errmsg; extern int t_errno; extern char *t_errlist[]; extern int t_nerr; /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ DESCRIPTION The t_error() function produces a language-dependent message on the standard error output which describes the last error encountered during a call to a transport function.
t_error(3) t_error(3) SEE ALSO thread_safety(5).
t_free(3) t_free(3) NAME t_free() - free a library structure SYNOPSIS #include /* for X/OPEN Transport Interface - XTI */ /* or */ #include /* for Transport Layer Interface - TLI */ int t_free (ptr, struct_type); char *ptr; int struct_type; DESCRIPTION The t_free() function frees memory previously allocated by t_alloc() . This function will free memory for the specified structure and will also free memory for buffers referenced by the structure.
t_getinfo(3) t_getinfo(3) NAME t_getinfo() - get protocol-specific service information SYNOPSIS #include /* or */ #include int t_getinfo (fd, info); int fd; struct info *info; /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ DESCRIPTION The t_getinfo() function returns the current characteristics of the underlying transport protocol associated with file descriptor fd. The info structure is used to return the same information returned by t_open() .
t_getinfo(3) t_getinfo(3) t_rcvconnect(). A value of −1 specifies that there is no limit on the amount of data sent during connection establishment. A value of −2 specifies that the transport provider does not allow data to be sent with connection establishment functions. discon A value greater than or equal to zero specifies the maximum amount of data that may be associated with the t_snddis() and t_rcvdis() functions.
t_getprotaddr(3) t_getprotaddr(3) NAME t_getprotaddr() - get the protocol address SYNOPSIS #include /* for X/OPEN Transport Interface - XTI */ int t_getprotaddr (fd, boundaddr, perraddr); int fd; struct t_bind *boundaddr; struct t_bind *peeraddr; DESCRIPTION The t_getprotaddr() function returns local and remote protocol addresses currently associated with the transport endpoint specified by fd.
t_getstate(3) t_getstate(3) NAME t_getstate() - get the current state SYNOPSIS #include /* or */ #include int t_getstate (fd); int fd; /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ DESCRIPTION The t_getstate() function returns the current state of the provider as seen by the application associated with the transport endpoint specified by fd. Fork Safety t_getstate is not fork-safe. RETURN VALUE State is returned upon successful completion.
t_listen(3) t_listen(3) NAME t_listen() - listen for a connect request SYNOPSIS #include /* or */ #include int t_listen (fd, call); int fd; struct t_call *call; /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ DESCRIPTION The t_listen() function listens for a connect request from a calling transport user. fd identifies the local transport endpoint where connect indications arrive.
t_listen(3) t_listen(3) ERRORS On failure, t_errno is set to the following: [TBADF] The specified identifier does not refer to a transport endpoint. [TBADQLEN] The argument qlen of the endpoint referenced by fd is zero. [TBUFOVFLW] The number of bytes allocated for an incoming argument (maxlen) is not sufficient to store the value of that argument. The provider’s state, as seen by the user, changes to T_INCON, and the connect indication information to be returned in call is discarded.
t_look(3) t_look(3) NAME t_look() - look at the current event on a transport endpoint SYNOPSIS #include /* or */ #include int t_look (fd); int fd; /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ DESCRIPTION The t_look() function returns the current event on the transport endpoint specified by fd. This function enables a transport provider to notify a transport user of an asynchronous event when the user is calling functions in synchronous mode.
t_look(3) t_look(3) SEE ALSO t_open(3), t_snd(3), t_sndudata(3), thread_safety(5).
t_open(3) t_open(3) NAME t_open() - establish a transport endpoint SYNOPSIS #include #include /* for X/OPEN Transport Interface - XTI */ /* or */ #include /* for Transport Layer Interface - TLI */ int t_open (name, oflag, info); char *name; int oflag; struct t_info *info; DESCRIPTION The t_open() function must be called as the first step in the initialization of a transport endpoint.
t_open(3) t_open(3) A value of zero specifies that the transport provider does not support the concept of TSDU, although it does support the sending of a data stream with no logical boundaries preserved across a connection. A value of −1 specifies that there is no limit on the size of a TSDU. A value of −2 specifies that the transfer of normal data is not supported by the transport provider. etsdu A value greater than zero specifies the maximum size of an expedited transport service data unit (ETSDU).
t_open(3) t_open(3) Fork Safety t_open is not fork-safe. RETURN VALUE A valid endpoint identifier is returned upon successful completion. Otherwise, a value of −1 is returned and t_errno is set to indicate an error. HP OSI does not support the T_COTS_ORD servtype. ERRORS On error, t_errno is set to one of the following: [TBADFLAG] An invalid flag is specified. [TBADNAME] Invalid transport provider name. [TSYSERR] A system error has occurred during execution of this function.
t_optmgmt(3) t_optmgmt(3) NAME t_optmgmt() - manage options for a transport endpoint SYNOPSIS #include /* for X/OPEN Transport Interface - XTI */ /* or */ #include /* for Transport Layer Interface - TLI */ int t_optmgmt (fd, req, ret); int fd; struct t_optmgmt *req; struct t_optmgmt *ret; DESCRIPTION The t_optmgmt() function enables a transport user to retrieve, verify or negotiate protocol options with the transport provider. The argument fd identifies a bound transport endpoint.
t_optmgmt(3) t_optmgmt(3) The flags field of req must specify one of the following actions: T_NEGOTIATE This action enables the transport user to negotiate option values. The user specifies the options of interest and their values in the buffer specified by req->opt.buf and req->opt.len. The negotiated option values are returned in the buffer pointed to by ret->opt.buf. The status field of each returned option is set to indicate the result of the negotiation.
t_optmgmt(3) t_optmgmt(3) For each level, the option T_ALLOPT can be requested on input. All supported options of this level with their default values are then returned. In this case, ret>opt.maxlen must be given at least the value info->options (see t_getinfo(3), t_open(3)) before the call. T_CURRENT This action enables the transport user to retrieve the currently effective option values. The user specifies the options of interest in req->opt.buf.
t_optmgmt(3) t_optmgmt(3) close() or t_close() is issued and the send buffer is not empty, the system attempts to send the pending data within the linger period before closing the endpoint. Data still pending after the linger period has elapsed is discarded. Depending on the implementation, t_close() or close() either block for at maximum the linger period, or immediately return, whereupon the system holds the connection in existence for at most the linger period.
t_optmgmt(3) t_optmgmt(3) they are sent. This request is not an absolute requirement. The implementation may place upper and lower limits on the option value. Requests that fall short of the lower limit are negotiated to the lower limit. Legal values are all positive numbers. Valid States All - apart from T_UNINIT . Fork Safety t_optmgmt is not fork-safe. RETURN VALUE Upon successful completion, a value of 0 is returned. Otherwise, a value of −1 is returned, and t_errno is set to indicate the error.
t_rcv(3) t_rcv(3) NAME t_rcv() - receive data or expedited data sent over a connection SYNOPSIS #include /* for X/OPEN Transport Interface - XTI */ /* or */ #include /* for Transport Layer Interface - TLI */ int t_rcv (fd, buf, nbytes, flags); int fd; char *buf; unsigned nbytes; int *flags; DESCRIPTION The t_rcv() function receives either normal or expedited data. fd identifies the local transport endpoint through which data will arrive.
t_rcv(3) t_rcv(3) [TBADF] The specified identifier does not refer to a transport endpoint. [TNODATA] O_NONBLOCK was set, but no data is currently available from the transport provider. [TLOOK] An asynchronous event has occurred on this transport endpoint and requires immediate attention. [TNOTSUPPORT] This function is not supported by the underlying transport provider. [TOUTSTATE] (XTI only) The function was issued in the wrong sequence on the endpoint referenced by fd.
t_rcvconnect(3) t_rcvconnect(3) NAME t_rcvconnect() - receive the confirmation from a connect request SYNOPSIS #include /* for X/OPEN Transport Interface - XTI */ /* or */ #include /* for Transport Layer Interface - TLI */ int t_rcvconnect (fd, call); int fd; struct t_call *call; DESCRIPTION The t_rcvconnect() function enables a calling transport user to determine the status of a previously sent connect request.
t_rcvconnect(3) t_rcvconnect(3) [TBADF] The specified identifier does not refer to a transport endpoint. [TBUFOVFLW] The number of bytes allocated for an incoming argument is not sufficient to store the value of that argument and the connect information to be returned in call will be discarded. The provider’s state, as seen by the user, will be changed to T_DATAXFER . [TNODATA] O_NONBLOCK was set, but a connect confirmation has not yet arrived.
t_rcvdis(3) t_rcvdis(3) NAME t_rcvdis() - retrieve information from disconnect SYNOPSIS #include /* or */ #include int t_rcvdis (fd, discon); int fd; struct t_discon *discon; /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ DESCRIPTION The t_rcvdis() function is used to identify the cause of a disconnect, and to retrieve any user data sent with the disconnect. fd identifies the local transport endpoint where the connection existed.
t_rcvdis(3) [TOUTSTATE] t_rcvdis(3) (XTI only) This function was issued in the wrong sequence on the transport endpoint referenced by fd. [TSYSERR] A system error has occurred during execution of this function. [TPROTO] (XTI only) This error indicates that a communication problem has been detected between XTI and the transport provider for which there is no existing XTI (t_errno ). SEE ALSO t_alloc(3), t_connect(3), t_listen(3), t_open(3), t_snddis(3), thread_safety(5).
t_rcvrel(3) t_rcvrel(3) NAME t_rcvrel() - acknowledge receipt of an orderly release indication at a transport endpoint SYNOPSIS #include /* or */ #include int t_rcvrel (fd); int fd; /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ DESCRIPTION The t_rcvrel() function is used in connection-oriented mode to acknowledge receipt of an orderly release indication at a transport endpoint.
t_rcvudata(3) t_rcvudata(3) NAME t_rcvudata() - receive a data unit from remote transport provider user SYNOPSIS #include /* for X/OPEN Transport Interface - XTI */ /* or */ #include /* for Transport Layer Interface - TLI */ int t_rcvudata (fd, unitdata, flags); inf fd; struct t_unitdata *unitdata; int *flags; DESCRIPTION The t_rcvudata() function is used in connectionless-mode to receive a data unit from a remote transport provider user.
t_rcvudata(3) t_rcvudata(3) [TBUFOVFLW] The number of bytes allocated for the incoming protocol address or protocol options is not sufficient to store the information. The unit data information normally returned in unitdata is discarded. [TLOOK] An asynchronous event has occurred on this transport endpoint required immediate attention. [TNOTSUPPORT] This function is not supported by the underlying transport provider.
t_rcvuderr(3) t_rcvuderr(3) NAME t_rcvuderr() - receive a unit data error indication SYNOPSIS #include /* for X/OPEN Transport Interface - XTI */ /* or */ #include /* for Transport Layer Interface - TLI */ int t_rcvuderr (fd, uderr); int fd; struct t_uderr *uderr; DESCRIPTION The t_rcvuderr() function is used in connectionless mode to receive information concerning an error on a previously sent data unit. This function should only be issued following a unit data error indication.
t_rcvuderr(3) [TPROTO] t_rcvuderr(3) (XTI only) This error indicates that a communication problem has been detected between XTI and the transport provider for which there is no other suitable XTI (t_errno ). SEE ALSO t_look(3), t_rcvudata(3), t_sndudata(3), thread_safety(5).
t_snd(3) t_snd(3) NAME t_snd() - send data or expedited data over a connection SYNOPSIS #include /* for X/OPEN Transport Interface - XTI */ /* or */ #include /* for Transport Layer Interface - TLI */ int t_snd (fd, buf, nbytes, flags); int fd; char *buf; unsigned nbytes; int flags; DESCRIPTION This function is used to send either normal or expedited data.
t_snd(3) t_snd(3) Caveats It is important to remember that the transport provider treats all users of a transport endpoint as a single user. Therefore, if several processes issue concurrent t_snd() calls then the different data may be intermixed. Multiple sends which exceed the maximum TSDU or ETSDU size may not be discovered by XTI. In this case, an implementation-dependent error will result (generated by the transport provider) perhaps on a subsequent XTI call.
t_snddis(3) t_snddis(3) NAME t_snddis() - send user-initiated disconnect request SYNOPSIS #include /* or */ #include int t_snddis (fd, call); int fd; struct t_call *call; /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ DESCRIPTION The t_snddis() function is used to initiate an abortive release on an already established connection or to reject a connect request.
t_snddis(3) t_snddis(3) [TBADSEQ] An invalid sequence was specified, or a null call pointer was specified when rejecting a connect request. Some outbound data queued for this endpoint may be lost. [TLOOK] An asynchronous event has occurred on this transport endpoint and requires immediate attention. [TNOTSUPPORT] This function is not supported by the underlying transport provider. [TSYSERR] A system error has occurred during execution of this function.
t_sndrel(3) t_sndrel(3) NAME t_sndrel() - initiate an orderly release SYNOPSIS #include /* or */ #include int t_sndrel (fd); int fd; /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ DESCRIPTION The t_sndrel() function is used in connection-oriented mode to initiate an orderly release at a transport endpoint specified by fd, which is a file descriptor previously returned by the t_open() function.
t_sndudata(3) t_sndudata(3) NAME t_sndudata() - send a data unit SYNOPSIS #include /* for X/OPEN Transport Interface - XTI */ /* or */ #include /* for Transport Layer Interface - TLI ) int t_sndudata(fd, unitdata); int fd; struct t_unitdata *unitdata; DESCRIPTION The t_sndudata() function is used in connectionless mode to send a data unit to another transport user. The argument fd identifies the local transport endpoint through which data is sent.
t_sndudata(3) [TLOOK] t_sndudata(3) (XTI only) An asynchronous event has occurred on this transport endpoint and requires immediate attention. [TNOTSUPPORT] This function is not supported by the underlying transport provider. [TOUTSTATE] (XTI only) The t_sndudata() function was issued in the wrong sequence on the transport endpoint referenced by the fd parameter. [TSYSERR] A system error occurred during execution of this function.
t_strerror(3) t_strerror(3) NAME t_strerror() - produce an error message string SYNOPSIS #include char *t_strerror (errnum); int errnum; /* for X/OPEN Transport Interface - XTI */ DESCRIPTION The t_strerror() function maps the error number in errnum that corresponds to an XTI (X/OPEN Transport Interface) error to a language-dependent error message string and returns a pointer to the string.
t_sync(3) t_sync(3) NAME t_sync() - synchronize transport library SYNOPSIS #include /* or */ #include int t_sync (fd); int fd; /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ DESCRIPTION For the transport endpoint specified by fd, the t_sync() function synchronizes the data structures managed by the transport library with information from the underlying transport provider.
t_sync(3) t_sync(3) SEE ALSO t_open(3), t_getstate(3), dup(2), exec(2), fork(2), open(2), thread_safety(5).
t_unbind(3) t_unbind(3) NAME t_unbind() - disable a transport endpoint SYNOPSIS #include /* or */ #include int t_unbind (fd); int fd; /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ DESCRIPTION The t_unbind() function disables the transport endpoint specified by fd which was previously bound by t_bind() . On completion of this call, no further data or events destined for this transport endpoint will be accepted by the transport provider.
tan(3M) tan(3M) NAME tan( ), tanf( ), tanl( ), tanw( ), tanq( ) - tangent functions SYNOPSIS #include double tan(double x); float tanf(float x); HP Integrity Server Only long double tanl(long double x); extended tanw(extended x); quad tanq(quad x); DESCRIPTION tan() returns the tangent of x (x specified in radians). On PA-RISC systems, tan() may lose accuracy when x is far from zero. tanf() is a float version of tan() ; it takes a float argument and returns a float result.
tand(3M) tand(3M) NAME tand( ), tandf( ), tandl( ), tandw( ), tandq( ) - tangent functions of an argument specified in degrees SYNOPSIS #include double tand(double x); float tandf(float x); HP Integrity Server Only long double tandl(long double x); extended tandw(extended x); quad tandq(quad x); DESCRIPTION tand() returns the tangent of x (x specified in degrees). On PA-RISC systems, tand() may lose accuracy when x is far from zero.
tanh(3M) tanh(3M) NAME tanh( ), tanhf( ), tanhl( ), tanhw( ), tanhq( ) - hyperbolic tangent functions SYNOPSIS #include double tanh(double x); float tanhf(float x); HP Integrity Server Only long double tanhl(long double x); extended tanhw(extended x); quad tanhq(quad x); DESCRIPTION tanh() returns the hyperbolic tangent of x. tanhf() is a float version of tanh() ; it takes a float argument and returns a float result.
tcattribute(3C) tcattribute(3C) NAME tcgetattr( ), tcsetattr( ) - control tty device SYNOPSIS #include int tcgetattr(int fildes, struct termios *termios_p); int tcsetattr( int fildes, int optional_actions, const struct termios *termios_p ); DESCRIPTION tcgetattr() gets the parameters associated with fildes and stores them in the termios structure referenced by termios_p . If the terminal device does not support split baud rates, the input baud rate stored in the termios structure is zero.
tccontrol(3C) tccontrol(3C) NAME tcsendbreak( ), tcdrain( ), tcflush( ), tcflow( ) - tty line control functions SYNOPSIS #include int tcsendbreak(int fildes, int duration); int tcdrain(int fildes); int tcflush(int fildes, int queue_selector); int tcflow(int fildes, int action); DESCRIPTION If the terminal is using asynchronous serial data transmission, tcsendbreak() causes transmission of a continuous stream of zero-valued bits for a specific duration.
tcgetpgrp(3C) tcgetpgrp(3C) NAME tcgetpgrp( ) - get foreground process group id SYNOPSIS #include pid_t tcgetpgrp(int fildes); DESCRIPTION tcgetpgrp() returns the value of the process group ID of the foreground process group associated with the terminal referenced by fildes. tcgetpgrp() is allowed from a process that is a member of a background process group (see termio(7)); however, the information can be subsequently changed by a process that is a member of a foreground process group.
tcgetsid(3C) tcgetsid(3C) NAME tcgetsid() - get terminal session ID SYNOPSIS #include pid_t tcgetsid (int fildes); DESCRIPTION The tcgetsid() function returns the value of the session ID of the foreground process associated with the terminal referenced by fildes. tcgetsid() is allowed from a process that is a member of a background process group (see termio(7)).
tcsetpgrp(3C) tcsetpgrp(3C) NAME tcsetpgrp( ) - set foreground process group id SYNOPSIS #include int tcsetpgrp(int fildes, pid_t pgrp_id); DESCRIPTION If the calling process has a controlling terminal, tcsetpgrp() sets the foreground process group ID associated with the terminal referenced by fildes to pgrp_id.
termattrs(3X) termattrs(3X) (ENHANCED CURSES) NAME termattrs, term_attrs — get supported terminal video attributes SYNOPSIS #include chtype termattrs(void); attr_t term_attrs(void); DESCRIPTION The termattrs() function extracts the video attributes of the current terminal. That are supported by the chtype data type. The term_attrs() function extracts the video attributes of the current terminal. That are supported for a cchar_t data type.
termcap(3X) termcap(3X) (TO BE OBSOLETED) NAME termcap: tgetent(), tgetflag(), tgetnum(), tgetstr(), tgoto(), tputs() - emulate /usr/share/lib/termcap access routines SYNOPSIS #include
termcap(3X) termcap(3X) (TO BE OBSOLETED) FILES /usr/lib/libcurses.a -lcurses library /usr/share/lib/terminfo/?/* data bases SEE ALSO ex(1), terminfo(4), termio(7).
termname(3X) termname(3X) (ENHANCED CURSES) NAME termname — get terminal name SYNOPSIS #include char *termname(void); DESCRIPTION The termname() function obtains the terminal name as recorded by setupterm() . RETURN VALUE The termname() function returns a pointer to the terminal name. ERRORS No errors are defined.
tgamma(3M) tgamma(3M) (HP Integrity Server Only) NAME tgamma( ), tgammaf( ), tgammal( ), tgammaw( ), tgammaq( ) - true gamma functions SYNOPSIS #include double tgamma(double x); float tgammaf(float x); long double tgammal(long double x); extended tgammaw(extended x); quad tgammaq(quad x); DESCRIPTION The tgamma() function computes the true gamma function of x. In contrast, the lgamma() , lgamma_r() , and gamma() functions compute the log of gamma.
tigetflag(3X) tigetflag(3X) (ENHANCED CURSES) NAME tigetflag(), tigetnum(), tigetstr(), tparm() - retrieve capabilities from the terminfo database SYNOPSIS #include
tmpfile(3S) tmpfile(3S) NAME tmpfile( ) - create a temporary file SYNOPSIS #include FILE *tmpfile(void); DESCRIPTION tmpfile() creates a temporary file by generating a name through tmpnam() (see tmpnam(3S)), and returns a corresponding FILE pointer. If the file cannot be opened a NULL pointer is returned. The file is automatically deleted when the process using it terminates. The file is opened for update (wb+ ). Notes On HP-UX systems, the wb+ mode is equivalent to the w+ mode.
tmpnam(3S) tmpnam(3S) NAME tmpnam( ), tempnam( ) - create a name for a temporary file SYNOPSIS #include char *tmpnam(char *s); char *tempnam(const char *dir, const char *pfx); DESCRIPTION tmpnam() and tempnam() generate file names that can safely be used for a temporary file. tmpnam() Always generates a file name using the path-prefix defined as P_tmpdir in the header file. If s is NULL, tmpnam() leaves its result in an internal static area and returns a pointer to that area.
touchwin(3X) touchwin(3X) (CURSES) NAME touchwin — window refresh control function SYNOPSIS #include int touchwin(WINDOW *win); DESCRIPTION The touchwin() function touches the specified window (that is, marks it as having changed more recently than the last refresh operation). RETURN VALUE Upon successful completion, the this function return OK. Otherwise, it returns ERR. ERRORS No errors are defined.
towctrans(3C) towctrans(3C) NAME towctrans(), wctrans() - character transliteration SYNOPSIS #include wint_t towctrans(wint_t wc, wctrans_t desc); wctrans_t wctrans(const char *charclass); DESCRIPTION towctrans() The towctrans() function transliterates the wide-character code wc using the mapping described by desc. The current setting of the LC_CTYPE category should be the same as during the call to wctrans() that returned the value desc.
trunc(3M) trunc(3M) NAME trunc( ), truncf( ), truncl( ), truncw( ), truncq( ) - truncation functions SYNOPSIS #include double trunc(double x); HP Integrity Server Only float truncf(float x); long double truncl(long double x); extended truncw(extended x); quad truncq(quad x); DESCRIPTION The trunc() function rounds its argument to the integral value, in floating-point format, nearest to but no larger in magnitude than the argument.
tsearch(3C) tsearch(3C) NAME tsearch(), tfind(), tdelete(), twalk() - manage binary search trees SYNOPSIS #include
tsearch(3C) tsearch(3C) EXAMPLES The following code reads strings, and stores structures containing a pointer to each string and a count of its length. It then walks the tree, printing out the stored strings and their lengths in alphabetical order. #include #include #include #include
tsearch(3C) tsearch(3C) /* This routine prints out a node, the first time twalk encounters it. */ void print_node(element, order, level) void *element; VISIT order; int level; { if (order == preorder || order == leaf) { (void) printf("string = %20s, length = %d\n", (*(struct element **) element)->string, (*(struct element **) element)->length); } } RETURN VALUE A NULL pointer is returned by tsearch() if there is not enough space available to create a new node.
ttyname(3C) ttyname(3C) NAME ttyname( ), ttyname_r( ), isatty( ) - find name of a terminal SYNOPSIS #include char *ttyname(int fildes); int ttyname_r(int fildes, char *buffer, size_t buflen); int isatty(int fildes); DESCRIPTION ttyname() returns a pointer to a string containing the null-terminated path name of the terminal device associated with file descriptor fildes. isatty() returns 1 if fildes is associated with a terminal device, 0 otherwise.
ttyslot(3C) ttyslot(3C) (TO BE OBSOLETED) NAME ttyslot( ) - find the slot in the utmpx file of the current user SYNOPSIS #include int ttyslot(void); DESCRIPTION ttyslot() returns the index of the current user’s entry in the /etc/utmpx file. This is accomplished by scanning /etc/utmpx for the name of the terminal associated with the standard input, standard output, or standard error (file descriptor 0, 1 or 2).
typeahead(3X) typeahead(3X) (CURSES) NAME typeahead — control checking for typeahead SYNOPSIS #include int typeahead(int fildes); DESCRIPTION The typeahead() function controls the detection of typeahead during a refresh, based on the value of fildes: • If fildes is a valid file descriptor, typeahead is enabled during refresh; Curses periodically checks fildes for input and aborts the refresh if any character is available.
U_STACK_TRACE(3X) U_STACK_TRACE(3X) (Itanium(R)-based System Only) NAME U_STACK_TRACE(), _UNW_STACK_TRACE() - produce a trace back of the procedure call stack using the unwind library SYNOPSIS #include void U_STACK_TRACE(); _UNW_ReturnCode _UNW_STACK_TRACE(FILE * out_file); DESCRIPTION U_STACK_TRACE() prints a formatted stack trace to standard error. _UNW_STACK_TRACE() produces a formatted stack trace on the output stream indicated by parameter out_file.
uc_access(3) Integrity Systems Only uc_access(3) NAME uc_access: __uc_get_ar(), __uc_get_ar_bsp(), __uc_get_ar_bspstore(), __uc_get_ar_ccv(), __uc_get_ar_csd(), __uc_get_ar_ec(), __uc_get_ar_fpsr(), __uc_get_ar_lc(), __uc_get_ar_pfs(), __uc_get_ar_rsc(), __uc_get_ar_ssd(), __uc_get_ar_unat(), __uc_get_brs(), __uc_get_cfm(), __uc_get_cr(), __uc_get_ed(), __uc_get_frs(), __uc_get_grs(), __uc_get_ip(), __uc_get_prs(), __uc_get_reason(), __uc_get_rsebs(), __uc_get_rsebs64(), __uc_get_um(), __uc_set_ar(), __u
uc_access(3) int int int int int int int int int int int int int int int int int int int Integrity Systems Only uc_access(3) __uc_get_ar_unat(const ucontext_t *ucp, uint64_t *value); __uc_set_ar_unat(ucontext_t *ucp, uint64_t value); __uc_get_ar_fpsr(const ucontext_t *ucp, fpsr_t *value); __uc_set_ar_fpsr(ucontext_t *ucp, fpsr_t value); __uc_get_ar_pfs(const ucontext_t *ucp, pfs_t *value); __uc_set_ar_pfs(ucontext_t *ucp, pfs_t value); __uc_get_ar_lc(const ucontext_t *ucp, uint64_t *value); __uc_set_ar_
uc_access(3) uc_access(3) Integrity Systems Only If the context was created in a syscall, scratch registers (GR2, GR3 and GR14-GR31) will read as values[ X ] == 0, (NaT >> X ) && 1 == 1. __uc_set_grs() Overwrites the saved values of the Static General Registers in the range first through first + count -1 inclusive, with the contents of the first count elements of the values[] array, and overwrites the corresponding NaT bits with bits from the NaT argument.
uc_access(3) uc_access(3) Integrity Systems Only If the context was created while handling an interruption, the instruction slot indicated by the 2 low-order bits of value will be the next instruction to execute. If the context was created in a syscall, an attempt to set the instruction slot to a non-zero value will return [EINVAL]. __uc_get_cfm() Returns (in the value argument) the saved value of the Current Frame Marker Register.
uc_access(3) uc_access(3) Integrity Systems Only created in a syscall, the value is undefined. __uc_set_ar_ccv() Overwrites the saved value of the AR.CCV register with value . If the context was created in a syscall, this call returns [EINVAL] with no other side-effects. __uc_get_ar_unat() Returns (in the value argument) the saved value of the AR.UNAT register. __uc_set_ar_unat() Overwrites the saved value of the AR.UNAT register with value .
uc_access(3) uc_access(3) Integrity Systems Only The following Control Registers may be specified: Reg 17 20 22 Register Notes CR_ISR CR_IFA Only valid for certain types of interruptions. CR_IIPA If the context was created in a syscall, the control registers will read as 0. __uc_get_rsebs(), __uc_set_rsebs(), __uc_get_rsebs64(), __uc_set_rsebs64 When a signal handler is invoked, the kernel attempts to write all dirty RSE registers to the original RSE backing store.
uc_access(3) uc_access(3) Integrity Systems Only [EINVAL] For the __uc_set_ip() call, ucp was created by a syscall and the low-order two bits of value are not zero, or ucp was not created by a syscall and the low-order two bits of value are 0x3 . [EINVAL] For the __uc_set_cfm() call, bits outside the range 37:0 are set. [[EINVAL] For the __uc_set_um() call, bits outside the range 5:1 are set.
ug_display_width(3C) ug_display_width(3C) NAME ug_display_width() - get current display width for user and group names SYNOPSIS #include int ug_display_width(void); DESCRIPTION The ug_display_width() function returns the current display width for user and group names. This value determines how many bytes of a user or group name that system and conforming applications will display.
unctrl(3X) unctrl(3X) (CURSES) NAME unctrl — generate printable representation of a character SYNOPSIS #include char *unctrl(chtype c); DESCRIPTION The unctrl() function generates a character string that is a printable representation of c. If c is a control character, it is converted to the ˆX notation. If c contains rendition information, the effect is undefined. RETURN VALUE Upon successful completion, unctrl() returns the generated string. Otherwise, it returns a null pointer.
ungetc(3S) ungetc(3S) NAME ungetc( ) - push character back into input stream SYNOPSIS #include int ungetc(int c, FILE *stream); Obsolescent Interface int ungetc_unlocked(int c, FILE *stream); DESCRIPTION ungetc() inserts the character c (converted to an unsigned char) into the buffer associated with an input stream. That character, c, is returned by the next call to getc() (see getc(3S)) on that stream.
ungetch(3X) ungetch(3X) (ENHANCED CURSES) NAME ungetch, unget_wch — push a character onto the input queue SYNOPSIS #include int ungetch(int ch); int unget_wch(const wchar_t wch); DESCRIPTION The ungetch() function pushes the single-byte character ch onto the head of the input queue. The unget_wch() function pushes the wide character wch onto the head of the input queue. One character of push-back is guaranteed.
ungetwc(3C) ungetwc(3C) NAME ungetwc( ) - push a wide character back into an input stream SYNOPSIS #include wint_t ungetwc(wint_t wc, FILE *stream); Obsolescent Interface wint_t ungetwc_unlocked(wint_t wc, FILE *stream); Remarks: This function is compliant with the XPG4 Worldwide Portability Interface wide-character I/O functions. It parallels the 8-bit character I/O function defined in ungetc(3S).
unlockpt(3C) unlockpt(3C) NAME unlockpt - unlock a STREAMS pty master and slave pair SYNOPSIS int unlockpt (int fildes); DESCRIPTION The passed parameter, fildes, is a file descriptor that is returned from a successful open of a master pty (pseudo-terminal) device. The unlockpt() function unlocks a slave pty from its associated master counterpart. It does this by clearing a lock flag so that the slave pty can be opened. For security reason, grantpt(3C) must be executed before unlockpt(3C).
use_env(3X) use_env(3X) (ENHANCED CURSES) NAME use_env — specify source of screen size information SYNOPSIS #include void use_env(bool boolvalue); DESCRIPTION The use_env() function specifies the technique by which the implementation determines the size of the screen. If boolvalue is FALSE, the implementation uses the values of lines and columns specified in the terminfo database. If boolvalue is TRUE, the implementation uses the LINES and COLUMNS environment variables.
userdb_read(3) userdb_read(3) NAME userdb_read(), userdb_write(), userdb_delete() - read, write or delete information in the user database, /var/adm/userdb SYNOPSIS #include
userdb_read(3) USERDB_DISABLED USERDB_INVALID_USERNAME USERDB_NOT_LOCAL_USER userdb_read(3) the database is disabled; see userdb(4) the name argument is not a valid username the username specified by the name argument is not a local user in /etc/passwd EXAMPLES The following program segment writes values for two attributes into the user database for user joe , and then deletes a third attribute. It then reads and prints two attributes plus the attribute which it removed.
uwx(3X) uwx(3X) (Integrity Systems Only) NAME uwx() - Unwind Express Library SYNOPSIS cc [flag... ] file... -lunwind [library] ... #include #include DESCRIPTION The Unwind Express Library is a lightweight library for unwinding a process stack on Integrity systems. It may be used for "self-unwinding," where a thread traces back through its own stack, or for "crossunwinding," where a debugger or other tool can examine the stack of another target thread or process.
uwx(3X) uwx(3X) (Integrity Systems Only) 2. Call uwx_set_remote() to setup the unwind environment for cross unwinding. This call also allows the client to specify the byte order (little-endian or big-endian) of the target process. 3. Call uwx_register_callbacks() to register the client-provided callback functions. uwx_register_callbacks(3X) for information on writing callback routines. See The steps above may be performed at any time in advance of performing a stack unwind.
uwx(3X) uwx(3X) (Integrity Systems Only) [UWX_ERR_LOOKUPERR] The "Lookup IP" callback encountered an error. [UWX_ERR_NOCALLBACKS] No callback routines have been registered. [UWX_ERR_NOCONTEXT] No initial context has been supplied. [UWX_ERR_NOENV] The env parameter is NULL. [UWX_ERR_NOMEM] An attempt to allocate additional memory failed. [UWX_ERR_NOSYM] No symbolic information was found. [UWX_ERR_NOUDESC] An unwind information block was found, but it does not describe the current frame’s IP.
uwx_add_to_bsp(3X) uwx_add_to_bsp(3X) (Integrity Systems Only) NAME uwx_add_to_bsp() - backing store pointer arithmetic SYNOPSIS #include uint64_t uwx_add_to_bsp( uint64_t bsp , int nslots ); DESCRIPTION uwx_add_to_bsp() is part of the Unwind Express Library for Integrity systems; see uwx(3X). uwx_add_to_bsp() adjusts a backing store pointer (bsp) forward or backward the given number of slots, taking into account the NaT collections that are placed into the backing store at every 64th slot.
uwx_find_source_info(3X) uwx_find_source_info(3X) (Integrity Systems Only) NAME uwx_find_source_info() - obtain source information from ELF files SYNOPSIS #include
uwx_find_source_info(3X) uwx_find_source_info(3X) (Integrity Systems Only) pointer will be returned. offsetp Pointer to a variable of type uint64_t where the function offset will be returned (the difference between the IP and the actual value of the function symbol located). If NULL, the offset will not be returned. If the function name is not available, an offset of 0 will be returned. srcfilep Pointer to a variable of type char * where the source file name will be returned.
uwx_find_symbol(3X) uwx_find_symbol(3X) (Integrity Systems Only) NAME uwx_find_symbol() - obtain symbolic information from ELF files SYNOPSIS #include int uwx_find_symbol( struct uwx_env *env , struct uwx_symbol_cache ** cachep , char *mod , uint64_t relip , char **funcp , uint64_t *offsetp ); DESCRIPTION uwx_find_symbol() is part of the Unwind Express Library for Integrity systems; see uwx(3X).
uwx_find_symbol(3X) uwx_find_symbol(3X) (Integrity Systems Only) AUTHOR The Unwind Express Library was developed by Hewlett-Packard.
uwx_free(3X) uwx_free(3X) (Integrity Systems Only) NAME uwx_free() - free memory used by an unwind environment SYNOPSIS #include int uwx_free(struct uwx_env *env ); DESCRIPTION uwx_free() is part of the Unwind Express Library for Integrity systems; see uwx(3X). uwx_free() frees all memory used by an unwind environment, including any string pools and the unwind environment object itself.
uwx_get_abi_context_code(3X) uwx_get_abi_context_code(3X) (Integrity Systems Only) NAME uwx_get_abi_context_code() - return ABI and context code from current context SYNOPSIS #include int uwx_get_abi_context_code(struct uwx_env *env ); DESCRIPTION uwx_get_abi_context_code() is part of the Unwind Express Library for Integrity systems; see uwx(3X). uwx_get_abi_context_code() returns the abi and context parameters recorded in the unwind descriptors for the frame.
uwx_get_funcstart(3X) uwx_get_funcstart(3X) (Integrity Systems Only) NAME uwx_get_funcstart() - return start address of current function SYNOPSIS #include int uwx_get_funcstart(struct uwx_env *env ); DESCRIPTION uwx_get_funcstart() is part of the Unwind Express Library for Integrity systems; see uwx (3X). uwx_get_funcstart() returns the starting address of the current function, as defined by the stack unwind table entry for the current IP (instruction pointer).
uwx_get_module_info(3X) uwx_get_module_info(3X) (Integrity Systems Only) NAME uwx_get_module_info() - return load module information for current context SYNOPSIS #include int uwx_get_module_info( struct uwx_env *env , char **modp , uint64_t *text_base ); DESCRIPTION uwx_get_module_info() is part of the Unwind Express Library for Integrity systems; see uwx(3X).
uwx_get_nat(3X) uwx_get_nat(3X) (Integrity Systems Only) NAME uwx_get_nat() - Read a NaT bit from current frame’s context SYNOPSIS #include int uwx_get_nat( struct uwx_env *env , int regid , int *natp ); DESCRIPTION uwx_get_nat() is part of the Unwind Express Library for Integrity systems; see uwx(3X). uwx_get_nat() reads the value of a NaT bit from the context of the current frame. Parameters env A pointer to an unwind environment object.
uwx_get_reg(3X) uwx_get_reg(3X) (Integrity Systems Only) NAME uwx_get_reg() - read a register from current frame’s context SYNOPSIS #include int uwx_get_reg( struct uwx_env *env , int regid , uint64_t *valp ); DESCRIPTION uwx_get_reg() is part of the Unwind Express Library for Integrity systems; see uwx(3X). uwx_get_reg() reads the value of a register from the context of the current frame. Parameters env A pointer to an unwind environment object.
uwx_get_reg(3X) uwx_get_reg(3X) (Integrity Systems Only) RETURN VALUE uwx_get_reg() returns [UWX_OK] on success. See uwx(3X) for error codes. AUTHOR The Unwind Express Library was developed by Hewlett-Packard.
uwx_get_source_info(3X) uwx_get_source_info(3X) (Integrity Systems Only) NAME uwx_get_source_info() - return source information for current frame SYNOPSIS #include int uwx_get_source_info( struct uwx_env *env , char **ifuncp , char **srcfilep , int *linenump , int *inline_contextp ); DESCRIPTION uwx_get_source_info() is part of the Unwind Express Library for Integrity systems; see uwx(3X).
uwx_get_sym_info(3X) uwx_get_sym_info(3X) (Integrity Systems Only) NAME uwx_get_sym_info() - return symbolic information for current frame SYNOPSIS #include int uwx_get_sym_info( struct uwx_env *env , char **modp , char **funcp , uint64_t *offsetp ); DESCRIPTION uwx_get_sym_info() is part of the Unwind Express Library for Integrity systems; see uwx(3X). uwx_get_sym_info() obtains symbolic information for the current frame from the symbol tables in the ELF object file, if available.
uwx_init(3X) uwx_init(3X) (Integrity Systems Only) NAME uwx_init() - create and initialize an unwind environment SYNOPSIS #include struct uwx_env *uwx_init(); DESCRIPTION uwx_init() is part of the Unwind Express Library for Integrity systems; see uwx(3X). uwx_init() allocates and initializes a new unwind environment object for use by the Unwind Express Library. The unwind environment is an opaque structure that is used by all other entry points in the Unwind Express Library.
uwx_init_context(3X) uwx_init_context(3X) (Integrity Systems Only) NAME uwx_init_context() - initialize the unwind context SYNOPSIS #include int uwx_init_context( struct uwx_env *env , uint64_t ip , uint64_t sp , uint64_t bsp , uint64_t cfm , ); DESCRIPTION uwx_init_context() is part of the Unwind Express Library for Integrity systems; see uwx(3X). uwx_init_context() provides the basic initial context as a starting point for unwinding.
uwx_register_alloc_cb(3X) uwx_register_alloc_cb(3X) (Integrity Systems Only) NAME uwx_register_alloc_cb() - register custom allocate and free callbacks SYNOPSIS #include int uwx_register_alloc_cb( alloc_cb alloc , free_cb free ); DESCRIPTION uwx_register_alloc_cb() is part of the Unwind Express Library for Integrity systems; see uwx(3X). uwx_register_alloc_cb() registers custom allocate and free callbacks for use by the Unwind Express Library.
uwx_register_callbacks(3X) uwx_register_callbacks(3X) (Integrity Systems Only) NAME uwx_register_callbacks() - register callback routines for stack unwind SYNOPSIS #include int uwx_register_callbacks( struct uwx_env *env , intptr_t tok copyin_cb copyin , lookupip_cb lookupip ); DESCRIPTION uwx_register_callbacks() is part of the Unwind Express Library for Integrity system; see uwx(3X).
uwx_register_callbacks(3X) uwx_register_callbacks(3X) (Integrity Systems Only) ); The unwind engine passes the following parameters to the callback routine: request Identifies the type of request that the unwind engine is making. ip The IP for which information is needed. tok The callback token. resultp Address of a result vector pointer. The unwind engine uses this callback for four types of requests: UWX_LKUP_LOOKUP Requests the callback to lookup information for the given IP.
uwx_register_callbacks(3X) uwx_register_callbacks(3X) (Integrity Systems Only) UWX_LKUP_ERR An error occurred. In the normal case, the callback obtains the following information about the given IP: base address of its text segment, starting and ending addresses of the unwind table, and (optional) unwind flags. It places this information in the result vector, and returns the UWX_LKUP_UTABLE status code. The result vector is an array of key/value pairs.
uwx_register_callbacks(3X) uwx_register_callbacks(3X) (Integrity Systems Only) an inlined call). In all cases when the callback returns a pointer to a string, the unwind engine copies the string into a string pool within the unwind environment. The client may deallocate or reuse its string storage after the UWX_LKUP_FREE request. The Copy-In Callback The copy-in callback is used for obtaining values from the address space of the process being unwound. Its prototype is given in
uwx_register_callbacks(3X) uwx_register_callbacks(3X) (Integrity Systems Only) UWX_REG_GR( x ) UWX_REG_FR( x ) UWX_REG_BR( x ) GRx (1 - 31) FRx (2 - 127) BRx (0 - 7) On a successful copy in operation, the callback must return the number of bytes read (which must match the len parameter). If an error occurs, the callback should return 0. RETURN VALUE uwx_register_callbacks() returns [UWX_OK] on successful registration of the callback routines. See uwx(3X) for error codes.
uwx_release_symbol_cache(3X) uwx_release_symbol_cache(3X) (Integrity Systems Only) NAME uwx_release_symbol_cache() - free memory used by the symbol cache SYNOPSIS #include int uwx_release_symbol_cache( struct uwx_env *env , struct uwx_symbol_cache *symbol_cache ); DESCRIPTION uwx_release_symbol_cache() is part of the Unwind Express Library for Integrity systems; see uwx(3X).
uwx_self_do_context_frame(3X) uwx_self_do_context_frame(3X) (Integrity Systems Only) NAME uwx_self_do_context_frame() - reinitialize the context at a signal frame SYNOPSIS #include int uwx_self_do_context_frame( struct uwx_env *env , struct uwx_self_info *info ); DESCRIPTION uwx_self_do_context_frame() is part of the Unwind Express Library for Integrity systems; see uwx(3X). uwx_self_do_context_frame() builds a new context in the unwind environment from a signal frame.
uwx_self_free_info(3X) uwx_self_free_info(3X) (Integrity Systems Only) NAME uwx_self_free_info() - free memory used by the callback info structure SYNOPSIS #include int uwx_self_free_info(struct uwx_self_info *info ); DESCRIPTION uwx_self_free_info() is part of the Unwind Express Library for Integrity systems; see uwx(3X). uwx_self_free_info() Frees all memory used by the callback info structure.
uwx_self_init_context(3X) uwx_self_init_context(3X) (Integrity Systems Only) NAME uwx_self_init_context() - initialize the current context for self-unwinding SYNOPSIS #include int uwx_self_init_context(struct uwx_env *env ); DESCRIPTION uwx_self_init_context() is part of the Unwind Express Library for Integrity systems; see uwx(3X). uwx_self_init_context() initializes the current context with the application’s context at the point of call to this entry point.
uwx_self_init_info(3X) uwx_self_init_info(3X) (Integrity Systems Only) NAME uwx_self_init_info() - create and initialize a callback info structure for self-unwinding SYNOPSIS #include int uwx_self_init_info( struct uwx_env *env , ); DESCRIPTION uwx_self_init_info() is part of the Unwind Express Library for Integrity systems; see uwx(3X).
uwx_set_nofr(3X) uwx_set_nofr(3X) (Integrity Systems Only) NAME uwx_set_nofr() - disable tracking of floating-point registers SYNOPSIS #include int uwx_set_nofr(struct uwx_env *env ); DESCRIPTION uwx_set_nofr() is part of the Unwind Express Library for Integrity systems; see uwx(3X). uwx_set_nofr() disables the tracking of floating-point registers during the stack unwind process.
uwx_set_remote(3X) uwx_set_remote(3X) (Integrity Systems Only) NAME uwx_set_remote() - enable unwinding of a remote process SYNOPSIS #include int uwx_set_remote( struct uwx_env *env , int is_big_endian_target ); DESCRIPTION uwx_set_remote() is part of the Unwind Express Library for Integrity systems; see uwx(3X). uwx_set_remote() enables the unwinding of a remote process from the unwind environment.
uwx_step(3X) uwx_step(3X) (Integrity Systems Only) NAME uwx_step() - step one frame SYNOPSIS #include int uwx_step(struct uwx_env *env ); DESCRIPTION uwx_step() is part of the Unwind Express Library for Integrity systems; see uwx(3X). uwx_step() steps back one frame from the current context and updates the context to reflect the state of the new frame.
uwx_step_inline(3X) uwx_step_inline(3X) (Integrity Systems Only) NAME uwx_step_inline() - step over one inline call SYNOPSIS #include int uwx_step_inline(struct uwx_env *env ); DESCRIPTION uwx_step_inline() is part of the Unwind Express Library for Integrity systems; see uwx(3X). uwx_step_inline() steps over one inlined call in the current context.
vidattr(3X) vidattr(3X) (ENHANCED CURSES) NAME vidattr, vid_attr, vidputs, vid_puts — output attributes to the terminal SYNOPSIS #include int vidattr(chtype attr); int vid_attr(attr_t attr, short color_pair_number, void *opt); int vidputs(chtype attr, int (*putfunc)(int)); int vid_puts(attr_t attr, short color_pair_number, void (*putwfunc)(int)); *opt, int DESCRIPTION These functions output commands to the terminal that change the terminal’s attributes.
vprintf(3S) vprintf(3S) NAME vprintf(), vfprintf(), vsprintf(), vsnprintf() - print formatted output of a varargs argument list SYNOPSIS #include #include
vprintf(3S) vprintf(3S) SEE ALSO setlocale(3C), printf(3S), standards(5), thread_safety(5), varargs(5), glossary(9). STANDARDS CONFORMANCE vprintf() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C vfprintf() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C vsprintf() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.
vscanf(3S) vscanf(3S) NAME vscanf(), vfscanf(), vsscanf() - formatted input conversion to a varargs argument list, read from stream file SYNOPSIS #include #include
vw_printw(3X) vw_printw(3X) (ENHANCED CURSES) NAME vw_printw() - print formatted output in window (TO BE WITHDRAWN) SYNOPSIS #include #include int vw_printw(WINDOW *win, char *fmt, va_list varglist); DESCRIPTION The vw_printw() function achieves the same effect as wprintw() using a variable argument list. The third argument is a va_list, as defined in . RETURN VALUE Upon successful completion, vw_printw() returns OK. Otherwise, it returns ERR.
vw_scanw(3X) vw_scanw(3X) (ENHANCED CURSES) NAME vw_scanw() - convert formatted input from a window (TO BE WITHDRAWN) SYNOPSIS #include #include int vw_scanw(WINDOW *win, char *fmt, va_list varglist); DESCRIPTION The vw_scanw() function achieves the same effect as wscanw() using a variable argument list. The third argument is a va_list , as defined in . RETURN VALUE Upon successful completion, vw_scanw() returns OK. Otherwise, it returns ERR. ERRORS No errors are defined.
vwprintf(3C) vwprintf(3C) NAME vfwprintf(), vwprintf(), vswprintf() - wide-character formatted output of a stdarg argument list SYNOPSIS #include #include
vwprintw(3X) vwprintw(3X) (ENHANCED CURSES) NAME vwprintw — print formatted output in window SYNOPSIS #include #include int vwprintw(WINDOW *win, char *fmt, va_list varglist); DESCRIPTION The vwprintw() function achieves the same effect as wprintw() using a variable argument list. The third argument is a va_list, as defined in . RETURN VALUE Upon successful completion, vwprintw() returns OK. Otherwise, it returns ERR. ERRORS No errors are defined.
vwscanf(3S) vwscanf(3S) NAME vwscanf( ), vfwscanf( ), vswscanf( ) - convert formatted wide-character input of a stdarg argument list SYNOPSIS #include #include #include
vwscanw(3X) vwscanw(3X) (ENHANCED CURSES) NAME vwscanw — convert formatted input from a window SYNOPSIS #include #include int vwscanw(WINDOW *win, char *fmt, va_list varglist); DESCRIPTION The vwscanw() function achieves the same effect as wscanw() using a variable argument list. The third argument is a va_list, as defined in . RETURN VALUE Upon successful completion, vwscanw() returns OK. Otherwise, it returns ERR. ERRORS No errors are defined.
wconv(3C) wconv(3C) NAME towupper( ), towlower( ) - translate wide characters SYNOPSIS #include wint_t towupper(wint_t wc); wint_t towlower(wint_t wc); Remarks: These functions are compliant with the XPG4 Worldwide Portability Interface wide-character conversion functions. They parallel the 8-bit character conversion functions defined in conv(3C). DESCRIPTION towupper() and towlower() have as domain a wint_t , the value of which is representable as a wchar_t or the value WEOF .
wcrtomb(3C) wcrtomb(3C) NAME wcrtomb() - convert a wide-character code to a character (restartable) SYNOPSIS #include size_t wcrtomb( char *__restrict s , wchar_t wc , mbstate_t *__restrict ps ); DESCRIPTION If s is a null pointer, the wcrtomb() function is equivalent to the call: wcrtomb( buf, L’\0’, ps) where buf is an internal buffer.
wcsftime(3C) wcsftime(3C) NAME wcsftime( ) - convert date and time to wide-character string SYNOPSIS #include
wcsftime(3C) %M %n %p %r %R %S %t %T %u %U %V %w %W %x %X %y %Y %Z %% wcsftime(3C) Minute as a decimal number [00,59]. The New-line character. Locale’s equivalent of either AM or PM. The time in AM and PM notation; in the POSIX locale this is equivalent to %I:%M:%S %p. The time in 24 hour notation (%H:%M). Second as a decimal number [00,61]. The Tab character. The time in hours, minutes, and seconds (%H:%M:%S). The weekday as a decimal number [1(Monday),7].
wcsftime(3C) wcsftime(3C) %Om %OM %OS %Ou %OU The month using the locale’s alternative numeric symbols. %OV The week number of the year (Monday as the first day of the week, rules corresponding to %V) using tht locale’s alternative numeric symbols. %Ow %OW The number of the weekday (Sunday=0) using the locale’s alternative numeric symbols. %Oy The year (offset from %C) in the locale’s alternative representation and using the locale’s alternative symbols.
wcsftime(3C) wcsftime(3C) International Code Set Support Single- and multi-byte character code sets are supported. RETURN VALUE If the total number of resulting wide characters including the terminating null wide character is not more than maxsize , wcsftime() returns the number of wide characters placed into the array pointed to by ws, not including the terminating null wide character. Otherwise, zero is returned and the contents of the array are indeterminate.
wcsrtombs(3C) wcsrtombs(3C) NAME wcsrtombs() - convert a wide-character string to a character string (restartable) SYNOPSIS #include size_t wcsrtombs(char *__restrict dst, const wchar_t **__restrict src, size_t len, mbstate_t *__restrict ps); DESCRIPTION The wcsrtombs() function converts a sequence of wide-characters from the array indirectly pointed to by src into a sequence of corresponding characters, beginning in the conversion state described by the object pointed to by ps.
wcstod(3C) wcstod(3C) NAME wcstod(), wcstof(), wcstold() - convert a wide character string to a double-precision number SYNOPSIS #include
wcstod(3C) wcstod(3C) If wcstod() encounters an input wide character string equal to inf or infinity (both case insensitive) it will return HUGE_VAL . If wcstod() encounters an input wide character string equal to nan or NAN(n-wchar-sequence) (both case insensitive) it will return _DNANQ . AUTHOR wcstod() was developed by AT&T and HP. wcstof() and wcstold() were developed by HP. SEE ALSO scanf(3S), setlocale(3C), wcstol(3C), wctype(3C), lang(5), thread_safety(5), glossary(9).
wcstoimax(3C) wcstoimax(3C) NAME wcstoimax( ), wcstoumax( ) - convert wide character string to long integer SYNOPSIS #include intmax_t wcstoimax(const wchar_t *__restrict nptr, wchar_t **__restrict endptr, int base); uintmax_t wcstoumax(const wchar_t *__restrict nptr, wchar_t **__restrict endptr, int base); DESCRIPTION wcstoimax() or wcstoumax() converts the wide character string pointed to by nptr to intmax_t or uintmax_t representation, respectively.
wcstol(3C) wcstol(3C) NAME wcstol( ), wcstoll( ), wcstoul( ), wcstoull( ) - convert wide character string to long integer SYNOPSIS #include
wcstol(3C) wcstol(3C) ERRORS wcstol() , wcstoul() , wcstoll() , and wcstoull() fail and errno is set, if any of the following conditions are encountered: [EINVAL] The value of base is not supported. [ERANGE] The value to be returned would have caused overflow. AUTHOR These interfaces were developed by OSF and HP. SEE ALSO wctype(3C), wcstod(3C), wcstoimax(3C), scanf(3S), thread_safety(5), glossary(9).
wcstring(3C) wcstring(3C) NAME wcscat(), wcsncat(), wcscmp(), wcsncmp(), wcscpy(), wcsncpy(), wcslen(), wcschr(), wcsrchr(), wcsstr(), wcspbrk(), wcsspn(), wcscspn(), wcswcs(), wcstok(), wcscoll(), wcwidth(), wcswidth(), wcsxfrm() - wide character string operations SYNOPSIS #include
wcstring(3C) wcstring(3C) makes the same comparison but examines a maximum of n characters (n less than or equal to zero yields equality). wcscpy() copies wide string ws2 to ws1, stopping after the null value has been copied. wcsncpy() copies up to n characters from ws2, adding null values to ws1 if necessary, until a total of n have been copied. The result is not null-terminated if the length of ws2 is n or more. Each function returns ws1.
wcstring(3C) wcstring(3C) errno to [EINVAL] (if the wide character string pointed to by ws2 contains wide-character codes outside the domain of the collating sequence) or to [ENOSYS] (if the function is not supported). Definitions for these functions and the type wchar_t are provided in header file . Obsolescent Interface wcstok_r() performs wide character string operations. APPLICATION USAGE The "Unix Standards Only" prototypes are available to applications if they are: a. c99 conformant. b.
wcstring(3C) wcstring(3C) AUTHOR wcstring functions were developed by OSF and HP. SEE ALSO memory(3C), multibyte(3C), setlocale(3C), string(3C), wconv(3C), thread_safety(5), glossary(9).
wctype(3C) wctype(3C) NAME wctype(), iswalpha(), iswblank(), iswupper(), iswlower(), iswdigit(), iswxdigit(), iswalnum(), iswspace(), iswpunct(), iswprint(), iswgraph(), iswcntrl(), iswctype() - classify wide characters SYNOPSIS #include
wctype(3C) wctype(3C) iswspace( wc ) wc is a character that creates "white space" in displayed text (in ASCII: space, tab, carriage return, new-line, vertical tab, and form-feed). iswpunct( wc ) wc is a punctuation character (in ASCII: any printing character except the space character (040), digits, letters). iswprint( wc ) iswgraph( wc ) wc is a printing character. iswcntrl( wc ) wc is a control character (in ASCII: character codes less than 040 and the delete character (0177)).
wmemory(3C) wmemory(3C) NAME wmemchr(), wmemcmp(), wmemcpy(), wmemmove(), wmemset() - memory operations based on widecharacter SYNOPSIS #include
wordexp(3C) wordexp(3C) NAME wordexp(), wordfree() - perform word expansions SYNOPSIS #include int wordexp(const char *words, wordexp_t *pwordexp, int flags); void wordfree(wordexp_t *pwordexp); DESCRIPTION wordexp() performs word expansions and places the list of expanded words into the structure pointed to by pwordexp. The words argument is a pointer to a string containing one or more words to be expanded.
wordexp(3C) wordexp(3C) • Zero or more null pointers, as specified by WRDE_DOOFFS and pwordexp ->we_offs . • Pointers to the words that were in the pwordexp ->we_wordv list before the call, in the same order as before. • Pointers to the new words generated by the latest call, in the specified order. • The count returned in pwordexp ->we_wordc is the total number of words from all of the calls.
wunctrl(3X) wunctrl(3X) (ENHANCED CURSES) NAME wunctrl — generate printable representation of a wide character SYNOPSIS #include wchar_t *wunctrl(cchar_t *wc); DESCRIPTION The wunctrl() function generates a wide character string that is a printable representation of the wide character wc. This function also performs the following processing on the input argument: • Control characters are converted to the ˆX notation. • Any rendition information is removed.
xdr(3N) xdr(3N) NAME xdr - library routines for external data representation DESCRIPTION XDR routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls (RPC) are transmitted using these routines.
xdr(3N) xdr(3N) 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 support asynchronous cancellation or asynchronous signals. SEE ALSO rpc(3N), xdr_admin(3N), xdr_complex(3N), xdr_create(3N), xdr_simple(3N).
xdr_admin(3N) xdr_admin(3N) NAME xdr_admin, xdr_control, xdr_getpos, xdr_inline, xdrrec_endofrecord, xdrrec_eof, xdrrec_readbytes, xdrrec_skiprecord, xdr_setpos, xdr_sizeof - library routines for external data representation SYNOPSIS #include
xdr_admin(3N) xdr_admin(3N) nbytes bytes from the XDR stream into the buffer pointed to by addr. Upon success this routine returns the number of bytes read, -1 on failure. A return value of 0 indicates an end of record. bool_t xdrrec_skiprecord() This routine can be invoked only on streams created by xdrrec_create() (see xdr_create (3N)). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded.
xdr_complex(3N) xdr_complex(3N) NAME xdr_complex, xdr_array, xdr_bytes, xdr_opaque, xdr_pointer, xdr_reference, xdr_string, xdr_union, xdr_vector, xdr_wrapstring - library routines for external data representation SYNOPSIS #include
xdr_complex(3N) xdr_complex(3N) translates the structure between its C form and its external representation. If *pp is null when decoding, xdr_reference() allocates memory and *pp points to it. This routine returns 1 if it succeeds, 0 otherwise. Warning: this routine does not understand NULL pointers. Use xdr_pointer() instead. bool_t xdr_string() xdr_string() translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize.
xdr_create(3N) xdr_create(3N) NAME xdr_create, xdr_destroy, xdrmem_create, xdrrec_create, xdrstdio_create - library routines for external data representation stream creation SYNOPSIS #include
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 , or XDR_FREE .
xdr_simple(3N) xdr_simple(3N) NAME xdr_simple, xdr_bool, xdr_char, xdr_double, xdr_enum, xdr_float, xdr_free, xdr_hyper, xdr_int, xdr_long, xdr_longlong_t, xdr_quadruple, xdr_short, xdr_u_char, xdr_u_hyper, xdr_u_int, xdr_u_long, xdr_u_longlong_t, xdr_u_short, xdr_void - library routines for external data representation SYNOPSIS #include
xdr_simple(3N) xdr_simple(3N) bool_t xdr_enum() xdr_enum() translates between C enum (actually integers) and their external representations. This routine returns TRUE if it succeeds, FALSE otherwise. bool_t xdr_float() xdr_float() translates between C float s and their external representations. This routine returns TRUE if it succeeds, FALSE otherwise. void xdr_free() Generic freeing routine. The first argument is the XDR routine for the object being freed.
xdr_simple(3N) Cancel Safe: Fork Safe: Async-cancel Safe: Async-signal Safe: xdr_simple(3N) Yes No No 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() .
y0(3M) y0(3M) NAME y0(), y0f(), y1(), y1f(), yn(), ynf() - Bessel functions of the second kind SYNOPSIS #include double y0(double x ); double y1(double x ); double yn(int n , double x ); HP Integrity Server Only float y0f(float x ); float y1f(float x ); float ynf(int n , float x ); DESCRIPTION y0() and y1() return Bessel functions of x of the second kind of orders 0 and 1 respectively. yn() returns the Bessel function of x of the second kind of order n.
ypclnt(3C) ypclnt(3C) NAME ypclnt( ), yp_all( ), yp_bind( ), yp_first( ), yp_get_default_domain( ), yp_master( ), yp_match( ), yp_next( ), yp_order( ), yp_unbind( ), yperr_string( ), ypprot_err( ) - Network Information Service client interface SYNOPSIS cc [ flag . . . ] file . . . -lnsl [ library . . . ] #include #include #include #include
ypclnt(3C) ypclnt(3C) int ypprot_err(unsigned int incode); Remarks The Network Information Service (NIS) was formerly known as Yellow Pages (yp). Although the name has changed, the functionality of the service remains the same. DESCRIPTION These functions provide an interface to the Network Information Service (NIS) network-lookup service.
ypclnt(3C) ypclnt(3C) Under conditions of heavy server load or server failure, the NIS domain may become unbound and bind again (perhaps to a different server) while a client is running. This process can cause a break in one of the enumeration (retrieval) rules: specific entries may be seen twice by the client or not at all. This approach protects the client from error messages that would otherwise be returned in the midst of the enumeration.
ypclnt(3C) ypclnt(3C) yperr_string() Returns a pointer to an error message string that is null-terminated, but contains no period or newline. ypprot_err() Takes an NIS protocol error code as input and returns a ypclnt layer error code that can be used as input to yperr_string() MULTITHREAD USAGE Thread Safe: Cancel Safe: Fork Safe: Async-cancel Safe: Async-signal Safe: Yes Yes No No No These functions can be called safely in a multithreaded environment.
yppasswd(3N) yppasswd(3N) NAME yppasswd( ) - update user password in Network Information Service SYNOPSIS cc [ flag . . . ] file. . . -lnsl [ library. . . ] #include #include int yppasswd(char *oldpass, struct passwd *newpw); DESCRIPTION If oldpass is the old, unencrypted user password, this routine replaces the password entry with the encrypted newpw.
yppasswd(3N) yppasswd(3N) SEE ALSO yppasswd(1), yppasswdd(1M).
ypupdate(3C) ypupdate(3C) NAME ypupdate - changes NIS information SYNOPSIS cc [ flag . . . ] file. . . -lnsl [ library. . . ] #include yp_update (domain, map, ypop, key, keylen, data, datalen) char *domain; char *map; unsigned ypop; char *key; int keylen; char *data; int datalen; Remarks The Network Information Service (NIS) was formerly known as Yellow Pages (yp). Although the name has changed, the functionality of the service remains the same.
(Notes) (Notes) y 684 Hewlett-Packard Company −1− HP-UX 11i Version 3: February 2007