HP-UX Reference Section 3: Library Functions (N-Z) HP-UX 11i Version 2 December 2007 Update Volume 7 of 10 Manufacturing Part Number : B2355-92072 E1207 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 or DVD, 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 or DVD, 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 ]...
Publishing History Revisions of the HP-UX Reference are published with each initial version release and at significant update milestones for each release. The contents are current as of the publication dates. Since manpages are often updated in software patches, you can find the latest version of a manpage on an appropriately patched system, using the man command. The list below is in reverse order of the date of publication.
B9106-90007-13 HP-UX 11i Version 1.5; June 2001 Release; seven volumes HTML; http://docs.hp.com and Instant Information. B2355-90689-97 HP-UX 11i Version 1; December 2000 Release; nine volumes PDF and HTML; http://docs.hp.com, Instant Information and print. B2355-90680-84 HP-UX 11.0; October 1997 Release; five volumes HTML; http://docs.hp.com. B2355-90166 HP-UX 11.0; October 1997 Release; five volumes PDF; http://docs.hp.com. B2355-90128-31 HP-UX 10.
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(3): intro() .............................................................................. introduction to subroutines and libraries __uc_get_ar(): ucontext_t (user context) access .................................................................. see uc_access(3) __uc_get_ar_bsp(): ucontext_t (user context) access ..........................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description _toupper(): translate characters to uppercase, lowercase, or 7-bit ASCII .................................. see conv(3C) _UNW_clear(): manipulate values in unwind library data structure ............. see _UNW_currentContext(3X) _UNW_clearAlertCode(): query values in unwind library data structure ................... see _UNW_getGR(3X) _UNW_createContext(): allocate and deallocate unwind library data structure ......................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description acosh(3M): acosh(), acoshf(), acoshl(), acoshw(), acoshq() ................. arc hyperbolic cosine functions acoshf(): arc hyperbolic cosine function (float) ......................................................................... see acosh(3M) acoshl(): arc hyperbolic cosine function (long double) .............................................................. see acosh(3M) acoshq(): arc hyperbolic cosine function (quad) ........
Table of Contents Volumes Six and Seven Entry Name(Section): name Description annuityq() ........................................................................................... present value factor for annuity annuityf(): present value factor for annuity (float) .............................................................. see annuity(3M) annuityl(): present value factor for annuity (long double) ...................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description attrset(): restricted window attribute control functions ........................................................... see attroff(3X) auth_destroy(): library routines for client side rpc authentication ........................... see rpc_clnt_auth(3N) authdes_create(): obsolete library routine for RPC ............................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description cacoshq(): complex arc hyperbolic cosine function (quad) ....................................................... see cacosh(3M) cacoshw(): complex arc hyperbolic cosine function (extended) ................................................ see cacosh(3M) cacosl(): complex arccosine function (long double) ................................................................... see cacos(3M) cacosq(): complex arccosine function (quad) ....
Table of Contents Volumes Six and Seven Entry Name(Section): name Description cexp10(3M): cexp10(), cexp10f(), cexp10l(), cexp10w(), cexp10q() ..................................................................................................... complex base-10 exponential functions cexp10f(): complex base-10 exponential functions ................................................................. see cexp10(3M) cexp10l(): complex base-10 exponential functions ..................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description clnt_sperror(): library routine for client side calls, rpc ............................................ see rpc_clnt_calls(3N) clnt_tli_create(): library routines for dealing with CLIENT handles, rpc .......... see rpc_clnt_create(3N) clnt_tp_create(): library routines for dealing with CLIENT handles, rpc ............ see rpc_clnt_create(3N) clnt_vc_create(): library routines for dealing with CLIENT handles, rpc ............
Table of Contents Volumes Six and Seven Entry Name(Section): name Description copysign(3M): copysign(), copysignf(), copysignl(), copysignw(), copysignq() . copysign functions copysignf(): copysign function (float) ................................................................................ see copysign(3M) copysignl(): copysign function (long double) ..................................................................... see copysign(3M) copysignq(): copysign function (quad) .............................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description crt0_pa(3): crt0.o, gcrt0.o, mcrt0.o ................................ execution startup routines for PA-RISC systems crypt(3C): crypt(), crypt_r(), encrypt(), encrypt_r(), setkey(), setkey_r() ................................................................................................ generate hashing encryption crypt2(3C): crypt2(), crypt2_passwd_match(), crypt2_passwd_hash(), crypt2_passwd_salt() ............................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description db_table_exists(): NIS+ database access functions ............................................................. see nis_db(3N) db_unload_table(): NIS+ database access functions ............................................................. see nis_db(3N) dbm(3X): dbminit(), fetch(), store(), delete(), firstkey(), nextkey(), dbmclose() ........................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description dn_comp(): resolver routines ................................................................................................ see resolver(3N) dn_expand(): resolver routines ............................................................................................ see resolver(3N) doupdate(3X): doupdate(), refresh(), wnoutrefresh(), wrefresh() .............
Table of Contents Volumes Six and Seven Entry Name(Section): name Description elf_getshdr(3E): elf32_getshdr(), elf64_getshdr() retrieve class-dependent section header for ELF files elf_hash(3E): elf_hash() ........................................................................... compute hash value for ELF files elf_kind(3E): elf_kind() ............................................................................. determine file type for ELF files elf_ndxscn(): get section information for ELF files .......
Table of Contents Volumes Six and Seven Entry Name(Section): name Description errno(): system error messages .............................................................................................. see perror(3C) ERROR(): regular expression compile and match routines ......................................................... see regexp(3X) etext(): last locations in program ................................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description fflush(): close or flush a stream ............................................................................................... see fclose(3S) fflush_unlocked(): close or flush a stream ............................................................................. see fclose(3S) ffs(): memory operations, find first bit set ...........................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description fputs_unlocked(): put a string on a stream .............................................................................. see puts(3S) fputwc(): put a wide character on a stream file ....................................................................... see putwc(3C) fputwc_unlocked(): put a wide character on a stream file .....................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description getauduser(3): getauduser() ....................................... retrieve the accountable user for the current process getbegyx(3X): getbegyx(), getmaxyx(), getparyx() ............ get additional cursor and window coordinates getbkgd(): set or get background character and rendition using a single-byte character ............... see bkgd(3X) getbkgrnd(): set or get background character and rendition using a complex character ....
Table of Contents Volumes Six and Seven Entry Name(Section): name Description getnetconfig(3N): getnetconfig(), setnetconfig(), endnetconfig(), getnetconfigent(), freenetconfigent(), nc_perror(), nc_sperror() ........... get network configuration database entry getnetconfigent(): get network configuration data base entry ................................... see getnetconfig(3N) getnetent(3N): getnetent(), getnetbyaddr(), getnetbyname(), setnetent(), endnetent() ...............................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description .................................................................................... get secure password file entry on trusted systems getspwent_r(): get secure password file entry on trusted systems ................................... see getspwent(3X) getspwnam(): get secure password file entry on trusted systems .......................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description gss_duplicate_name(3): gss_duplicate_name() ........................................ allow an application to create an exact duplicate of the existing internal name gss_export_name(3): gss_export_name() ............................................... convert a mechanism name (MN) to a form suitable for direct comparison gss_export_sec_context(3): gss_export_sec_context() ...........................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description HPPACCVDB(): HP 3000-mode packed-decimal library ................................................................ see hppac(3X) HPPACDIVD(): HP 3000-mode packed-decimal library ................................................................ see hppac(3X) HPPACLONGDIVD(): HP 3000-mode packed-decimal library ........................................................ see hppac(3X) HPPACMPYD(): HP 3000-mode packed-decimal library .....
Table of Contents Volumes Six and Seven Entry Name(Section): name Description inet6_rth_addr(): IPv6 Routing header options manipulation functions ............... see inet6_rth_space(3N) inet6_rth_getaddr(): IPv6 Routing header options manipulation functions ......... see inet6_rth_space(3N) inet6_rth_init(): IPv6 Routing header options manipulation functions ............... see inet6_rth_space(3N) inet6_rth_reverse(): IPv6 Routing header options manipulation functions .........
Table of Contents Volumes Six and Seven Entry Name(Section): name Description isendwin(3X): isendwin() .................................................... determine whether a screen has been refreshed isfinite(3M): isfinite() ................................................................................. floating-point finiteness macro isgraph(): classify characters ...................................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description ldcvt(3C): _ldecvt(), _ldfcvt(), _ldgcvt() ............... convert long double floating-point number to string ldecvt() (_ldecvt()): convert long double floating-point number to string .............................. see ldcvt(3C) ldexp(3M): ldexp(), ldexpf(), ldexpl(), ldexpw(), ldexpq() . scale exponent of a floating-point number ldexpf(): scale exponent of a floating-point number (float) .........................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description log10w(): common logarithm function (extended) ..................................................................... see log10(3M) log1p(3M): log1p(), log1pf(), log1pl(), log1pw(), log1pq() .................................................. natural logarithm of one-plus-argument functions log1pf(): natural logarithm of one-plus-argument function (float) ............................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description memory(3C): memccpy(), memchr(), memcmp(), memcpy(), memset(), bcopy(), bcmp(), bzero(), ffs() ........................................................................... memory operations memorymap(): display contents of memory allocator ................................................................. see malloc(3C) memset(): memory operations, set memory ..........................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description mvinwstr(): input a string of wide characters from a window .................................................. see innwstr(3X) mvprintw(3X): mvprintw(), mvwprintw(), printw(), wprintw .............. print formatted output in window mvscanw(3X): mvscanw(), mvwscanw(), scanw(), wscanw() .......... convert formatted input from a window mvvline(): draw lines from single-byte characters and renditions ..................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description nearbyintl(): round to nearest int function (long double) ............................................................. see rint(3M) nearbyintq(): round to nearest int function (quad) ...................................................................... see rint(3M) nearbyintw(): round to nearest int function (extended) ...............................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description nis_leaf_of(): NIS+ subroutine ........................................................................................ see nis_subr(3N) nis_lerror(): display NIS+ error messages ...................................................................... see nis_error(3N) nis_list(): NIS+ table functions .....................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description optind(): get option letter from argument vector .................................................................... see getopt(3C) overlay(3X): overlay(), overwrite() ................................................................... copy overlapped windows overwrite(): copy overlapped windows ....................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description prcmd_init(): return streams to parallel remote commands .................................................. see prcmd(3N) prefresh(): pad management functions .................................................................................. see newpad(3X) printf(3S): printf(), fprintf(), sprintf(), snprintf() ...................................... print formatted output printw(): print formatted output in window .................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description ..................................................................................................................................... see privileges(3) privset_union(): privilege manipulation operations for checking and debugging purposes ..................................................................................................................................... see privileges(3) pthread(3T): pthread() ....................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description pthread_condattr_setpshared() ................................ get or set the thread process-shared attribute pthread_condattr_init(3T): pthread_condattr_init(), pthread_condattr_destroy() ............................................................... initialize or destroy a thread condition variable attribute object pthread_condattr_setpshared(): set the thread process-shared attribute ...........................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description pthread_mutex_disable_handoff_np() ... get and set the mutex spin and yield frequency attributes; disable mutex-specific or process-wide mutex handoff mode pthread_mutexattr_gettype(): get the type attribute .............. see pthread_mutexattr_getpshared(3T) pthread_mutexattr_init(3T): pthread_mutexattr_init(), pthread_mutexattr_destroy() ............................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description pthread_suspend(): suspend execution of a thread ......................................... see pthread_resume_np(3T) pthread_testcancel(3T): pthread_testcancel() ........................ process any pending cancellation requests ptsname(3C): ptsname(), ptsname_r() ............................................................. get the name of a slave pty ptsname_r(): get the name of a slave pty ......................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description remainderf(): remainder functions ................................................................................. see remainder(3M) remainderl(): remainder functions ................................................................................. see remainder(3M) remainderq(): remainder functions .................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description clnt_tli_create(), clnt_tp_create(), clnt_vc_create(), rpc_createerr() .................................................................................... library routines for dealing with CLIENT handles rpc_control(3N): rpc_control() ......................... library routine for manipulating global RPC attributes for client and server applications rpc_createerr(): library routines for dealing with CLIENT handles, rpc ...........
Table of Contents Volumes Six and Seven Entry Name(Section): name Description scalbnf(): scale exponent of a radix-independent floating-point number (float) ...................... see scalbn(3M) scalbnl(): scale exponent of a radix-independent floating-point number (long double) ........... see scalbn(3M) scalbnq(): scale exponent of a radix-independent floating-point number (quad) ..................... see scalbn(3M) scalbnw(): scale exponent of a radix-independent floating-point number (extended) ........
Table of Contents Volumes Six and Seven Entry Name(Section): name Description setprdfent(): rewind default control files .......................................................................... see getprdfent(3) setprotoent(): get, set, or end protocol entry ............................................................... see getprotoent(3N) setprpwent(): set protected password database entry .....................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description siglongjmp(): nonlocal goto ................................................................................................... see setjmp(3C) siglongjmp(): restore signal mask if its is saved by sigsetjmp() ........................................ see setjmp(3C) signbit(3M): signbit() ............................................................................... floating-point sign-determination signgam(): log gamma functions ..
Table of Contents Volumes Six and Seven Entry Name(Section): name Description slk_color(): soft label functions ......................................................................................... see slk_attroff(3X) slk_init(): soft label functions ........................................................................................... see slk_attroff(3X) slk_label(): soft label functions .........................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description strord(3C): strord() ............................................................................................... convert string data order strpbrk(): character string operations ..................................................................................... see string(3C) strptime(3C): strptime ...........................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description svcerr_weakauth(): library routine for server side remote procedure call errors .......... see rpc_svc_err(3N) svcfd_create(): obsolete library routine for RPC ................................................................ see rpc_soc(3N) svcraw_create(): obsolete library routine for RPC .............................................................. see rpc_soc(3N) svctcp_create(): obsolete library routine for RPC ..............
Table of Contents Volumes Six and Seven Entry Name(Section): name Description tcflow(): tty line control functions ........................................................................................ see tccontrol(3C) tcflush(): tty line control functions ...................................................................................... see tccontrol(3C) tcgetattr(): get tty device attributes .............................................................................
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 wclrtoeol(): clear from cursor to end of line ........................................................................... see clrtoeol(3X) wcolor_set(): window attribute control functions ................................................................... see attr_get(3X) wconv(3C): towupper(), towlower() .................................................................... translate wide characters wcrtomb(3C): wcrtomb() .........
Table of Contents Volumes Six and Seven Entry Name(Section): name Description wins_wch(): insert a complex character and rendition into a window ...................................... see ins_wch(3X) wins_wstr(): insert a wide-character string into a window .................................................. see ins_nwstr(3X) winsch(): insert a single-byte character and rendition into a window ........................................... see insch(3X) winsdelln(): delete or insert lines into a window ........
Table of Contents Volumes Six and Seven Entry Name(Section): name Description xdr_free(): library routine for external data representation .......................................... see xdr_simple(3N) xdr_getpos(): library routines for external data representation ..................................... see xdr_admin(3N) xdr_hyper(): library routine for external data representation ........................................ see xdr_simple(3N) xdr_inline(): library routines for external data representation .....
Table of Contents Volumes Six and Seven Entry Name(Section): name Description 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 ..........................................................
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); Itanium(R)-based System 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.
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) HOST_SELF Represents the address to which local programs will bind their endpoints. HOST_SELF differs from the host name provided by gethostname() (see gethostname(2)), which represents the address to which remote programs will bind their endpoints. HOST_ANY Represents any host accessible by this transport provider. HOST_ANY allows applications to specify a required service without specifying a particular host name.
netdir(3N) netdir(3N) port. If pointer_to_args is a pointer to a netbuf structure, an attempt will be made to bind to any reserved port on the specified address. ND_CHECK_RESERVEDPORT Used to verify that the address corresponds to a reserved port, if that concept exists for the transport provider. fildes is not used. pointer_to_args is a pointer to a netbuf structure that contains the address. This option returns 40 only if the address specified in pointer_to_args is reserved.
newpad(3X) newpad(3X) (CURSES) NAME newpad(), pnoutrefresh(), prefresh() - pad management functions SYNOPSIS #include
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.
nis_db(3N) nis_db(3N) NAME nis_db: db_initialize(), db_create_table(), db_destroy_table(), db_first_entry(), db_next_entry(), db_reset_next_entry(), db_list_entries(), db_remove_entry(), db_add_entry(), db_table_exists(), db_unload_table(), db_checkpoint(), db_standby(), db_free_result() - NIS+ Database access functions SYNOPSIS cc [ flag . . . ] file. . . -lnisdb -lnsl [ library. . . ] #include #include
nis_db(3N) nis_db(3N) NIS+ server converts directory lookup requests in the namespace into table searches. The table it searches in response to these requests will have the same name as the directory of the name it is searching for.
nis_db(3N) nis_db(3N) db_list_entries() returns copies of entries that satisfy the given attributes. db_free_result() can be used to free up the returned db_result structure. attrs is an array of nis_attr structure with numattrs number of elements. db_remove_entry() removes all entries that satisfy the given attributes. db_free_result() can be used to free up the returned db_result structure. attrs is an array of nis_attr structure with numattrs number of elements.
nis_db(3N) nis_db(3N) DB_MEMORY_LIMIT There is insufficient memory to complete the operation requested. DB_STORAGE_LIMIT There is insufficient file storage available to complete the operation requested. DB_INTERNAL_ERROR An internal error was encountered during the execution of the operation requested (either a programming error or an unrecoverable exception). SEE ALSO rpc.nisd(1M), nis_objects(3N), nisfiles(4).
nis_error(3N) nis_error(3N) NAME nis_error(), nis_sperrno(), nis_perror(), nis_lerror(), nis_sperror(), nis_sperror_r() - display NIS+ error messages SYNOPSIS cc [ flag . . . ] file. . . -lnsl [ library. . . ] #include
nis_groups(3N) nis_groups(3N) NAME nis_groups(), nis_addmember(), nis_creategroup(), nis_destroygroup(), nis_ismember(), nis_map_group(), nis_print_group_entry(), nis_removemember(), nis_verifygroup(), _nis_map_group() - NIS+ group manipulation functions SYNOPSIS Invocation: cc [flag]... file ... -lnsl [library]... #include
nis_groups(3N) struct { u_int nis_name } gr_members; nis_groups(3N) gr_members_len; *gr_members_val; /* Array of members */ NIS+ servers and clients maintain a local cache of expanded groups to enhance their performance when checking for group membership. Should the membership of a group change, servers and clients with that group cached will not see the change until either the group cache has expired or it is explicitly flushed.
nis_groups(3N) nis_groups(3N) SEE ALSO nisgrpadm(1), nis_objects(3N).
nis_local_names(3N) nis_local_names(3N) NAME nis_local_names(), nis_local_directory(), nis_local_host(), nis_local_group(), nis_local_principal() - NIS+ local names SYNOPSIS cc [ flag . . . ] file. . . #include nis_name nis_name nis_name nis_name -lnsl [ library. . . ] nis_local_directory(void); nis_local_host(void); nis_local_group(void); nis_local_principal(void); DESCRIPTION These functions return several default NIS+ names associated with the current process.
nis_names(3N) nis_names(3N) NAME nis_names(), nis_lookup(), nis_add(), nis_remove(), nis_modify(), nis_freeresult() - NIS+ namespace functions SYNOPSIS cc [ flag . . . ] file. . . -lnsl [ library. . . ] #include
nis_names(3N) nis_names(3N) objects if the link in question pointed within a table. If an error occurred when following a link, the objects array will contain a copy of the link object itself. The function nis_add() will take the object obj and add it to the NIS+ namespace with the name name. This operation will fail if the client making the request does not have the create access right for the domain in which this object will be added. The parameter name must contain a fully qualified NIS+ name.
nis_names(3N) cticks nis_names(3N) The total time spent in the request. This clock starts when you enter the client library and stops when a result is returned. By subtracting the sum of the other ticks values from this value, you can obtain the local overhead of generating a NIS+ request. Subtracting the value in dticks from the value in zticks will yield the time spent in the service code itself.
nis_names(3N) nis_names(3N) NIS_INVALIDOBJ The object pointed to by obj is not a valid NIS+ object. NIS_BADNAME The name passed to the function is not a legal NIS+ name. NIS_LINKNAMEERROR The name passed resolved to a LINK type object and the contents of the link pointed to an invalid name. NIS_NOTSAMEOBJ An attempt to remove an object from the namespace was aborted because the object that would have been removed was not the same object that was passed in the request.
nis_objects(3N) nis_objects(3N) NAME nis_objects - NIS+ object formats SYNOPSIS cc [ flag . . . ] file. . . -lnsl [ library. . . ] /usr/include/rpcsvc/nis_objects.h DESCRIPTION Common Attributes The NIS+ service uses a variant record structure to hold the contents of the objects that are used by the NIS+ service. These objects all share a common structure which defines a set of attributes that all objects possess.
nis_objects(3N) nis_objects(3N) group.domain. which the server then maps into a name of the form group .groups_dir. domain. The purpose of this mapping is to prevent NIS+ group names from conflicting with user specified domain or table names. For example, if a domain was called engineering.foo.com., then without the mapping a NIS+ group of the same name to represent members of engineering would not be possible.
nis_objects(3N) nis_objects(3N) types in more significant detail. Directory Objects The first type of object is the directory object.
nis_objects(3N) nis_objects(3N) The do_servers structure contains two members. do_servers_val is an array of nis_server structures; do_servers_len is the number of cells in the array. The nis_server structure is designed to contain enough information such that machines on the network providing name services can be contacted without having to use a name service.
nis_objects(3N) nis_objects(3N) The gr_flags member contains flags that are currently unused. The gr_members structure contains the list of principals. For a complete description of how group objects are manipulated see nis_groups(3N). Table Objects The NIS+ table object is analogous to a YP map. The differences stem from the access controls, and the variable schemas that NIS+ allows.
nis_objects(3N) nis_objects(3N) Entry Objects Entry objects are stored in tables. The structure used to define the entry data is as follows.
nis_ping(3N) nis_ping(3N) NAME nis_ping(), nis_checkpoint() - misc NIS+ log administration functions SYNOPSIS cc [ flag . . . ] file. . . -lnsl [ library. . . ] #include void nis_ping(const nis_name dirname , const u_long utime , const nis_object *dirobj); nis_result *nis_checkpoint(const nis_name dirname ); DESCRIPTION nis_ping() is called by the master server for a directory when a change has occurred within that directory.
nis_server(3N) nis_server(3N) NAME nis_server(), nis_mkdir(), nis_rmdir(), nis_servstate(), nis_stats(), nis_getservlist(), nis_freeservlist(), nis_freetags() - miscellaneous NIS+ functions SYNOPSIS cc [ flag . . . ] file. . . -lnsl [ library. . . ] #include
nis_server(3N) Fork Safe: Async-cancel Safe: Async-signal Safe: nis_server(3N) No No No These functions can be called safely in a multithreaded environment. These functions may be thread cancellation points because they invoke functions that are thread cancellation points. In a multithreaded environment, these functions are not safe to be called by a child process after fork() and before exec() .
nis_subr(3N) nis_subr(3N) NAME nis_subr(), nis_leaf_of(), nis_name_of(), nis_domain_of(), nis_getnames(), nis_freenames(), nis_dir_cmp(), nis_clone_object(), nis_destroy_object(), nis_print_object() - NIS+ subroutines SYNOPSIS cc [ flag . . . ] file. . . -lnsl [ library. . . ] #include
nis_subr(3N) nis_subr(3N) an array (using the dest parameter to nis_clone_object()) then the object cannot be freed with this function. Instead, the function xdr_free(xdr_nis_object, dest ) must be used. nis_print_object() prints out the contents of a NIS+ object structure on the standard output. Its primary use is for debugging NIS+ programs.
nis_tables(3N) nis_tables(3N) NAME nis_tables: nis_list(), nis_add_entry(), nis_next_entry() - NIS+ table functions nis_remove_entry(), nis_modify_entry(), nis_first_entry(), SYNOPSIS cc [ flag . . . ] file. . . -lnsl [ library. . . ] #include
nis_tables(3N) nis_tables(3N) invalid or non-existent object then it is silently ignored. HARD_LOOKUP This flag specifies that the operation should continue trying to contact a server of the named table until a definitive result is returned (such as NIS_NOTFOUND ). ALL_RESULTS This flag can only be used in conjunction with FOLLOW_PATH and a callback function. When specified, it forces all of the tables in the path to be searched.
nis_tables(3N) nis_tables(3N) If the flags parameter contains the flag MOD_SAMEOBJ then the object pointed to by object is assumed to be a cached copy of the original object. If the OID of the object passed is different than the OID of the object the server fetches, then the operation fails with the NIS_NOTSAMEOBJ error. This can be used to implement a simple read-modify-write protocol which will fail if the object is modified before the client can write the object back.
nis_tables(3N) nis_tables(3N) dticks The time spent in the database backend, this time is measured from the time a database call starts, until a result is returned. If the request results in multiple calls to the database, this is the sum of all the time spent in those calls. aticks The time spent in any ‘‘accelerators’’ or caches. This includes the time required to locate the server needed to resolve the request.
nis_tables(3N) nis_tables(3N) NIS_NOCALLBACK The server was unable to contact the callback service on your machine. This results in no data being returned. NIS_NOMEMORY Generally a fatal result. It means that the service ran out of heap space. NIS_NOSUCHNAME This hard error indicates that the named directory of the table object does not exist. This occurs when the server that should be the parent of the server that serves the table, does not know about the directory in which the table resides.
nis_tables(3N) nis_tables(3N) NIS_TYPEMISMATCH An attempt was made to add or modify an entry in a table, and the entry passed was of a different type than the table. EXTERNAL INFLUENCES Environment Variables NIS_PATH When set, this variable is the search path used by nis_list() EXPAND_NAME is set. if the flag WARNINGS Use the flag HARD_LOOKUP carefully since it can cause the application to block indefinitely during a network partition.
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 .
nl_tools_16(3X) nl_tools_16(3X) NAME nl_tools_16: ADVANCE(), byte_status(), BYTE_STATUS(), CHARADV(), CHARAT(), c_colwidth(), C_COLWIDTH(), firstof2(), FIRSTof2(), secof2(), SECof2(), WCHAR(), WCHARADV() - tools to process 16bit characters (OBSOLETED AT 10.30) SYNOPSIS #include
nl_tools_16(3X) nl_tools_16(3X) CHARAT() Takes as an argument a pointer p, which is assumed to be pointing at either a onebyte character or the first byte of a two-byte character. In either case, CHARAT() returns the wchar_t value that corresponds to the character pointed to by p. ADVANCE() Advances its pointer argument by the byte width of the character it is pointing at (either one or two bytes). CHARADV() Combines the functions of CHARAT() and ADVANCE() in a single macro.
nlist(3C) nlist(3C) PA-RISC Systems Only NAME nlist(), nlist64() - get entries from name list on PA-RISC systems SYNOPSIS nlist() cc [flag]... cfile ... #include int nlist(const char *file_name, struct nlist *nl); nlist64() 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 non-portable.
nlist(3E) Integrity Systems Only nlist(3E) NAME nlist( ), nlist64( ) - get entries from name list SYNOPSIS nlist() cc [flag]... cfile ... -lelf [library]... #include int nlist(const char *file_name, struct nlist *nl); nlist64() 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 non-portable.
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 , int argc , const char **argv ); 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_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 VALUE 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 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) struct pam_response{ char ∗resp; int resp_retcode; }; It is the responsibility of the /* currently not used, should be set to 0 */ conversation function to strip off newline characters for PAM_PROMPT_ECHO_OFF and PAM_PROMPT_ECHO_ON message styles, and to add newline characters (if appropriate) for PAM_ERROR_MSG and PAM_TEXT_INFO message styles. appdata_ptr is an application data pointer which is passed by the application to the PAM service 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( ), errno, sys_errlist, sys_nerr - system error messages SYNOPSIS #include void perror(const char *s); #include char *strerror(int errnum); #include extern char *sys_errlist[ ]; extern int sys_nerr; Obsolescent Interface #include
perror(3C) perror(3C) strerror_r() is an obsolescent interface supported only for compatibility with existing DCE applications. New multithreaded applications should use strerror() . 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.
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 Itanium-based systems) 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. For more information, see the HP-UX Floating-Point Guide.
pow(3M) pow(3M) 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). ERRORS If x is zero and y is less than zero, pow() sets errno to [EDOM].
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) 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). A failure is not returned for a given host until all of its IP addresses have been tried.
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. According to 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) 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. prcmd() defers (serializes) additional connections once all ports or file descriptors are in use, so additional hosts are not ignored, but the time required for all connections to complete increases accordingly.
printf(3S) printf(3S) NAME printf(), fprintf(), sprintf(), snprintf() - print formatted output SYNOPSIS #include int printf(const char *format, /* [arg,] */ ...); int fprintf(FILE *stream, const char *format, /* [arg,] */ ...); int sprintf(char *s, const char *format, /* [arg,] */ ...); int snprintf(char *s, size_t maxsize, const char *format, /* [arg,] */ ...); DESCRIPTION printf() places output on the standard output stream stdout. fprintf() places output on the named output stream.
printf(3S) printf(3S) A field width or precision can be indicated by an asterisk instead of a digit string. In this case, an integer arg supplies the field width or precision. The arg that is actually converted is not fetched until the conversion letter is seen, so the args specifying field width, or precision, or both must appear in that order before the arg, if any, to be converted. A negative field width is taken as a - flag followed by a positive field width.
printf(3S) printf(3S) a, A For Itanium(R)-based systems only. The double arg is converted in the style [-]0xhrhhhp± d, where r is the radix character. There is one digit before the radix character and the number of digits after it is equal to the precision; when the precision is missing, 13 digits are produced for double , 15 for extended , and 28 for long double (which is sufficient for an exact representation of the value); if the precision is 0, no radix character appears.
printf(3S) printf(3S) will print infinity and NaN as respectively, INF and NAN . For a and A conversions (for Itanium(R)-based system), the value is correctly rounded to a hexadecimal floating point number with the given precision. The e, E, f, g, and G conversions on Itanium(R)-based system round according to the specification in ISO/IEC C99: if the number of significant decimal digits is at most 36, then the result is correctly rounded.
printf(3S) printf(3S) [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] The data obtained from the input stream does not form a valid wide character. [ENOMEM] Insufficient storage space is available. Additional errno values can be set by the underlying write() function (see write(2)).
priv_add(3) priv_add(3) NAME priv_add: priv_add_effective(), 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) priv_set_effective() Sets the effective privilege set of the calling process to the given privilege(s). privset_add_effective() Similar to priv_add_effective(), except that it uses a privilege set type to specify the privileges to add to the calling process’ effective privilege set. privset_get() Returns the privilege set specified by the priv_type argument of the process specified by pid. If the pid is 0, the calling process’s privilege set is returned.
priv_add(3) priv_add(3) NOTES 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. One way to accomplish this is to use set negation notation: for instance, a process can set its effective set to "basic,!exec,!fork,!linkany" instead of "session".
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 name to privilege ID 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) priv_set_to_str() is responsible for freeing the result using the free() . NULL pointer Function failed. Returns a null pointer and sets errno to indicate the error . 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
privileges(3) privileges(3) NAME privileges: priv_addset(), priv_delset(), priv_ismember(), 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 #include
privileges(3) privileges(3) privset_alloc() 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. privset_del() Removes the privilege specified by num from the privilege set referred to by privp. privset_empty() Clears all privileges from privp.
privileges(3) privileges(3) ERRORS If any of the following conditions occur, the functions fail and set errno . [ENOMEM] Insufficient memory available to allocate space to hold a privilege set. The application can try again later. [EINVAL] Invalid argument. 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_getrsestacksize_np(), pthread_attr_setdetachstate(), pthread_attr_setguardsize(), pthread_attr_setinheritsched(), pthread_attr_setprocessor_np
pthread_attr_getdetachstate(3T) pthread_attr_getdetachstate(3T) (Pthread Library) stacksize This parameter either specifies the new value of the stacksize attribute (set function) or it points to the memory location where the stacksize attribute of attr is to be returned (get function). rsestacksize This parameter either specifies the new value of the rsestacksize attribute (set function) or it points to the memory location where the rsestacksize attribute of attr is to be returned (get function).
pthread_attr_getdetachstate(3T) pthread_attr_getdetachstate(3T) (Pthread Library) pthread_attr_getschedparam() - get the schedparam attributes. pthread_attr_setscope() - set the contentionscope attribute. pthread_attr_getscope() - get the contentionscope attribute. pthread_attr_setprocessor_np() - set the processor and binding_type attributes. pthread_attr_getprocessor_np() - get the processor and binding_type attributes.
pthread_attr_getdetachstate(3T) pthread_attr_getdetachstate(3T) (Pthread Library) implementation defined division. The memory stack portion will be the remainder. pthread_attr_getrsestacksize_np() retrieves the value of the rsestacksize attribute from the thread attributes object attr. This value is returned in the rsestacksize parameter.
pthread_attr_getdetachstate(3T) pthread_attr_getdetachstate(3T) (Pthread Library) pthread_attr_getinheritsched() retrieves the value of the inheritsched attribute from the thread attributes object attr. This value is returned in the inheritsched parameter. ATTRIBUTE: schedpolicy The schedpolicy attribute allows threads created with this attributes object to use a specific scheduling policy. To use this attribute, the inheritsched attribute must be set to PTHREAD_EXPLICIT_SCHED.
pthread_attr_getdetachstate(3T) pthread_attr_getdetachstate(3T) (Pthread Library) chooses. No processor binding is maintained. Specifying PTHREAD_LDOMFLOAT_NP or PTHREAD_SPUFLOAT_NP cause both processor binding and locality domain binding attributes to be cleared. The thread will be allowed to execute on any processor in the system. The binding_type attribute is ignored.
pthread_attr_getdetachstate(3T) pthread_attr_getdetachstate(3T) (Pthread Library) If the value of the binding_type attribute is PTHREAD_BIND_NONE_NP the processor attribute should be ignored.
pthread_attr_getdetachstate(3T) pthread_attr_getdetachstate(3T) (Pthread Library) pthread_attr_setschedpolicy(), pthread_attr_getschedpolicy(), pthread_attr_setschedparam(), pthread_attr_getschedparam(), pthread_attr_setscope(), and pthread_attr_getscope() were derived from the IEEE POSIX P1003.1c standard. pthread_attr_setguardsize() and pthread_attr_getguardsize() were developed by X/Open. pthread_attr_setprocessor_np() and pthread_attr_getprocessor_np() were developed by HP.
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 *cond, const pthread_condattr_t *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 *cond, pthread_mutex_t *mutex ); int pthread_cond_timedwait( pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime ); PARAMETERS cond Pointer to the condition variable to be waited on. mutex Pointer to the mutex associated with the condition variable cond.
pthread_cond_wait(3T) pthread_cond_wait(3T) (Pthread Library) If a signal is delivered to a thread waiting for a condition variable, upon return from the signal handler, the thread may return zero due to a spurious wakeup or continue waiting for the condition. RETURN VALUE Upon successful completion, pthread_cond_wait() and pthread_cond_timedwait() return zero. Otherwise, an error number is returned to indicate the error (the errno variable is not set).
pthread_cond_wait(3T) pthread_cond_wait(3T) (Pthread Library) /* success condition */ break; } } } (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 int pthread_condattr_getpshared( const pthread_condattr_t *attr, int *pshared ); int pthread_condattr_setpshared( pthread_condattr_t *attr, int pshared ); PARAMETERS attr pshared Pointer to the condition variable attributes object whose process-shared attribute is to be set/retrieved.
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 *thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *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. If the value is NULL , default attributes will be used.
pthread_create(3T) pthread_create(3T) (Pthread Library) [EINVAL] The scheduling policy or scheduling attributes specified in attr are invalid. [EPERM] The caller does not have the appropriate privileges to create a thread with the scheduling policy and parameters specified in attr. NOTES It is unspecified whether joinable threads that have exited but haven’t been joined count against the PTHREAD_THREADS_MAX limit. AUTHOR pthread_create() was derived from the IEEE POSIX P1003.1c standard.
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_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 int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ); int pthread_setschedparam( pthread_t thread, int policy, const struct sched_param *param ); PARAMETERS thread The thread whose scheduling policy and associated parameters are to be set/retrieved.
pthread_getschedparam(3T) pthread_getschedparam(3T) (Pthread Library) [ESRCH] No thread could be found corresponding to thread. For each of the following conditions, if the condition is detected, the pthread_getschedparam() function returns the corresponding error number: [ESRCH] No thread could be found corresponding to thread. [EINVAL] The value specified by policy or param is invalid.
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 int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ); int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ); PARAMETERS mutex Pointer to the mutex whose prioceiling attribute is to be set/retrieved.
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 *mutex, const pthread_mutexattr_t *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 Pointer to the once-control object associated with the one-time initialization function init_routine(). init_routine The one-time initialization routine.
pthread_once(3T) pthread_once(3T) (Pthread Library) Rest of the code after initialization. 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) [ESRCH] The target thread thread is not in the current process. [EDEADLK] The target thread thread is the last running thread in the process. The operation would result in deadlock for the process. If any of the following occur, the pthread_continue() and pthread_resume_np() functions return the corresponding error number. [ESRCH] The target thread thread is not in the current process. [EINVAL] The value specified by flags is invalid.
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 *rwlock, const pthread_rwlockattr_t *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 int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *attr, int pshared); int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *attr, int *pshared); PARAMETERS attr pshared Pointer to the read-write lock attributes object whose attributes are to be set/retrieved.
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_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 *set, sigset_t *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. oset Pointer to where the previous signal mask will be returned.
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(), ptsname_r() - get the pathname of a slave pty (pseudo-terminal) SYNOPSIS #include char * ptsname (int fildes); char * ptsname_r (int fildes, char *slavename, int len); Remarks ptsname() and ptsname_r() support 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) fd_master = open("/dev/ptmx", O_RDWR); grantpt(fd_master); unlockpt(fd_master); 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(), fputc(), putchar(), putw(), putc_unlocked(), putchar_unlocked(), putw_unlocked() - put character or word on a stream SYNOPSIS #include
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(), puts_unlocked(), fputs_unlocked() - put a string on a stream SYNOPSIS #include int puts(const char *s); int fputs(const char *s, FILE *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 newline 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(), putwc_unlocked(), putwchar_unlocked(), fputwc_unlocked() - put a wide character on a stream file SYNOPSIS #include
putwc(3C) putwc(3C) RETURN VALUE On success, putwc() , putwc_unlocked(), fputwc() , fputwc_unlocked(), putwchar() , and putwchar_unlocked() each return the wide character corresponding to the value they have 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(), putws_unlocked(), fputws_unlocked() - put a wide-character string on a stream file SYNOPSIS #include int putws(const wchar_t *ws); int fputws(const wchar_t *ws, FILE *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) 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
re_comp(3X) re_comp(3X) (TO BE OBSOLETED) NAME re_comp(), re_exec() - compile and execute regular expressions SYNOPSIS #include char *re_comp(const char *string); int re_exec(const char *string); DESCRIPTION The re_comp() function converts a regular expression string (RE) into an internal form suitable for pattern matching. The re_exec() function compares the string pointed to by the string argument with the last regular expression passed to re_comp() .
re_comp(3X) re_comp(3X) (TO BE OBSOLETED) 2.5 A RE enclosed between the character sequences \( and \) is a RE that matches whatever the unadorned RE matches. 2.6 The expression \n matches the same string of characters as was matched by an expression enclosed between \( and \) earlier in the same RE. Here n is a digit; the sub-expression specified is that beginning with the n -th occurrence of \( counting from the left. For example, the expression ˆ\(.
realpath(3X) realpath(3X) NAME realpath() - resolve pathname SYNOPSIS #include char *realpath(const char *file_name, char *resolved_name); 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.
regcmp(3X) regcmp(3X) (TO BE OBSOLETED) NAME regcmp( ), regex( ) - compile and execute regular expression SYNOPSIS #include char *regcmp( const char *string1, /* string2, */ ... /*, (char *)0 */ ); char *regex(const char *re, const char *subject, ...); extern char *_ _loc1; Remarks The ANSI C ", ... " construct denotes a variable length argument list whose optional [or required] members are given in the associated comment (/* */ ).
regcmp(3X) regcmp(3X) (TO BE OBSOLETED) char *cursor, *newcursor, *ptr; ... newcursor = regex((ptr = regcmp("ˆ\n", 0)), cursor); free(ptr); Match through the string Testing3 and return the address of the character after the last matched character (cursor+11). The string Testing3 will be copied to the character array ret0 . char ret0[9]; char ∗newcursor, *name; ...
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 regexp: advance(), compile(), step(), ERROR(), GETC(), INIT, PEEKC(), RETURN(), UNGETC() - 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) 41 42 43 44 45 46 49 50 No remembered search string. \( \) imbalance. 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.
regexp(3X) regexp(3X) such as s/y*//g do not loop forever. The additional external variables sed and nbra are used for special purposes. EXTERNAL INFLUENCES Environment Variables LC_COLLATE 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.
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(), drem(), dremf(), dreml(), dremw(), dremq() - remainder functions SYNOPSIS #include
remainder(3M) remainder(3M) ERRORS If y is zero or x is infinite, remainder() sets errno to [EDOM]. Integrity Server Only HP-UX libm functions on Integrity servers do not set errno by default. For errno setting, compile with the +Olibmerrno option and the (default) +Olibcalls option. SEE ALSO fmod(3M), fabs(3M), remquo(3M), math(5). STANDARDS CONFORMANCE remainder() : SVID3, XPG4.
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); Itanium(R)-based System 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() - return stream to a remote command SYNOPSIS int rexec(char **ahost, int inport, const char *user, const char *passwd, const char *cmd, int *fd2p); 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. Upon completion of authentication, a file descriptor is returned for the socket to which standard input and standard output of cmd are attached.
rexec(3N) rexec(3N) Lost connection The program attempts to read from the socket and fails. This means the socket connection with the remote host was lost. .netrc: message Error in opening .netrc file in the home directory for a reason other than the file not existing. Error - .netrc file not correct mode. Remove password or correct mode. The .netrc file is readable, writable or executable by someone other than the owner. Next step: Check whether .
rexec(3N) rexec(3N) 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. Putting rexec() in the background will cause it to compete with the current shell process for input.
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 .
round(3M) round(3M) NAME round( ), roundf( ), roundl( ), roundw( ), roundq( ) - round functions SYNOPSIS #include double round(double x); Itanium(R)-based System 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.
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. Data Structures Some of the data structures used by the RPC package are shown below. The AUTH Structure union des_block { struct { u_int32 high; u_int32 low; } key; char c[8]; }; typedef union des_block des_block; extern bool_t xdr_des_block( ); /* * Authentication info. Opaque to client.
rpc(3N) rpc(3N) The SVCXPRT Structure enum xprt_stat { XPRT_DIED, XPRT_MOREREQS, XPRT_IDLE }; /* * Server side transport handle */ typedef struct { int%xp_fd; u_short struct xp_ops { bool_t enum xprt_stat bool_t bool_t bool_t xp_port; /* file descriptor for the server handle */ /* obsolete */ (*xp_recv)(); (*xp_stat)(); (*xp_getargs)(); (*xp_reply)(); (*xp_freeargs)(); /* /* /* /* /* void } *xp_ops; int (*xp_destroy)(); xp_addrlen; char *xp_tp; char struct netbuf struct netbuf char struct opaque_
rpc(3N) rpc(3N) }; /* * This is the number of bytes per unit of external data. */ #define BYTES_PER_XDR_UNIT (4) #define RNDUP(x) ((((x) + BYTES_PER_XDR_UNIT - 1) / BYTES_PER_XDR_UNIT) \ * BYTES_PER_XDR_UNIT) /* * A xdrproc_t exists for each data type which is to be encoded or * decoded. The second argument to the xdrproc_t is a pointer to * an opaque pointer. The opaque pointer generally points to a * structure of the data type to be decoded.
rpc(3N) clnt_freeres clnt_geterr clnt_pcreateerror clnt_perrno clnt_perror clnt_raw_create clnt_spcreateerror clnt_sperrno clnt_sperror clnt_tli_create clnt_tp_create clnt_udpcreate clnt_vc_create clntraw_create clnttcp_create clntudp_bufcreate get_myaddress getnetname host2netname key_decryptsession key_encryptsession key_gendes key_setsecret netname2host netname2user pmap_getmaps pmap_getport pmap_rmtcall pmap_set pmap_unset registerrpc rpc_broadcast rpc_broadcast_exp rpc_call rpc_reg svc_create svc_dest
rpc(3N) svcerr_progvers svcerr_systemerr svcerr_weakauth svcfd_create svcraw_create svctcp_create svcudp_bufcreate svcudp_create user2netname xdr_accepted_reply xdr_authsys_parms xdr_authunix_parms xdr_callhdr xdr_callmsg xdr_opaque_auth xdr_rejected_reply xdr_replymsg xprt_register xprt_unregister rpc(3N) rpc_svc_err (3N) rpc_svc_err (3N) rpc_svc_err (3N) rpc_soc(3N) rpc_soc(3N) rpc_soc(3N) rpc_soc(3N) rpc_soc(3N) secure_rpc(3N) rpc_xdr(3N) rpc_xdr(3N) rpc_soc(3N) rpc_xdr(3N) rpc_xdr(3N) rpc_xdr(3N) rpc
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) Async-signal Safe: No These functions can be called safely in a multithreaded environment. They may be cancellation points in that they call functions that are cancel points. In a multithreaded environment, these functions are not safe to be called by a child process after fork() and before exec() . These functions should not be called by a multithreaded application that support asynchronous cancellation or asynchronous signals.
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) server calls a dispatch routine to perform the requested service, and then sends back a reply. The clnt_call() , rpc_call() , and rpc_broadcast() routines handle the client side of the procedure call. The remaining routines deal with error handling in the case of errors. Some of the routines take a CLIENT handle as one of the parameters. A CLIENT handle can be created by an RPC creation routine such as clnt_create() (see rpc_clnt_create(3N)).
rpc_clnt_calls(3N) rpc_clnt_calls(3N) Warning: returns pointer to a buffer that is overwritten on each call. In multithread applications, this buffer is implemented as thread-specific data. enum clnt_stat rpc_broadcast() Like rpc_call() , except the call message is broadcast to all the connectionless transports specified by nettype. If nettype is NULL , it defaults to netpath .
rpc_clnt_create(3N) rpc_clnt_create(3N) NAME rpc_clnt_create(), clnt_control(), clnt_create(), clnt_create_vers(), clnt_destroy(), clnt_dg_create(), clnt_pcreateerror(), clnt_raw_create(), clnt_spcreateerror(), clnt_tli_create(), clnt_tp_create(), 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) Note: If you set the timeout value to 0 clnt_call() immediately returns an error (RPC_TIMEDOUT ). Set the timeout parameter to 0 for batching calls.
rpc_clnt_create(3N) private data structures, rpc_clnt_create(3N) including clnt itself. Use of clnt is undefined after calling clnt_destroy( ). If the RPC library opened the associated file descriptor, or CLSET_FD_CLOSE was set using clnt_control( ), the file descriptor will be closed. The caller should call auth_destroy(clnt→cl_auth) (before calling clnt_destroy()) to destroy the associated AUTH structure (see rpc_clnt_auth(3N)).
rpc_clnt_create(3N) rpc_clnt_create(3N) The address svcaddr should not be NULL and should point to the actual address of the remote program. clnt_vc_create() does not consult the remote rpcbind service for this information. struct rpc_createerr rpc_createerr; A global variable whose value is set by any RPC client handle creation routine that fails. It is used by the routine clnt_pcreateerror() to print the reason for the failure.
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_soc(3N) rpc_soc(3N) 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() - obsolete lib
rpc_soc(3N) rpc_soc(3N) void get_myaddress(struct sockaddr_in *addr ); struct pmaplist * pmap_getmaps(struct sockaddr_in *addr ); u_short pmap_getport(struct sockaddr_in *addr , u_long prognum , u_long versnum , u_long protocol ); enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr , u_long prognum , u_long versnum , u_long procnum , xdrproct_t inproc , char *in , xdrproct_t outproc , char *out , struct timeval tout , u_long *portp ); bool_t pmap_set(u_long prognum , u_long versnum , u_long protocol , u_
rpc_soc(3N) rpc_soc(3N) 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. Finally, the procedure call returns to the client. The routines described in this manpage have been superseded by other routines.
rpc_soc(3N) Warning: rpc_soc(3N) this routine exists for backward compatibility only, and is obsoleted 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) 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) 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)). Note: this procedure is only available for the UDP transport.
rpc_soc(3N) rpc_soc(3N) pointer. 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 clntraw_create(). 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) The svc_register() routine returns one 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_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) This function is safe in MT applications. It will have no effect if invoked in modes other than the User MT mode. void svc_exit(void) This function when called by any of the RPC server procedure or otherwise, destroys all services registered by the server and causes svc_run() to return. If RPC server activity is to be resumed, services must be reregistered with the RPC library either through one of the rpc_svc_create(3N) functions, or using xprt_register().
rpc_svc_calls(3N) rpc_svc_calls(3N) bool_t svc_sendreply() Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns TRUE if it succeeds, FALSE otherwise. This function macro is safe in MT applications utilizing the User MT modes.
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) SVCSET_CONNMAXREC Set the maximum record size, in bytes, for RPC requests and enable nonblocking mode for this service handle. The value can be set and read for both connection and connectionless-oriented transports, but it is silently ignored for the connectionless-oriented case. info is a pointer to an argument of type int . If the value pointed to by info is -1 , then the maximum record size is set to RPC_MAXDATASIZE.
rpc_svc_create(3N) rpc_svc_create(3N) handle if it succeeds, otherwise a NULL is returned and an error message is logged. SVCXPRT *svc_vc_create() This routine creates a connection-oriented RPC service and returns a pointer to it. This routine returns NULL if it fails, and an error message is logged. The users may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of 0 choose suitable defaults. The file descriptor fildes should be open and bound.
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) Async-cancel Safe: Async-signal Safe: rpc_svc_err(3N) 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 support 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) The svc_auth_reg() routine returns 0 if the registration is successful, 1 if cred_flavor already has an authentication handler registered for it, and -1 otherwise. void xprt_register() After RPC service transport handle xprt is created, it is registered with the RPC service package. This routine modifies the global variable svc_fdset (see rpc_svc_calls(3N)). Service implementors usually do not need this routine.
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) 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 support asynchronous cancellation or asynchronous signals. 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) must correspond to a network identifier that is defined by the netconfig database. This routine returns TRUE if it succeeds, FALSE otherwise. (See also svc_reg() in rpc_svc_calls(3N)). If there already exists such an entry with rpcbind , rpcb_set() will fail. bool_t rpcb_unset() An interface to the rpcbind service, which destroys the mapping between the triple [prognum, versnum, netconf→ →nc_netid] and the address on the machine’s rpcbind service.
rsqrt(3M) rsqrt(3M) (HP Integrity Server Only) NAME rsqrt(), rsqrtf(), rsqrtl(), rsqrtw(), rsqrtq(), invsqrt(), invsqrtf(), invsqrtl(), invsqrtw(), invsqrtq() - reciprocal square root functions SYNOPSIS #include
rsqrt(3M) rsqrt(3M) (HP Integrity Server Only) SEE ALSO sqrt(3M), math(5). STANDARDS CONFORMANCE These functions are not specified by any standard.
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); Itanium(R)-based System 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) Itanium-based System Only HP-UX libm functions on Itanium-based systems do not set errno by default. For errno setting, compile with the +Olibmerrno option. SEE ALSO scalbn(3M), scalbln(3M), ilogb(3M), ldexp(3M), logb(3M), math(5).
scalbln(3M) scalbln(3M) NAME scalbln( ), scalblnf( ), scalblnl( ), scalblnw( ), scalblnq( ) - scale exponent of a radix-independent floating-point number SYNOPSIS #include double scalbln(double x, long n); Itanium(R)-based System 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( ), scalbnw( ), scalbnq( ) - scale exponent of a radix-independent floating-point number SYNOPSIS #include double scalbn(double x, int n); Itanium(R)-based System 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 *, struct dirent ***, int (*) (const struct dirent *), int (*) (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) main() { int num_entries, i; struct dirent **namelist, **list; if ((num_entries = scandir("/tmp", &namelist, NULL, alphasort)) < 0) { fprintf(stderr, "Unexpected error\n"); exit(1); } printf("Number of entries is %d\n", num_entries); if (num_entries) { printf("Entries are:"); for (i=0, list=namelist; id_name); free(*list); list++; } free(namelist); printf("\n"); } printf("\n"); exit(0); } WARNINGS For 32-bit applications, the d_ino field
scanf(3S) scanf(3S) NAME scanf(), fscanf(), sscanf() - formatted input conversion, read from stream file SYNOPSIS #include int scanf(const char *format, /* [pointer,] */ ...); int fscanf(FILE *stream, const char *format, /* [pointer,] */ ...); int sscanf(const char *s, const char *format, /* [pointer,] */ ...); DESCRIPTION scanf() reads from the standard input stream stdin. fscanf() reads from the named input stream. sscanf() reads from the character string s.
scanf(3S) scanf(3S) 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, 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) 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. To include the right square bracket as an element of the scanset, it must appear as the first character (possibly preceded by a circumflex) of the scanset, in which case it will not be interpreted syntactically as the closing bracket.
scanf(3S) [EILSEQ] scanf(3S) 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)). EXAMPLES The call: int i, n; float x; char name[50]; n = scanf("%d%f%s", &i, &x, name); with the input line: 25 54.32E-1 thompson assigns to n the value 3, to i the value 25 , to x the value 5.432 , and name contains thompson\0 .
scanf(3S) scanf(3S) 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. SEE ALSO getc(3S), setlocale(3C), printf(3S), strtod(3C), strtol(3C), orientation(5), thread_safety(5). STANDARDS CONFORMANCE scanf() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.
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().
secdsc(3) secdsc(3) NAME secdsc: get_secdsc_ent(), set_secdsc(), end_secdsc() - get security attribute description entry from /etc/security.dsc SYNOPSIS #include ssize_t get_secdsc_ent(FILE **stream, struct secdsc_ent *attr, char *sbuf, const size_t length) int set_secdsc(FILE **stream) void end_secdsc(FILE **stream) DESCRIPTION get_secdsc_ent() obtains security attribute description entries from the /etc/security.dsc file.
secdsc(3) secdsc(3) SEE ALSO userdbck(1M), userdbget(1M), userdbset(1M).
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 HP-UX implementation of RPC only supports the X/Open Transport Interface (XTI). Applications that are written using the Transport Layer Interface (TLI) and wish to use RPC, must convert their application to XTI. Routines See rpc(3N) for the definition of the AUTH data structure. int authdes_getucred() authdes_getucred() is the first of the two routines which interface to the RPC secure authentication system known as AUTH_DES . The second is authdes_seccreate(), below.
secure_rpc(3N) associated secure_rpc(3N) with the effective UID of the calling process. It is the inverse of key_decryptsession(). This routine returns 0 if it succeeds, -1 if it fails. int key_gendes() key_gendes() is a keyserver interface routine. It is used to ask the keyserver for a secure conversation key. Choosing one at random is usually not good enough, because the common ways of choosing random numbers, such as using the current time, are very easy to guess.
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(), setvbuf_unlocked() - assign buffering to a stream file SYNOPSIS #include void setbuf(FILE *stream, char *buf); int setvbuf(FILE *stream, char *buf, int type, size_t size); 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.
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) setenv("NEWHOME","/tmp/HOME",1); The following code updates the variable HOME . 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.
setjmp(3C) setjmp(3C) NAME setjmp(), longjmp(), _setjmp(), _longjmp(), sigsetjmp(), siglongjmp() - nonlocal 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) Some implementations of Pascal support a ‘‘try/recover’’ mechanism, which also creates stack marker information. If a longjmp() operation occurs in a scope which is nested inside a try/recover, and the 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.
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() .
setlinebuf(3C) setlinebuf(3C) NAME setlinebuf() - assign buffering to a stream SYNOPSIS #include void setlinebuf( FILE *stream ); Parameters stream Pointer to the input/output stream. buffer Pointer to a character array. size The size of the buffer to be used. DESCRIPTION To use this function, compile with the option -I/usr/include/ep and link in the libcext library by specifying -lcext , for example: cc -I/usr/include/ep [flag]... cfile[...] -lcext [...
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) The structure returned through a call to getlocale() is overwritten during the next call to getlocale() . Be sure to save these values if they are to be used after a subsequent getlocale() call. 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 Itanium-based 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 Itanium-based 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) Integrity Systems Only shl_load_ia(3X) 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) Integrity Systems Only shl_load_ia(3X) [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) PA-RISC Systems Only shl_load_pa(3X) 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 The address of the symbol is returned in the variable pointed to by value. If the symbol is a thread local storage symbol, the address of the symbol is the value of the thread pointer + the starting address of the shared library + the offset of the symbol in the library. This routine returns 0 if successful; otherwise −1 is returned. See DIAGNOSTICS for errno settings. shl_definesym() Adds a symbol to the user hash table for the current process.
shl_load_pa(3X) PA-RISC Systems Only shl_load_pa(3X) struct shl_symbol { char *name, short type, void *value, shl_t handle, }; 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 MULTITHREAD USAGE These routines are safe to be called from multithreaded applications. Note: The 32-bit dynamic loader dld.sl serializes the loading and unloading of shared libraries in multithreaded applications using a pthread mutex lock. See the HP-UX Linker and Libraries Online User Guide for more information. DIAGNOSTICS If a library cannot be loaded, shl_load() returns NULL and sets errno to indicate the error.
shl_load_pa(3X) SEE ALSO System Tools ld(1) Miscellaneous dld.
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 Itanium(R)-based systems, the argument can be any floating type. For PA-RISC, the argument must be either double or float .
significand(3M) significand(3M) (HP Integiryt Server Only) NAME significand(), significandf(), significandl(), significandw(), significandq() - normalized significand functions SYNOPSIS #include
sigpause(3C) sigpause(3C) NAME sigpause - atomically release blocked signals and wait for interrupt SYNOPSIS #include long sigpause(long mask); DESCRIPTION sigpause() blocks signals according to the value of mask in the same manner as sigsetmask(2), then atomically waits for an unmasked signal to arrive. On return, sigpause() restores the current signal mask to the value that existed before the sigpause() call. When no signals are to be blocked, a value of 0L is used for mask.
sigset(3C) sigset(3C) NAME sigset(), sighold(), sigrelse(), sigignore(), sigpause() - signal management SYNOPSIS #include void (*sigset(int sig, void (*func)(int)))(int); int sighold(int sig); int sigrelse(int sig); int sigignore(int sig); int sigpause(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.
sigset(3C) sigset(3C) For the other functions, a 0 value indicates that the call succeeded. A -1 return value indicates an error occurred and errno is set to indicate the reason. ERRORS sigset() fails and the system signal action for sig is not changed if any of the following occur: [EFAULT] The func argument points to memory that is not a valid part of the process address space. Reliable detection of this error is implementation dependent.
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); Itanium(R)-based System 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) (Itanium(R)-based System Only) NAME sincos( ), sincosf( ), sincosl( ), sincosw( ), sincosq( ) - functions that compute both sine and cosine SYNOPSIS #include
sincosd(3M) sincosd(3M) (Itanium(R)-based System 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); Itanium(R)-based System 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); Itanium(R)-based System 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) (Itanium(R)-based System 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 - SLP (Service Location Protocol) Error codes SYNOPSIS #include typedef int SLPError; DESCRIPTION SLP Error Codes SLP APIs return error code when the call does not succeed. These SLP error codes are defined in .
SLPError(3N) SLP_BUFFER_OVERFLO SLPError(3N) -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. SLP_NETWORK_INIT_FAILED -20 This error indicates that the network cannot initialize properly.
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.
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); Itanium(R)-based System 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.
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) 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 *s, size_t maxsize, const char *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) strfmon(3C) As an other example, given the locale of en_US.roman8 and the values 123.45 , -123.45 and 3456.781 : Conversion Specification %n %11n %#5n %=*#5n %=0#5n %ˆ#5n %ˆ#5.0n %ˆ#5.4n %(#5n %!(#5n 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.
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) %x %X %y %Y %Z %% strftime(3C) 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. Time zone name (or by no characters if no time zone exists). The percent (%) character. The following directives are provided for backward compatibility with the directives supported by date(1) and the ctime(3C) functions. These directives may be removed in a future release.
strftime(3C) strftime(3C) with leading zeros. In the second case, if a directive supplies more bytes than specified by the precision, excess bytes will truncated on the right. If no field width or precision is specified for a d, H, I, m, M, S, U, W, y, or j directive, a default of .2 is used for all but j for which .3 is used. EXTERNAL INFLUENCES Locale The LC_TIME category determines the characters to be substituted for those directives described above as being from the locale.
strftime(3C) strftime(3C) Results are undefined if values contained in the structure pointed to by timeptr exceed the ranges defined for the tm structure (see ctime(3C)) or are not consistent (such as if the tm_yday element is set to 0, indicating the first day of January, while the tm_mon element is set to 11, indicating a day in December). AUTHOR strftime() was developed by HP. SEE ALSO date(1), ctime(3C), getdate(3C), setlocale(3C), environ(5), langinfo(5), thread_safety(5).
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) %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). %% is replaced by %.
strptime(3C) strptime(3C) 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. The alt_digit definition has precedence over alt_digits (LC_TIME ). Support for alt_digit may be removed in a future release of HP-UX. LC_TIME determines the characters to be interpreted for those directives described above as being from the locale.
strtoacl(3C) strtoacl(3C) NAME strtoacl(), strtoaclpatt(), strtoacl_r(), strtoaclpatt_r(), aclentrystart() - convert string form to access control list (ACL) structure (HFS File System only) SYNOPSIS #include
strtoacl(3C) strtoacl(3C) Entries with matching user and group ID values are not combined. Each entry input yields one entry in the returned array. 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.
strtoacl(3C) strtoacl(3C) strtoaclpatt() also sets values in global array aclentrystart[] to point to the start of each pattern entry it parsed in string, in some cases including leading or trailing whitespace. It only sets a number 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.
strtoacl(3C) strtoacl(3C) { error (...); } 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) AUTHOR strtoacl() and strtoaclpatt() were developed by HP. 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) APPLICATION USAGE To use (for Itanium-based systems) strtow() or strtoq() , compile with the -fpwidetypes option. 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 *str, char **ptr, int base); uintmax_t strtoumax(const char *str, char **ptr, int base); 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( ), atoi( ), strtoul( ), strtoll( ), strtoull( ) - convert string to integer SYNOPSIS #include
strtol(3C) strtol(3C) SEE ALSO ctype(3C), strtod(3C), strtoimax(3C), scanf(3S), thread_safety(5). 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() - synchronise 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) Valid States fd: T_INCON 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. RETURN VALUE Upon successful completion, a value of 0 is returned.
t_accept(3) t_accept(3) SEE ALSO t_connect(3), t_getstate(3), t_listen(3), t_open(3), t_rcvconnect(3).
t_alloc(3) t_alloc(3) NAME t_alloc() - allocate a 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) RETURN VALUE Upon successful completion, t_alloc() returns a pointer to the newly allocated structure. On failure, a null pointer is returned. 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.
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).
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) SEE ALSO fcntl(2), t_accept(3), t_alloc(3), t_getinfo(3), t_listen(3), t_open(3), t_rcvconnect(3).
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) FILES /usr/lib/nls/msg/C/libnsl_s.
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) connect t_getinfo(3) A value greater than or equal to zero specifies the maximum amount of data that may be associated with the connection establishment functions t_connect() and 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.
t_getinfo(3) t_getinfo(3) SEE ALSO t_alloc(3), t_open(3).
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.
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).
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) Obsolescent Interfaces When using TCP and UDP through HP XTI, name can be /dev/inet_cots and /dev/inet_clts, respectively. These names are supported for backward-compatibility purposes. They might not be supported in future releases, and they should be replaced with /dev/tcp and /dev/udp , respectively. 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.
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) XTI_SNDLOWAT t_optmgmt(3) This option is used to set a low-water mark in the send buffer. The option value gives the minimal number of bytes that must have accumulated in the send buffer before 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.
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) ERRORS On failure, t_errno is set to one of the following: [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.
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) ERRORS On failure, t_errno is set to one of the following: [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 .
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) t_rcvdis(3) [TNOTSUPPORT] This function is not supported by the underlying transport provider. [TOUTSTATE] (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 ).
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_rcvrel(3) t_rcvrel(3) STANDARDS CONFORMANCE t_rcvrel() : SVID2, XPG3, XPG4 t HP-UX 11i Version 2: December 2007 Update −2− Hewlett-Packard Company 523
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) [TNODATA] t_rcvudata(3) O_NONBLOCK was set, but no data units are currently available from the transport provider. [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.
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) t_rcvuderr(3) [TSYSERR] A system error 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 other suitable XTI (t_errno ). SEE ALSO t_look(3), t_rcvudata(3), t_sndudata(3).
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) Thread-Safeness The t_snd() function is safe to be called by multithreaded applications, and it is thread-safe for both POSIX Threads and DCE User Threads. It has a cancellation point. It is neither async-cancel safe nor async-signal safe. Finally, it is not fork-safe. Caveats It is important to remember that the transport provider treats all users of a transport endpoint as a single user.
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) [TBADDATA] (XTI only) The amount of user data specified was not within the bounds allowed by the transport provider. Some outbound data queued for this endpoint may be lost. [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.
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) t_sndudata(3) [TFLOW] Asynchronous mode is indicated because O_NONBLOCK was set, but the transport provider cannot accept the data because of flow-control restrictions. [TLOOK] (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.
t_strerror(3) t_strerror(3) NAME t_strerror() - produce an error message string SYNOPSIS #include int *t_strerror (errnum); int errnum; struct info *info; /* for X/OPEN Transport Interface - XTI */ DESCRIPTION The t_strerror() function maps the error number in errnum that corresponds to an XTI 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).
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); Itanium(R)-based System 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); Itanium(R)-based System 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); Itanium(R)-based System 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) (Itanium(R)-based System 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+ ).
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); Itanium(R)-based System 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) EXAMPLE 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) uc_access(3) (Itanium(R)-based platforms only) NAME uc_access: __uc_get_reason(), __uc_get_grs(), __uc_set_grs(), __uc_get_frs(), __uc_set_frs(), __uc_get_prs(), __uc_set_prs(), __uc_get_brs(), __uc_set_brs(), __uc_get_ip(), __uc_set_ip(), __uc_get_cfm(), __uc_set_cfm(), __uc_get_um(), __uc_set_um(), __uc_get_ar_rsc(), __uc_set_ar_rsc(), __uc_get_ar_bsp(), __uc_get_ar_bspstore(), __uc_get_ar_csd(), __uc_set_ar_csd(), __uc_get_ar_ssd(), __uc_set_ar_ssd(), __uc_get_ar_ccv(), __uc_set_ar_ccv(),
uc_access(3) uc_access(3) (Itanium(R)-based platforms only) int int int int int int int int int int int int int int int int int int int __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_access(3) uc_access(3) (Itanium(R)-based platforms 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) (Itanium(R)-based platforms 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) (Itanium(R)-based platforms 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) (Itanium(R)-based platforms 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) (Itanium(R)-based platforms 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.
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(), ungetc_unlocked() - 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(), ungetwc_unlocked() - 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_read(3) char *write_attrs[] = { "AUDIT_FLAG", "MIN_PASSWORD_LENGTH", "AUTH_MAXTRIES", 0 }; char *write_values[] = { "1", "7", "", 0 }; char *read_attrs[] = { "MIN_PASSWORD_LENGTH", "AUTH_MAXTRIES", "AUDIT_FLAG", 0 }; char *read_values[] = { p1, p2, p3, 0 }; if (userdb_write("joe", write_attrs, write_values)) exit(1); if (userdb_read("joe", read_attrs, read_values)) exit(2); printf ("p1=%s p2=%s p3=%s", p1, p2, p3); userdb_delete("amy"); After successful execution, the output is: p1=
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) funcp Pointer to a variable of type char * where the function name will be returned. If NULL, the function name will not be returned. If the function name is not available, a NULL 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.
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) typedef int (*lookupip_cb ) ( int request , uint64_t ip , intptr_t tok , uint64_t **resultp ); 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.
uwx_register_callbacks(3X) uwx_register_callbacks(3X) (Integrity Systems Only) UWX_LKUP_UTABLE A load module was found. The result vector contains load module and unwind table information. UWX_LKUP_NOTFOUND No information found for this IP. 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.
uwx_register_callbacks(3X) uwx_register_callbacks(3X) (Integrity Systems Only) UWX_KEY_LINENUM Source line number within the source file corresponding to the IP. UWX_KEY_INLINE An inline context identifier for use in stepping through inlined calls (if the current context is in 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.
uwx_register_callbacks(3X) uwx_register_callbacks(3X) (Integrity Systems Only) UWX_REG_AR_FPSR UWX_REG_AR_LC UWX_REG_AR_PFS UWX_REG_GR( x ) UWX_REG_FR( x ) UWX_REG_BR( x ) ar.fpsr ar.lc ar.pfs 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.
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
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.
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 *s, wchar_t wc, mbstate_t *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 size_t wcsftime( wchar_t *ws, size_t maxsize, const char *format, const struct tm *timeptr ); Multibyte Support Extension Only size_t wcsftime( wchar_t *ws, size_t maxsize, const wchar_t *format, const struct tm *timeptr ); Remarks: This function is compliant with the XPG4 Worldwide Portability Interface wide-character formatting functions.
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 the 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) Environment Variables TZ determines the time zone name substituted for the %Z and %z directives. The time zone name is determined by calling the function tzset() which sets the external variable tzname (see ctime(3C)). International Code Set Support Single and multibyte character code sets are supported.
wcsrtombs(3C) wcsrtombs(3C) NAME wcsrtombs( ) - convert a wide-character string to a character string (restartable) SYNOPSIS #include size_t wcsrtombs(char *dst, const wchar_t **src, size_t len, mbstate_t *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( ) - convert wide character string to double-precision number SYNOPSIS #include double wcstod(const wchar_t *nptr, wchar_t **endptr); Remarks: This function is compliant with the XPG4 Worldwide Portability Interface wide-character formatting functions. It parallels the 8-bit character formatting function defined in strtod(3C).
wcstoimax(3C) wcstoimax(3C) NAME wcstoimax( ), wcstoumax( ) - convert wide character string to long integer SYNOPSIS #include intmax_t wcstoimax(const wchar_t *nptr, wchar_t **endptr, int base); uintmax_t wcstoumax(const wchar_t *nptr, wchar_t **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) [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).
wcstring(3C) wcstring(3C) NAME wcstring(): 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) copied. The result is not null-terminated if the length of ws2 is n or more. Each function returns ws1. Note that wcsncpy() should not be used to copy an arbitrary structure. If that structure contains sizeof(wchar_t) consecutive null bytes, wcsncpy() may not copy the entire structure. Use the memcpy() function (see memory (3C)) to copy arbitrary binary data. wcslen() returns the number of wide characters in ws, not including the terminating null wide character.
wcstring(3C) wcstring(3C) Obsolescent Interface wcstok_r() performs wide character string operations. EXTERNAL INFLUENCES Locale The LC_COLLATE category determines the collation ordering used by the wcscoll() function. The LC_CTYPE category determines how widths are calculated by the wcwidth() and wcswidth() functions. ERRORS wcswidth() fails if the following condition is encountered: [EINVAL] ws is NULL or if ws contains an unprintable wide character.
wcstring(3C) wcstring(3C) SEE ALSO memory(3C), multibyte(3C), setlocale(3C), string(3C), wconv(3C), thread_safety(5).
wctype(3C) wctype(3C) NAME iswalpha( ), iswupper( ), iswlower( ), iswdigit( ), iswxdigit( ), iswalnum( ), iswspace( ), iswpunct( ), iswprint( ), iswgraph( ), iswcntrl( ), wctype( ), iswctype( ) - classify wide characters SYNOPSIS #include
wctype(3C) iswcntrl( wc ) wctype(3C) wc is a control character (in ASCII: character codes less than 040 and the delete character (0177)). If the argument to any of these functions is outside the domain of the function, the result is 0 (false). Definitions for these functions and the types wint_t , wchar_t , and wctype_t are provided in the header. EXTERNAL INFLUENCES Locale The LC_CTYPE category determines the classification of character type.
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) bool_t xdrrec_eof() This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns TRUE if there is no more data in the stream’s input buffer. It returns FALSE if there is additional data in the stream’s input buffer. int xdrrec_readbytes() This routine can be invoked only on streams created by xdrrec_create().
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) the xdrrec_create() function, if the x_ops field is still NULL , the call has failed. If the x_ops field contains some other value, the call can be assumed to have succeeded. The failure can not be detected in case of xdrmem_create() and xdrstdio_create() functions. 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.
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(), y0l(), y0w(), y0q(), y1(), y1f(), y1l(), y1w(), y1q(), yn(), ynf(), ynl(), ynw(), ynq() - Bessel functions of the second kind SYNOPSIS #include
y0(3M) y0(3M) SEE ALSO j0(3M), math(5). Handbook of Mathematical Functions, M. Abramowitz and I. Stegun, (New York: Dover Publications, 1972). STANDARDS CONFORMANCE y0() : SVID3, XPG4.2 y1() : SVID3, XPG4.2 yn() : SVID3, XPG4.
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.