HP-UX Reference Section 3: Library Functions (N-Z) HP-UX 11i Version 2 September 2004 Volume 7 of 10 Manufacturing Part Number : B2355-90845 Printed In USA E0904 Printed in USA © Copyright 1983-2004 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.
Revision History This document’s printing date and part number indicate its edition. The printing date changes when a new edition is printed. (Minor corrections and updates which are incorporated at reprint do not cause the date to change.) New editions of this manual incorporate all material updated since the previous edition. Part Number Date; Release; Format; Distribution B2355-60105 September 2004; HP-UX 11i version 2; one volume HTML; docs.hp.com and Instant Information.
audit (5) An HP-UX manpage. audit is the name and 5 is the section in the HP-UX Reference. On the web and on the Instant Information CD, it may be a hot link to the manpage itself. From the HP-UX command line, you can enter “man audit” or “man 5 audit” to view the manpage. See man (1). Book Title The title of a book. On the web and on the Instant Information CD, it may be a hot link to the book itself. KeyCap The name of a keyboard key. Note that Return and Enter both refer to the same key.
vi
Preface HP-UX is the Hewlett-Packard Company’s implementation of an operating system that is compatible with various industry standards. It is based on the UNIX 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 that displays them on the system.
viii
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 _UNW_clearAlertCode(): query values in unwind library data structure ................ see _UNW_getGR(3X) _UNW_createContext(): allocate and deallocate unwind library data structure .................................................................................................... see _UNW_createContextForSelf(3X) _UNW_createContextForSelf(3X): _UNW_createContextForSelf(), _UNW_createContext(), _UNW_destroyContext() ..............
Table of Contents Volumes Six and Seven Entry Name(Section): name Description acoshl() : arc hyperbolic cosine function (long double) ............................................................ see acosh(3M) acoshq() : arc hyperbolic cosine function (quad) ....................................................................... see acosh(3M) acoshw() : arc hyperbolic cosine function (extended) ................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description atan2dq() : degree-valued arctangent-and-quadrant function (quad) .................................... see atan2d(3M) atan2dw() : degree-valued arctangent-and-quadrant function (extended) .............................. see atan2d(3M) atan2f() : arctangent-and-quadrant function (float) ................................................................. see atan2(3M) atan2l() : arctangent-and-quadrant function (long double) ..........
Table of Contents Volumes Six and Seven Entry Name(Section): name Description blopen( ) - terminal block-mode library interface .................................................................... see blmode(3C) blread( ) - terminal block-mode library interface .................................................................... see blmode(3C) blset( ) - terminal block-mode library interface ...................................................................... see blmode(3C) border(3X): wborder() .........
Table of Contents Volumes Six and Seven Entry Name(Section): name Description catanhq() : complex arc hyperbolic tangent function (quad) .................................................. see catanh(3M) catanhw() : complex arc hyperbolic tangent function (extended) ............................................ see catanh(3M) catclose() : close NLS message catalog for reading ............................................................. see catopen(3C) catgets(3C): catgets() ..................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description clnt_destroy(): library routines for dealing with CLIENT handles, rpc ............. see rpc_clnt_create(3N) clnt_dg_create(): library routines for dealing with CLIENT handles, rpc ......... see rpc_clnt_create(3N) clnt_freeres(): library routine for client side calls, rpc ......................................... see rpc_clnt_calls(3N) clnt_geterr() : library routine for client side calls, rpc .....................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description coshf(): hyperbolic cosine function (float) .................................................................................. see cosh(3M) coshl(): hyperbolic cosine function (long double) ...................................................................... see cosh(3M) coshq(): hyperbolic cosine function (quad) .................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description csqrt(3M): csqrt(), csqrtf() , csqrtl() , csqrtw() , csqrtq() ................ complex square root functions csqrtf() : complex square root function (float) .......................................................................... see csqrt(3M) csqrtl() : complex square root function (long double) ............................................................... see csqrt(3M) csqrtq() : complex square root function (quad) .........
Table of Contents Volumes Six and Seven Entry Name(Section): name Description setupterm() ........................................................................................... interfaces to terminfo database del_curterm() : interface to terminfo database ............................................................ see del_curterm(3X) delay_output(3X) ............................................................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description elf64_getshdr(): retrieve class-dependent section header for ELF files ...................... see elf_getshdr(3E) elf64_newehdr(): retrieve class-dependent object file header for ELF files .................... see elf_getehdr(3E) elf64_newphdr(): retrieve class-dependent program header table for ELF files ............ see elf_getphdr(3E) elf64_xlatetof(): class-dependent data translation of ELF files ..............................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description endnetpath() : get /etc/netconfig entry corresponding to NETPATH component ...... see getnetpath(3N) endprdfent() : close system default database .................................................................... see getprdfent(3) endprotoent() : get, set, or end protocol entry .............................................................. see getprotoent(3N) endprpwent() : manipulate protected password database entry ..........
Table of Contents Volumes Six and Seven Entry Name(Section): name Description fclose(3S): fclose() , fflush() , fclose_unlocked(), fflush_unlocked() ................................................................................................................................ close or flush a stream fclose_unlocked(): close or flush a stream ............................................................................ see fclose(3S) fcpacl() : copy access control list (ACL) to another file .................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description floorw() : floor function (extended) ............................................................................................ see floor(3M) flushinp(3X): flushinp() .......................................................................................................... discard input fma(3M): fma(), fmaf(), fmal(), fmaw(), fmaq() ......................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description funflockfile(): explicit locking of streams within a multi-thread application .................. see flockfile(3S) fwide(3C): fwide() ....................................................................................................... set stream orientation fwprintf(3C): fwprintf() , wprintf() , swprintf() .......................................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description gethostbyname(): get network host entry ...................................................................... see gethostent(3N) gethostent(3N): endhostent() , endhostent_r(), gethostbyaddr(), gethostbyaddr_r(), gethostbyname(), gethostbyname_r(), gethostent() , gethostent_r(), sethostent() , sethostent_r() .....................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description getpwent() : get password file entry ................................................................................... see getpwent(3C) getresgid() : get real, effective, and saved group ID ........................................................... see getresuid(3) getresuid(3): getresuid() , getresgid() ..........................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description getwchar() : get a wide character from a stream file ................................................................ see getwc(3C) getwchar_unlocked(): get a wide character from a stream file ............................................. see getwc(3C) getwd(3C): getwd .......................................................................... get pathname of current working directory getwin(3X): getwin() , putwin() ...............
Table of Contents Volumes Six and Seven Entry Name(Section): name Description .................. check a cryptographic message integrity code (MIC) against a message to verify its integrity gss_wrap(3): gss_wrap() ......... attach a message integrity code (MIC) to a message, and optionally encrypt gss_wrap_size_limit(3): gss_wrap_size_limit() determine a token-size limit for gss_wrap on a context halfdelay(3X): halfdelay() ....................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description ........................................................................... input a complex character and rendition from a window in_wchnstr(3X): in_wchnstr() , in_wchstr() , mvin_wchnstr(), mvin_wchstr(), mvwin_wchnstr(), mvwin_wchstr(), win_wchnstr(), win_wchstr() ........................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description ............................................................................ insert a complex character and rendition into a window ins_wstr() : insert a wide-character string into a window ................................................... see ins_nwstr(3X) insch(3X): insch(), mvinsch() , mvwinsch() , winsch() .......................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description key_encryptsession(): library routines for secure remote procedure calls ................ see secure_rpc(3N) key_gendes() : library routines for secure remote procedure calls ................................. see secure_rpc(3N) key_name() : get name of key ..................................................................................................
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 memorymap() : display contents of memory allocator ................................................................ see malloc(3C) memset() : memory operations, set memory ........................................................................... see memory(3C) meta(3X): meta() ......................................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description mvscanw(3X): mvscanw() , mvwscanw() , scanw(), wscanw() ....... convert formatted input from a window mvvline() : draw lines from single-byte characters and renditions ............................................... see hline(3X) mvvline_set() : draw lines from complex characters and renditions .................................... see hline_set(3X) mvwadd_wch() : add a complex character and rendition to a window ..................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description nearbyintw(): round to nearest int function (extended) .............................................................. see rint(3M) net_aton(3C): net_aton() , net_ntoa() ....................... network station address string conversion routines net_ntoa() : network station address string conversion routines ..........................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description nis_list() : NIS+ table functions ..................................................................................... see nis_tables(3N) nis_local_directory(): NIS+ local names ........................................................ see nis_local_names(3N) nis_local_group(): NIS+ local names ................................................................ see nis_local_names(3N) nis_local_host(): NIS+ local names ..............
Table of Contents Volumes Six and Seven Entry Name(Section): name Description pair_content(): color manipulation functions ..................................................... see can_change_color(3X) pam(3): pam .................................................................................................. Pluggable Authentication Module pam_acct_mgmt(3): pam_acct_mgmt() ................................... perform PAM account validation procedures pam_authenticate(3): pam_authenticate() ..............
Table of Contents Volumes Six and Seven Entry Name(Section): name Description printw() : print formatted output in window ........................................................................ see mvprintw(3X) pthread(3T): pthread() ............................................................................ introduction to POSIX.1c Threads pthread_atfork(3T): pthread_atfork() ....................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description ................................................................ initialize or destroy a thread condition variable attribute object pthread_condattr_setpshared(): set the thread process-shared attribute .................................................................................... see pthread_condattr_getpshared(3T) pthread_continue(): continue execution of a thread ....................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description 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 ptsname(3C): ptsname() , ptsname_r() ........................................................... get the name of a slave pty ptsname_r() : get the name of a slave pty ............................................................................ see ptsname(3C) publickey() : retrieve public or secret key .................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description .................................................................................................................................... remainder functions remainderf() : remainder function (float) ....................................................................... see remainder(3M) remainderl() : remainder function (long double) ............................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description 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 CLIENT handles rpc_createerr(): library routines for dealing with CLIENT handles, rpc ...........
Table of Contents Volumes Six and Seven Entry Name(Section): name Description scalbnw() : scale exponent of a radix-independent floating-point number (extended) ............ see scalbn(3M) scalbq() : scale exponent of a radix-independent floating-point number (quad) ....................... see scalb(3M) scalbw() : scale exponent of a radix-independent floating-point number (extended) ................ see scalb(3M) scandir(3C): scandir() , alphasort() .........................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description setusershell() - rewind legal user shells file ............................................................... see getusershell(3C) setutent() : access utmp file entry ............................................................................................ see getut(3C) setutsent() : access/update routines for user-accounting database maintained by utmpd .........................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description sincosf() : both sine and cosine (float) .................................................................................... see sincos(3M) sincosl() : both sine and cosine (long double) ........................................................................ see sincos(3M) sincosq() : both sine and cosine (quad) ...................................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description snprintf() : print formatted output to a string ........................................................................ see printf(3S) spray(3N): spray() ....................................................................................... scatter data for network checking sprintf() : print formatted output to a string ...........................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description svc_create() : library routine for the creation of server handles, rpc ..................... see rpc_svc_create(3N) svc_destroy() : library routine for the creation of server handles, rpc ................... see rpc_svc_create(3N) svc_dg_create(): library routine for the creation of server handles, rpc .............. see rpc_svc_create(3N) svc_dg_enablecache(): library routine for RPC servers ......................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description t_open(3): t_open() ............................................................. X/OPEN TLI-XTI - establish transport endpoint t_optmgmt(3): t_optmgmt() ............................... X/OPEN TLI-XTI - manage options for transport endpoint t_rcv(3): t_rcv() .................................................................. X/OPEN TLI-XTI - receive data over connection t_rcvconnect(3): t_rcvconnect() ................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description tigetflag(3X): tigetflag() , tigetnum() , tigetstr() , tparm() ..................................................................................... retrieve capabilities from the terminfo database tigetnum() : retrieve capabilities from the terminfo database ............................................. see tigetflag(3X) tigetstr() : retrieve capabilities from the terminfo database .............................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description unlockpt(3C): unlockpt ......................................................... unlock a STREAMS pty master and slave pair untouchwin() : window refresh control functions ........................................................ see is_linetouched(3X) updatebwdb() : write records into new wtmps and btmps database ...................................... see bwtmps(3C) use_env(3X): use_env() ..........................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description wclrtobot() : clear from cursor to end of window ................................................................... see clrtobot(3X) wclrtoeol() : clear from cursor to end of line .......................................................................... see clrtoeol(3X) wcolor_set() : window attribute control functions ..................................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description wins_nwstr() : insert a wide-character string into a window ............................................... see ins_nwstr(3X) 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 .................................................
Table of Contents Volumes Six and Seven Entry Name(Section): name Description xdr_float() : library routine for external data representation ...................................... see xdr_simple(3N) 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 .........
Table of Contents Volumes Six and Seven Entry Name(Section): name Description yppasswd(3N): yppasswd() ......................................... update user password in Network Information Service ypprot_err() - Network Information Service client interface ................................................... see ypclnt(3C) ypupdate(3C): ypupdate() .....................................................................................
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() 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_ANY Represents any host accessible by this transport provider. HOST_ANY allows applications to specify a required service without specifying a particular host name. HOST_SELF_CONNECT Represents the host address that can be used to connect to the local host. HOST_BROADCAST Represents the address for all hosts accessible by this transport provider. Network requests to this address will be received by all machines. All fields of the nd_hostserv structure must be initialized.
netdir(3N) netdir(3N) 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. RETURN VALUE The netdir_perror() routine prints an error message on the standard output stating why one of the name-to-address mapping routines failed.
newpad(3X) newpad(3X) (CURSES) NAME newpad, pnoutrefresh, prefresh — pad management functions SYNOPSIS #include WINDOW *newpad(int nlines, int ncols); int pnoutrefresh(WINDOW *pad, int pminrow, int pmincol, int sminrow, int smincol, int smaxrow, int smaxcol); int prefresh(WINDOW *pad, int pminrow, int pmincol, int sminrow, int smincol, int smaxrow, int smaxcol); DESCRIPTION The newpad() function creates a specialised WINDOW data structure representing a pad with nlines lines and ncols columns.
newwin(3X) newwin(3X) (CURSES) NAME newwin, subwin — window creation functions SYNOPSIS #include WINDOW *newwin(int nlines, int ncols, int begin_y, int begin_x); WINDOW *subwin(WINDOW *orig, int nlines, int ncols, int begin_y, int begin_x); DESCRIPTION The newwin() function creates a new window with nlines lines and ncols columns, positioned so that the origin is (begin_y, begin_x). If nlines is zero, it defaults to LINES − begin_y; if ncols is zero, it defaults to COLS − begin_x.
nextafter(3M) nextafter(3M) NAME nextafter( ), nextafterf( ), nextafterl( ), nextafterw( ), nextafterq( ), nexttoward( ), nexttowardl( ), nexttowardw( ), nexttowardq( ) - next representable floating-point values nexttowardf( ), SYNOPSIS #include
nextafter(3M) nextafter(3M) RETURN VALUE If x equals y, nextafter() returns y, and nexttoward() returns y converted to the type of x. If x or y is NaN, nextafter() and nexttoward() return NaN. If x is finite and the correct function value would overflow, nextafter() and nexttoward() return ±HUGE_VAL (equal to +INFINITY), according to the sign of x, and raise the overflow exception. If the return value is denormal and x!=y, these functions raise the underflow and inexact floating-point exceptions.
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) the name it is searching for.
nis_db(3N) nis_db(3N) 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. db_add_entry() adds a copy of the given object to the specified table, replacing the one identified by the given attributes. If the given attributes identify more than one object, DB_NOTUNIQUE is returned.
nis_db(3N) nis_db(3N) 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 . . . -lnsl [ library. . . ] #include nis_name nis_local_directory(void); nis_name nis_local_host(void); nis_name nis_local_group(void); nis_name 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) On return, the objects array in the result will contain one and possibly several objects that were resolved by the request. If the FOLLOW_LINKS flag was present, on success the function could return several entry 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.
nis_names(3N) nis_names(3N) aticks The time spent in any ‘‘accelerators’’ or caches. This includes the time required to locate the server needed to resolve the request. cticks 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.
nis_names(3N) nis_names(3N) NIS_NOTMASTER An attempt was made to update the database on a replica server. 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_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) The group owner for the object is treated differently. The group owner member is optional (it should be the null string if not present) but must be fully qualified if present. A group name takes the form 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.
nis_objects(3N) nis_objects(3N) All object types define a structure that contains data specific to that type of object. The simplest are private objects which are defined to contain a variable length array of octets. Only the owner of the object is expected to understand the contents of a private object. The following section describe the other five object types in more significant detail. Directory Objects The first type of object is the directory object.
nis_objects(3N) nis_objects(3N) describing an X.500 namespace that is ‘‘under’’ the NIS+ directory eng.hp.com., this name might contain ‘‘/C=US, /O=Hewlett-Packard, /OU=Engineering/’’. The type of nameservice that is being described is determined by the value of the member do_type. 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.
nis_objects(3N) nis_objects(3N) nis_name } gr_members; *gr_members_val; } 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) The TA_SEARCHABLE flag specifies that values in this column can be searched. Searchable columns must contain textual data and must have a name associated with them. The flag TA_CASE specifies that searches involving this column ignore the case of the value in the column. At least one of the columns in the table should be searchable. Also, the combination of all searchable column values should uniquely select an entry within the table.
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. The parameter dirname identifies the directory with the change.
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_clone_object, nis_destroy_object, nis_print_object - NIS+ subroutines SYNOPSIS cc [ flag . . . ] file. . . nis_freenames, nis_dir_cmp, -lnsl [ library. . . ] #include
nis_subr(3N) nis_subr(3N) into 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_remove_entry, nis_modify_entry, nis_first_entry, nis_next_entry NIS+ table functions SYNOPSIS cc [ flag . . . ] file . . . -lnsl [ library. . . ] #include
nis_tables(3N) nis_tables(3N) either an 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_NOMEMORY nis_tables(3N) 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_NOSUCHTABLE The named table does not exist. NIS_NOT_ME A request was made to a server that does not serve the given name.
nis_tables(3N) nis_tables(3N) Environment Variables NIS_PATH When set, this variable is the search path used by nis_list() if the flag EXPAND_NAME is set. WARNINGS Use the flag HARD_LOOKUP carefully since it can cause the application to block indefinitely during a network partition. HP-UX 11i Version 2 is the last HP-UX release on which NIS+ is supported. LDAP is the recommended replacement for NIS+. HP fully supports the industry standard naming services based on LDAP.
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 16-bit 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) (For PA-RISC Systems) NAME nlist( ), nlist64( ) - get entries from name list 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) nlist(3E) (For Itanium(R)-based Systems) 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 and account expiration, as well as verifying access hour restrictions and terminal access restrictions for trusted mode.
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) The module can also store a cleanup function associated with the data. The PAM framework calls this cleanup function, when the application calls pam_end() to close the transaction. 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.
pam_sm(3) pam_sm(3) ERRORS If there are any errors, the modules should log them using syslog (3C) at the LOG_ERR level. 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.
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_IGNORE pam_sm_authenticate(3) Ignore underlying authentication module regardless of whether the control flag is required, optional or sufficient. SEE ALSO pam(3), pam_authenticate(3), pam.conf(4), pam_user.conf(4).
pam_sm_chauthtok(3) pam_sm_chauthtok(3) NAME pam_sm_chauthtok - Service provider implementation for pam_chauthtok SYNOPSIS cc [ flag . . . ] file . . . -lpam [ library . . . ] #include #include int pam_sm_chauthtok(pam_handle_t *pamh , int flags , int argc , const char **argv ); DESCRIPTION In response to a call to pam_chauthtok() the PAM framework calls pam_sm_chauthtok() from the modules listed in the pam.conf (4) file.
pam_sm_chauthtok(3) pam_sm_chauthtok(3) If a user’s password has aged or expired, a PAM account module could save this information as state in the authentication handle, pamh, using pam_set_data(). The related password management module could retrieve this information using pam_get_data() to determine whether or not it should prompt the user to update the password for this particular module. RETURN VALUES Upon successful completion, PAM_SUCCESS must be returned.
pam_sm_open_session(3) pam_sm_open_session(3) NAME pam_sm_open_session, pam_sm_close_session - Service provider implementation for pam_open_session and pam_close_session respectively SYNOPSIS cc [ flag . . . ] file . . . -lpam [ library . . . ] #include #include
pam_sm_setcred(3) pam_sm_setcred(3) NAME pam_sm_setcred - Service provider implementation for pam_setcred SYNOPSIS cc [ flag . . . ] file . . . -lpam [ library . . . ] #include #include int pam_sm_setcred(pam_handle_t *pamh , int flags , int argc , const char **argv ); DESCRIPTION In response to a call to pam_setcred(), the PAM framework calls pam_sm_setcred() from the modules listed in the pam.conf (4) file.
pam_start(3) pam_start(3) NAME pam_start, pam_end - authentication transaction routines for PAM SYNOPSIS 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) int resp_retcode; /* currently not used, should be set to 0 */ }; It is the responsibility of the 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 - 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 PRC_CSBIT_ERR /* select() failed */ /* connection has errored out */ PRC_CONN_NONE /* needs connection PRC_CONN1_WAIT /* waiting for stdio connect() PRC_CONN2_WAIT /* waiting for stderr connect() PRC_CONN3_WAIT /* waiting for remshd reply PRC_READ_WAIT /* waiting for data PRC_READ_READY /* data is ready to read PRC_CONN_DONE /* connection closed PRC_CONN_NO_IPS /* can’t get IP addresses PRC_CONN_FAILED /* various causes PRC_CONN_REFUSED /* by remote system PRC_CONN_
prcmd(3N) prcmd(3N) precision, to the second, using time(). In this case, prcmd() sets the prc_conn_status field for the host to PRC_CONN_TIMEOUT, and closes the files specified by the host’s prc_fp and prc_fp2 fields. A host specified by name can be listed with multiple IP addresses in the hosts database.
prcmd(3N) prcmd(3N) the standard error port). When neither connection is ready for reading, the prc_conn_status field is left unchanged. 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) types: 1. calling program communicates first 2. remote command communicates first If the calling program communicates first, it must use the prc_caller_status field, or other means, to remember whether or not it has sent initial data to the command; and it must send that data upon the host entering the PRC_READ_WAIT state the first time.
prcmd(3N) prcmd(3N) 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. If it is not a null pointer, message text is available from the remote remshd command; and the calling program must free() the pointer when done using the value. PRC_CONN_TIMEOUT • Connection timed out.
prcmd(3N) prcmd(3N) 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. EXAMPLES The following code fragment illustrates how to allocate and initialize an array of hosts, and call prcmd() once for the entire list of hosts: int index; struct prc_host prc_host [MAXHOSTS]; prcmd_init (prc_host, argc, 0, REMCMD, TIMEOUT); for (index = 0; index < argc; ++index) (prc_host[index].
prcmd(3N) prcmd(3N) open files if there are a lot of hosts; see setrlimit (2). AUTHOR prcmd() was developed by Hewlett-Packard. SEE ALSO remshd(1M), accept(2), bind(2), connect(2), errno(2), fcntl(2), read(2), select(2), setsockopt(2), sigvector(2), socket(2), time(2), fdopen(3S), fileno(3S), gethostbyname(3N), inet_addr(3N), malloc(3C), rcmd(3N), sleep(3C).
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) 5. printf(3S) A conversion character that indicates the type of conversion to be applied. 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.
printf(3S) printf(3S) zeros are removed from the fractional part of the result; a radix character appears only if it is followed by a digit. a,A For Itanium-based systems only. The double arg is converted in the style [-]0xhrhhhp±d, where r is the radix character.
printf(3S) printf(3S) The A, E, and G conversions will print INF for infinity and NAN for both quiet and signaling NaN values. There will be a new F conversion specifier that will be identical to the f conversion specifier except that it will print infinity and NaN as respectively, INF and NAN. For a and A conversions (on Itanium-based systems), the value is correctly rounded to a hexadecimal floating point number with the given precision.
printf(3S) printf(3S) [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)).
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 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. However, the attribute set may be used in multiple pthread_create() calls.
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 (via 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) 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) 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. Detached Thread A thread whose resources are automatically released by the system when the thread terminates. A detached thread cannot be joined by another thread. Consequently, detached threads cannot return an exit status.
pthread(3T) pthread(3T) (Pthread Library) 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. All processes have at least one thread. Each thread in the process executes within the process’ address space. Examples of process-shared resources are open file descriptors, message queue descriptors, mutexes, and semaphores.
pthread(3T) pthread(3T) (Pthread Library) 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. In the context of multithreaded programming, "shared objects" are global variables, file descriptors, and other such objects that require access by threads to be synchronized. Signal A signal is a simplified IPC mechanism that allows a process or thread to be notified of an event.
pthread(3T) pthread(3T) (Pthread Library) synchronization. Thread-Specific Data (TSD) Thread-specific data is global data that is specific to a thread. All threads access the same data variable. However, each thread has its own thread-specific value associated with this variable. errno is an example of thread-specific data. Thread Structure The operating system maintains a thread structure for each thread in the system. This structure represents the actual thread internally in the system.
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) 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_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. The attributes object attr must have previously been initialized with the function pthread_attr_init() before these functions are called.
pthread_attr_getdetachstate(3T) pthread_attr_getdetachstate(3T) (Pthread Library) ATTRIBUTE: stackaddr The legal values for the stackaddr attribute are: NULL This option specifies that the storage for the user stack of any threads created with this attributes object will be allocated and deallocated by the threads library. The application does not need to allocate and manage thread stacks. stack_address This option specifies the base address of a stack that the created thread will use.
pthread_attr_getdetachstate(3T) pthread_attr_getdetachstate(3T) (Pthread Library) 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. For a complete list of valid scheduling policies, refer to rtsched (2) and . POSIX.1c does not specify a default value for the schedpolicy attribute.
pthread_attr_getdetachstate(3T) pthread_attr_getdetachstate(3T) (Pthread Library) binding_type attribute is ignored. (pthread_spu_t)processor_id Threads created with this processor attribute are bound to the processor specified in the processor parameter. The type of binding (advisory or mandatory) is specified in the binding_type attribute.
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_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) [EFAULT] The cond parameter points to an illegal address. For each of the following conditions, if the condition is detected, the pthread_cond_destroy() function returns the corresponding error number: [EINVAL] cond is not a valid condition variable. [EBUSY] An attempt to destroy cond while it is in use by another thread. 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) } } } (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 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 Pointer to the location where the created thread’s ID is to be returned. attr 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 old_size The new default stack 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) 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. NOTES For the SCHED_FIFO and SCHED_RR scheduling policies, only the sched_priority member of the sched_param structure is required in the associated scheduling parameters.
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) 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 Thread to which the signal is to be delivered. sig 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 Pointer to the mutex to be initialized or destroyed.
pthread_mutex_init(3T) pthread_mutex_init(3T) (Pthread Library) [EFAULT] mutex parameter points to an illegal address. For each of the following conditions, if the condition is detected, the pthread_mutex_destroy() function returns the corresponding error number: [EINVAL] mutex is not a valid mutex. [EBUSY] mutex is currently locked or in use by another thread. 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) priority behavior is recursive and is passed on to the thread that owns the mutex on which this thread is blocked. 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 .
pthread_mutexattr_getprotocol(3T) pthread_mutexattr_getprotocol(3T) (Pthread Library) pthread_mutexattr_getprotocol(): POSIX 1003.1c.
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) 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. A thread attempting to unlock a mutex locked by a different thread shall return with an error.
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) The legal values for the spin attribute are: 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) [EINVAL] pthread_mutex_disable_handoff_np() was called after the process became multithreaded. WARNINGS The settings of the spin and yield attributes can, as well as improve application performance, easily lead to degraded performance. The CPU consumption of the application may be increased. Settings which work well for a small number of threads may do poorly for larger numbers of threads.
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) This information may be out-of-date arbitrarily soon after the call completes due to the scheduler context switching the caller onto another processor. 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 .
pthread_processor_bind_np(3T) pthread_processor_bind_np(3T) (Pthread Library) PTHREAD_BIND_FORCED_NP This request is identical to PTHREAD_BIND_ADVISORY_NP except that this thread to 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.
pthread_processor_bind_np(3T) pthread_processor_bind_np(3T) (Pthread Library) pthread_processor_bind_np(), pthread_pset_bind_np(), pthread_ldom_bind_np() functions return the corresponding error number: and [EINVAL] The request parameter contains an illegal value. [EINVAL] The spu or ldom parameter contains an invalid ID. [EINVAL] The request parameter is PTHREAD_GETNEXTSPU_NP and spu identifies the last processor.
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) For each of the following conditions, if the condition is detected, the pthread_rwlock_destroy() function returns the corresponding error number: [EINVAL] The value specified by rwlock is invalid. [EBUSY] rwlock is currently locked or being used by other threads. 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] 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) signal, and the process group of the process is orphaned. [ENOSPC] There was no free space remaining on the device containing the file. [EPIPE] An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal is also sent to the process. [EILSEQ] A wide character in ws does not correspond to a valid character. Additional errno values may be set by the underlying write() function (see write (2)).
qsort(3C) qsort(3C) NAME qsort( ) - quicksort SYNOPSIS #include void qsort( void *base, size_t nel, size_t size, int (*compar)(const void *, const void *) ); DESCRIPTION qsort() is an implementation of the quicksort algorithm. It sorts a table of data in place. base Pointer to the element at the base of the table. nel Number of elements in the table. size Size of each element in the table.
rand(3C) rand(3C) NAME rand( ), rand_r( ), srand( ) - simple random-number generator SYNOPSIS #include int rand(void); int rand_r(unsigned int *seed); void srand(unsigned int seed); DESCRIPTION rand() uses a multiplicative, congruential, random-number generator with period 232 that returns suc15 cessive pseudo-random numbers in the range from 0 to 2 −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.4 The concatenation of REs is a RE that matches the concatenation of the strings matched by each component of the RE. 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.
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) 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) 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. Opposite-case counterpoints for a multi-character collating element include all possible combinations of opposite-case counterpoints for each individual character comprising the collating element. These are then combined to form new valid multi-character collating elements.
regcomp(3C) regcomp(3C) regerror() provides a mapping from error codes returned by regcomp() and regexec() to printable strings. regerror() generates a string corresponding to the value of the errcode parameter, which was the last non-zero value returned by regcomp() or regexec() with the given value of preg . The errcode parameter can take on any of the error values defined in . If errbuf_size is not zero, regerror() copies an appropriate error message into the buffer specified by errbuf .
regcomp(3C) regcomp(3C) 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 #define #define #define #define #define INIT declarations GETC() getc statements PEEKC() peekc statements UNGETC(c) ungetc statements RETURN(pointer) return statements ERROR(val) error statements #include
regexp(3X) regexp(3X) 36 41 42 43 44 45 46 49 50 Illegal or missing delimiter. No remembered search string. \( \) imbalance. Too many \(. More than 2 numbers given in \{ \}. } expected after \. First number exceeds second in \{ \}. [ ] imbalance. Regular expression overflow.
regexp(3X) regexp(3X) advance() breaks out of the loop that backs up and returns zero. This is used by ed(1) and sed (1) for substitutions done globally (not just the first occurrence, but the whole line) so, for example, expressions 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.
reltimer(3C) reltimer(3C) NAME reltimer - relatively arm a per-process timer SYNOPSIS #include int reltimer( timer_t timerid, struct itimerspec *value, struct itimerspec *ovalue ); DESCRIPTION The reltimer() function sets the it_value of the specified timer to an offset from the current clock setting. If reltimer() specifies a value argument with the it_value member equal to zero, the timer is disabled. reltimer() updates the it_interval value of the timer to the value specified.
remainder(3M) remainder(3M) NAME remainder( ), remainderf( ), remainderl( ), remainderw( ), remainderq( ) - remainder functions SYNOPSIS #include double remainder(double x, double y); Itanium(R)-based System Only float remainderf(float x, float y); long double remainderl(long double x, long double y); extended remainderw(extended x, extended y); quad remainderq(quad x, quad y); DESCRIPTION The remainder() function returns the floating-point remainder r = x − ny when y is a nonzero number.
remainder(3M) remainder(3M) remainderf(), remainderl() : ISO/IEC C99 (including Annex F, ‘‘IEC 60559 floating-point arithmetic’’) A HP-UX 11i Version 2: September 2004 −2− Hewlett-Packard Company Section 3−−877 rA
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), lround(3M), llround(3M), round(3M), trunc(3M), math(5), fenv(5). lrint(3M), llrint(3M), 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 unsignedlong. RUSERSPROC_NAMES No arguments, returns utmparr or utmpidlearr, depending on version number. RUSERSPROC_ALLNAMES No arguments, returns utmparr or utmpidlearr, depending on version number. Returns listing even for utmp entries satisfying nonuser() in utmp.h. Versions: RUSERSVERS_ORIG RUSERSVERS_IDLE Structures: WARNINGS User applications that call this routine must be linked with /usr/lib/librpcsvc.a.
round(3M) round(3M) NAME round( ), roundf( ), roundl( ), roundw( ), roundq( ) - round functions SYNOPSIS #include double round(double x); 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) 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) 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_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_
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) 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) bool_t clnt_freeres() A function macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns 1 if the results were successfully freed, and 0 otherwise. void clnt_geterr() A function macro that copies the error structure out of the client handle to the structure at address errp .
rpc_clnt_calls(3N) rpc_clnt_calls(3N) the procedure’s results; in is the address of the procedure’s argument(s), and out is the address of where to place the result(s). nettype can be any of the values listed on rpc (3N). This routine returns RPC_SUCCESS if it succeeds, or an appropriate status is returned. Use the clnt_perrno() routine to translate failure status into error messages.
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) rpc_clnt_create(3N) void clnt_destroy() A function macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, 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.
rpc_clnt_create(3N) rpc_clnt_create(3N) routine returns NULL if it fails. 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) xdr_authunix_parms(XDR *xdrs , struct authunix_parms *aupp ); DESCRIPTION RPC routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a request to the server. Upon receipt of the request, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.
rpc_soc(3N) Warning: rpc_soc(3N) this routine exists for backward compatibility only, and is obsoleted by authsys_create() (see rpc_clnt_auth(3N)). AUTH * authunix_create_default(void) Call authunix_create() with the appropriate parameters. Warning: 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 .
rpc_soc(3N) rpc_soc(3N) addr ->sin_port is 0, it is set to port on which the remote program is listening on (the remote rpcbind service is consulted for this information). The parameter *fdp is a file descriptor, which may be open and bound; if it is RPC_ANYSOCK, then this routine opens a new one and sets *fdp . Refer to the File Descriptor section for more information. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out.
rpc_soc(3N) rpc_soc(3N) contains the RPC status. Warning: this routine exists for backward compatibility only, enhanced functionality is provided by rpcb_getaddr() (see rpcbind (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.
rpc_soc(3N) rpc_soc(3N) Warning: this interface is obsoleted by svc_fd_create() (see rpc_svc_create(3N)). SVCXPRT * svcraw_create(void); This routine creates an internal, memory-based RPC service transport, to which it returns a 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().
rpc_soc(3N) rpc_soc(3N) mapping of the triple [prognum , versnum , protocol ] to xprt ->xp_port is established with the local portmap service (generally protocol is 0, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form: dispatch(struct svc_req *request ,SVCXPRT *xprt ); 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)).
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) threads for servicing client requests. 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) itself with the rpcbind service. dispatch is called when there is a remote procedure call for the given prognum and versnum ; this requires calling svc_run(). svc_tp_create() returns the service 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.
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-signal Safe: rpc_svc_err(3N) 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_rejected_reply, xdr_replymsg - XDR library routines for remote procedure calls xdr_opaque_auth, 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) versnum , netconf → nc_netid] and svcaddr on the machine’s rpcbind service. The value of nc_netid 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.
rsqrt(3M) rsqrt(3M) (Itanium(R)-based System Only) NAME rsqrt( ), rsqrtf( ), rsqrtl( ), rsqrtw( ), rsqrtq( ) - reciprocal square root functions SYNOPSIS #include double rsqrt(double x); float rsqrtf(float x); long double rsqrtl(long double x); extended rsqrtw(extended x); quad rsqrtq(quad x); DESCRIPTION These functions are available only for Itanium-based systems. rsqrt() returns the reciprocal of the non-negative square root of x.
rstat(3N) rstat(3N) NAME rstat( ), havedisk( ) - get performance data from remote kernel SYNOPSIS #include #include int havedisk(char *host); int rstat(char *host, struct statstime *statp); DESCRIPTION havedisk() returns 1 if host has a disk, 0 if it does not, and −1 if this cannot be determined. The host string is either the official name of the host or an alias for it. See hosts (4) for more information regarding host names.
rstat(3N) rstat(3N) int if_ierrors; int if_opackets; int if_oerrors; int if_collisions; unsigned v_swtch; long avenrun[3]; struct timeval boottime; struct timeval curtime; /* /* /* /* /* /* /* /* inbound errors on all interfaces */ outbound packets on all interfaces */ outbound errors on all interfaces */ collisions seen on all interfaces */ total context switches */ average number of running jobs */ time of last boot */ current system time */ }; RPC Info Program number: RSTATPROG XDR routines: int x
rwall(3N) rwall(3N) NAME rwall( ) - write to specified remote machines SYNOPSIS #include int rwall(char *host, char *msg); DESCRIPTION rwall() causes host to print the string msg to all its users. It returns 0 if successful. RPC Info Program number: WALLPROG Procs: WALLPROC_WALL Takes string as argument (wrapstring), returns no arguments. Executes wall on remote host with string.
scalb(3M) scalb(3M) NAME scalb( ), scalbf( ), scalbl( ), scalbw( ), scalbq( ) - scale exponent of a radix-independent floating-point number SYNOPSIS #include double scalb(double x, double y); 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 y The scalb() function returns x * r , 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 floatingpoint 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 n The scalbln() function returns x ∗ r , 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 n The scalbn() function returns x ∗ r , 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) construct first-last , enabling [0123456789] to be expressed [0-9]. Using this convention, first must be lexically less than or equal to last ; otherwise, the dash stands for itself. The dash also stands for itself when it is the first or the last character in the scanset.
scanf(3S) [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 - 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. close_secdef closes the security configuration file.
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) secure_rpc(3N) and a DES key deskey , and encrypts it using the public key of the the server and the secret key associated 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.
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).
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.
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) corresponding setjmp() is not inside the scope of the try/recover, the recover block will not be executed and the currently active recover block will become the one enclosing the setjmp(), if one exists. WARNINGS A call to longjmp() to leave the guaranteed stack space reserved by sigspace() might remove the guarantee that the ordinary execution of the program will not extend into the guaranteed space.
setlabel(3C) setlabel(3C) NAME setlabel() - define label for formatting routines SYNOPSIS #include int setlabel(const char *label); DESCRIPTION The setlabel() system call defines a label to be printed by formatting routines (see pfmt (3C)) in the standard message format. label is a character string limited to 25 characters in length. If label is NULL or an empty string, the label is reset to no label. No label is defined before setla- bel().
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_gethandle_r(), shl_getsymbols(), shl_unload(), dld_getenv() - explicit load of shared libraries 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) shl_load_ia(3X) (For Itanium(R)-based System) NAME shl_load_ia: shl_load(), shl_definesym(), shl_findsym(), shl_get(), shl_get_r(), shl_gethandle_r(), shl_getsymbols(), shl_unload() - explicit load of shared libraries shl_gethandle(), SYNOPSIS #include
shl_load_ia(3X) shl_load_ia(3X) (For Itanium(R)-based System) 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). BIND_NONFATAL Default BIND_IMMEDIATE behavior is to treat all unsatisfied symbols as fatal.
shl_load_ia(3X) shl_load_ia(3X) (For Itanium(R)-based System) 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. Symbols overridden in this manner may become visible again if the overriding definition is removed. Possible symbol types include: TYPE_PROCEDURE Symbol is a function.
shl_load_ia(3X) shl_load_ia(3X) (For Itanium(R)-based System) 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. The handle argument should be the handle returned from a previous call to shl_load(). You can also get the handle from a call to dlopen().
shl_load_ia(3X) shl_load_ia(3X) (For Itanium(R)-based System) [EACCES] Read or execute permission is denied for the specified library. WARNINGS shl_unload() detaches the library from the process and frees the memory allocated for it, but does not break existing symbolic linkages into the library. In this respect, an unloaded shared library is much like a block of memory deallocated via free() (see malloc (3C)).
shl_load_pa(3X) shl_load_pa(3X) (For PA-RISC Systems) 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 SYNOPSIS #include
shl_load_pa(3X) shl_load_pa(3X) (For PA-RISC Systems) knowledge of the address space; currently, the address field is ignored, and assumed to be 0L. If the 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) (For PA-RISC Systems) DIAGNOSTICS for errno settings. shl_definesym() Adds a symbol to the user hash table for the current process. If value falls in the range of a currently loaded library, an association will be made and the symbol is undefined once the associated library is unloaded. The defined symbol can be overridden by a subsequent call to this routine or by loading a more visible library that provides a definition.
shl_load_pa(3X) shl_load_pa(3X) (For PA-RISC Systems) }; 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) (For PA-RISC Systems) If shl_findsym() cannot find the indicated symbol, errno is set to zero. On PA-RISC 32-bit systems only, if shl_findsym() finds the indicated symbol but cannot resolve all the symbols it depends on, errno is set to ENOSYM. ERRORS Possible values for errno include: [ENOEXEC] The specified file is not a shared library, or a format error was detected. [ENOSYM] Some symbol required by the shared library could not be found.
shl_load_pa(3X) shl_load_pa(3X) (For PA-RISC Systems) Texts and Tutorials HP-UX Linker and Libraries Online User Guide (See the +help option to ld(1)) HP-UX Linker and Libraries User’s Guide (See manuals (5) for ordering information) A sA Section 3−−980 Hewlett-Packard Company −6− HP-UX 11i Version 2: September 2004
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 floatingpoint 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.
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.
sin(3M) sin(3M) sinf(), sinl() : ISO/IEC C99 (including Annex F, ‘‘IEC 60559 floating-point arithmetic’’) A HP-UX 11i Version 2: September 2004 −2− Hewlett-Packard Company Section 3−−987 sA
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) SLPError(3N) If an unimplemented feature is used, this error is returned. SLP_BUFFER_OVERFLOW -18 An outgoing request overflowed the maximum network MTU size. The request should be reduced in size or broken into pieces and tried again. SLP_NETWORK_TIMED_OUT -19 This error is returned when no reply can be obtained in the time specified by the configured timeout interval for a unicast request. 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. RETURN VALUE These functions always return 1.
statfsdev(3C) statfsdev(3C) NAME statfsdev, fstatfsdev - get file system statistics SYNOPSIS #include int statfsdev(const char *path, struct statfs *buf); int fstatfsdev(int fildes, struct statfs *buf); DESCRIPTION statfsdev() returns information about the file system contained in the file specified by path . buf is a pointer to a statfs structure into which information is placed concerning the file system.
statfsdev(3C) statfsdev(3C) Both fstatfsdev() and statfsdev() fail if one or more of the following is true: [EAGAIN] Enforcement-mode record locking was set, and there was a blocking write lock. [EDEADLK] A resource deadlock would occur as a result of this operation. [EINTR] A system call was interrupted by a signal. [EINVAL] The file specified by path or filedes does not contain a file system of any known type.
statvfsdev(3C) statvfsdev(3C) NAME statvfsdev, fstatvfsdev - get file system information SYNOPSIS #include int statvfsdev(const char *path, struct statvfs *buf); int fstatvfsdev(int fildes, struct statvfs *buf); DESCRIPTION statvfsdev() returns information about the file system on the device file specified by path . The file system need not be mounted. fstatvfsdev() returns similar information for an open file.
statvfsdev(3C) statvfsdev(3C) 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.78 123.
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) 0. Locale’s appropriate date representation. Locale’s appropriate time representation. Year without century as a decimal number [00,99]. Year with century as a decimal number. 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) .p strftime(3C) The decimal digit string p specifies the minimum number of digits to appear for the d, H, I, j, m, M, o, S, U, w, W, y and Y directives, and the maximum number of bytes to be used from the a, A, b, B, c, D, E, F, h, n, N, p, r, t, T, x, X, z, Z, and % directives. In the first case, if a directive supplies fewer digits than specified by the precision, it will be expanded with leading zeros.
strftime(3C) strftime(3C) The range of values for %S ([0,61]) extends to 61 to allow for the occasional one or two leap seconds. However, the system does not accumulate leap seconds and the tm structure generated by the functions localtime() and gmtime() (see ctime (3C)) never reflects any leap seconds.
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) the strings that determines their relative ordering usually comes among the first few characters. 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.
string(3C) string(3C) strlen(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C 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.
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) January 19 03:14:07 UTC, 2038) or if the date exceeds the maximum date supported in 64-bit HP-UX (which is Friday December 31 23:59:59 UTC, 9999), strptime() fails and a null pointer is returned. EXTERNAL INFLUENCES Environment Variables LC_NUMERIC may define the alternative symbols (alt_digit; see localedef (4)) used by the %O modifier. 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.
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 int perfile = 0; entry; /* need to stat() and reparse per file? */ 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) 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) descriptors are allocated. 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. LOG_NOWAIT 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.
t_accept(3) t_accept(3) NAME t_accept() - accept a connect request SYNOPSIS #include /* or */ #include /* for X/OPEN Transport Interface - XTI */ /* 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) /usr/include/tiuser.h t_accept(3) TLI data structures SEE ALSO t_connect(3), t_getstate(3), t_listen(3), t_open(3), t_rcvconnect(3).
t_alloc(3) t_alloc(3) NAME t_alloc() - allocate a library structure SYNOPSIS #include /* or */ #include /* for X/OPEN Transport Interface - XTI */ /* 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 /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ int t_bind (fd, req, ret); int fd; struct t_bind *req; struct t_bind *ret; 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 XTI data structures /usr/include/xti_iso.h XTI data structures /usr/include/tiuser.h 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 /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ int t_close (fd); int fd; 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 /* or */ #include /* for X/OPEN Transport Interface - XTI */ /* 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 /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ void t_error (errmsg); char *errmsg; extern int t_errno; extern char *t_errlist[]; extern int t_nerr; 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 NLS message catalog for TLI /usr/lib/nls/msg/C/libnsl_s.
t_free(3) t_free(3) NAME t_free() - free a library structure SYNOPSIS #include /* or */ #include /* for X/OPEN Transport Interface - XTI */ /* 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 /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ int t_getinfo (fd, info); int fd; struct info *info; 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 /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ int t_getstate (fd); int fd; 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 /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ int t_listen (fd, call); int fd; struct t_call *call; 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 /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ int t_look (fd); int fd; 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 /* or */ #include /* for X/OPEN Transport Interface - XTI */ /* 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) async-signal safe. Finally, it is not fork-safe. 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.
t_optmgmt(3) t_optmgmt(3) NAME t_optmgmt() - manage options for a transport endpoint SYNOPSIS #include /* or */ #include /* for X/OPEN Transport Interface - XTI */ /* 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) attempts to send the pending data within the linger period before closing the endpoint. Data still pending after the linger period has elapsed is discarded. Depending on the implementation, t_close() or close() either block for at maximum the linger period, or immediately return, whereupon the system holds the connection in existence for at most the linger period.
t_optmgmt(3) t_optmgmt(3) XTI_SNDLOWAT 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 /* or */ #include /* for X/OPEN Transport Interface - XTI */ /* 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 /* or */ #include /* for X/OPEN Transport Interface - XTI */ /* 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 /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ int t_rcvdis (fd, discon); int fd; struct t_discon *discon; 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) [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). SEE ALSO t_alloc(3), t_connect(3), t_listen(3), t_open(3), t_snddis(3).
t_rcvrel(3) t_rcvrel(3) NAME t_rcvrel() - acknowledge receipt of an orderly release indication at a transport endpoint SYNOPSIS #include /* or */ #include /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ int t_rcvrel (fd); int fd; 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 A tA Section 3−−1082 Hewlett-Packard Company −2− HP-UX 11i Version 2: September 2004
t_rcvudata(3) t_rcvudata(3) NAME t_rcvudata() - receive a data unit from remote transport provider user SYNOPSIS #include /* or */ #include /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ int t_rcvudata (fd, unitdata, flags); inf fd; struct t_unitdata *unitdata; int *flags; DESCRIPTION The t_rcvudata() function is used in connectionless-mode to receive a data unit from a remote transport provider user.
t_rcvudata(3) t_rcvudata(3) [TNODATA] 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 /* or */ #include /* for X/OPEN Transport Interface - XTI */ /* 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 /* or */ #include /* for X/OPEN Transport Interface - XTI */ /* 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 /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ int t_snddis (fd, call); int fd; struct t_call *call; 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 /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ int t_sndrel (fd); int fd; 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 /* or */ #include /* for X/OPEN Transport Interface - XTI */ /* 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) [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. [TOUTSTATE] (XTI only) The t_sndudata() function was issued in the wrong sequence on the transport endpoint referenced by the fd parameter. [TSYSERR] A system error occurred during execution of this function.
t_strerror(3) t_strerror(3) NAME t_strerror() - produce an error message string SYNOPSIS #include /* for X/OPEN Transport Interface - XTI */ int *t_strerror (errnum); int errnum; struct info *info; 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 /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ int t_sync (fd); int fd; 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) (t_errno). 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 /* for X/OPEN Transport Interface - XTI */ /* for Transport Layer Interface - TLI */ int t_unbind (fd); int fd; 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.
tan(3M) tan(3M) tanf(), tanl() : ISO/IEC C99 (including Annex F, ‘‘IEC 60559 floating-point arithmetic’’) A HP-UX 11i Version 2: September 2004 −2− Hewlett-Packard Company Section 3−−1099 tA
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) /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 __uc_get_ar_unat(const ucontext_t *ucp, uint64_t *value); int __uc_set_ar_unat(ucontext_t *ucp, uint64_t value); int __uc_get_ar_fpsr(const ucontext_t *ucp, fpsr_t *value); int __uc_set_ar_fpsr(ucontext_t *ucp, fpsr_t value); int __uc_get_ar_pfs(const ucontext_t *ucp, pfs_t *value); int __uc_set_ar_pfs(ucontext_t *ucp, pfs_t value); int __uc_get_ar_lc(const ucontext_t *ucp, uint64_t *value); int __uc_set_ar_lc(ucontext_t *ucp, uint64_t value)
uc_access(3) uc_access(3) (Itanium(R)-based platforms only) __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. Only Static General Registers (GR1-GR31) may be written with this interface.
uc_access(3) uc_access(3) (Itanium(R)-based platforms only) __uc_get_cfm() Returns (in the value argument) the saved value of the Current Frame Marker Register. If the context was created in a syscall, value will be the frame marker corresponding to the function that called the kernel. __uc_set_cfm() Overwrites the saved value of the Current Frame Marker Register with value. __uc_get_um() Returns (in the value argument) the saved value of the User Mask Register.
uc_access(3) uc_access(3) (Itanium(R)-based platforms only) 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_get_ar_fpsr() Returns (in the value argument) the saved value of the AR.FPSR register. __uc_set_ar_fpsr() Overwrites the saved value of the AR.FPSR register with value.
uc_access(3) uc_access(3) (Itanium(R)-based platforms only) Reg 17 20 22 Register CR_ISR CR_IFA CR_IIPA Notes Only valid for certain types of interruptions. 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.
uwx(3X) uwx(3X) (Itanium(R)-based System Only) NAME uwx - Unwind Express library SYNOPSIS #include #include
uwx(3X) uwx(3X) (Itanium(R)-based System Only) 1. Call uwx_init() to create a new unwind environment. The return value is a pointer to the unwind environment. 2. Call uwx_self_init_info() to initialize the standard callback environment. The return value is a pointer to the callback info structure. 3. Call uwx_register_callbacks() to register uwx_self_copyin() and uwx_self_lookupip(). the standard callbacks: The steps above may be performed at any time in advance of performing a stack unwind.
uwx(3X) uwx(3X) (Itanium(R)-based System Only) UWX_REG_SP The stack pointer (SP). UWX_REG_BSP The backing store pointer (BSP). This value defines the point in the backing store where the current frame’s GR32 would be saved. UWX_REG_CFM The current frame marker (CFM) and epilogue counter (AR.EC), combined into one register as they are stored in AR.PFS. UWX_REG_PREDS Predicate registers PR0-PR63. Only the preserved predicates have meaningful values.
uwx(3X) uwx(3X) (Itanium(R)-based System Only) 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. The unwind engine uses this callback for two types of requests: UWX_LKUP_LOOKUP Requests the callback to lookup information for the given IP.
uwx(3X) uwx(3X) (Itanium(R)-based System Only) The Copy-In Callback The "Copy in" callback is used for obtaining values from the address space of the process being unwound. Its prototype is given in as follows: typedef int (*copyin_cb)( int request, char *loc, uint64_t rem, int len, intptr_t tok ); The unwind engine passes the following parameters to the callback routine: request Identifies the type of request that the unwind engine is making.
uwx(3X) uwx(3X) (Itanium(R)-based System Only) EXAMPLE The following code fragment performs a stack unwind in the current thread: int status; struct uwx_env *env; struct uwx_self_info *info; uint64_t ip; env = uwx_init(); info = uwx_self_init_info(env); status = uwx_register_callbacks(env, (intptr_t)info, uwx_self_copyin, uwx_self_lookupip); status = uwx_self_init_context(env); for (;;) { status = uwx_step(env); if (status != UWX_OK) break; status = uwx_get_reg(env, UWX_REG_IP, &ip); printf("IP: %016llx\n
uwx(3X) uwx(3X) (Itanium(R)-based System Only) UWX_ERR_BADREGID The register id is invalid. UWX_ERR_CANTUNWIND The unwind engine is unable to unwind from the current frame because of an unsupported descriptor. UWX_ERR_NOCALLBACKS No callback routines have been registered. UWX_ERR_NOCONTEXT No initial context has been supplied. AUTHOR The uwx routines were developed by Hewlett-Packard.
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 (*putwfunc)(int)); attr, short color_pair_number, void *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. ERRORS No errors are defined.
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 ); _INCLUDE__STDC_A1_SOURCE 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) %OH The hour (24-hour clock) using the locale’s alternative numeric symbols. %OI The hour (12-hour clock) using the locale’s alternative numeric symbols. %Om The month using the locale’s alternative numeric symbols. %OM The minutes using the locale’s alternative numeric symbols. %OS The seconds using the locale’s alternative numeric symbols. %Ou The weekday as a number in the locale’s alternative representation (Monday=1).
wcsftime(3C) wcsftime(3C) International Code Set Support Single- and multi-byte character code sets are supported. RETURN VALUE If the total number of resulting wide characters including the terminating null wide character is not more than maxsize, wcsftime() returns the number of wide characters placed into the array pointed to by ws, not including the terminating null wide character. Otherwise, zero is returned and the contents of the array are indeterminate.
wcsrtombs(3C) wcsrtombs(3C) NAME wcsrtombs( ) - convert a wide-character string to a character string (restartable) SYNOPSIS #include size_t wcsrtombs(char *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 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) 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) wcscpy(): XPG4 wcscspn(): XPG4 wcslen(): XPG4 wcsncat(): XPG4 wcsncmp(): XPG4 wcsncpy(): XPG4 wcspbrk(): XPG4 wcsrchr(): XPG4 wcsspn(): XPG4 wcstok(): XPG4 wcswcs(): XPG4 wcswidth(): XPG4 wcwidth(): XPG4 wcsxfrm(): XPG4 A HP-UX 11i Version 2: September 2004 −4− Hewlett-Packard Company Section 3−−1167 wA
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) After the second and each subsequent call, pwordexp->we_wordv points to a list containing the following: • 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) 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(). It attempts to read nbytes bytes from the XDR stream into the buffer pointed to by addr . On success this routine returns the number of bytes read, -1 on failure.
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) that 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) 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. They may be cancellation points in that they call functions that are cancel points.
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) This routine returns TRUE if it succeeds, FALSE otherwise. bool_t xdr_float() xdr_float() translates between C floats 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. The second argument is a pointer to the object itself.
xdr_simple(3N) Async-cancel Safe: Async-signal Safe: xdr_simple(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.
y0(3M) y0(3M) NAME y0( ), y0f( ), y1( ), y1f( ), yn( ), ynf( ) - Bessel functions of the second kind SYNOPSIS #include double y0(double x); double y1(double x); double yn(int n, double x); Itanium(R)-based System Only float y0f(float x); float y1f(float x); float ynf(int n, float x); DESCRIPTION y0() and y1() return Bessel functions of x of the second kind of orders 0 and 1 respectively. yn() returns the Bessel function of x of the second kind of order n.
ypclnt(3C) ypclnt(3C) NAME ypclnt( ), yp_all( ), yp_bind( ), yp_first( ), yp_get_default_domain( ), yp_master( ), yp_match( ), yp_next( ), yp_order( ), yp_unbind( ), yperr_string( ), ypprot_err( ) - Network Information Service client interface SYNOPSIS cc [ flag . . . ] file . . . -lnsl [ library . . . ] #include #include #include #include
ypclnt(3C) ypclnt(3C) int ypprot_err(unsigned int incode); Remarks The Network Information Service (NIS) was formerly known as Yellow Pages (yp). Although the name has changed, the functionality of the service remains the same. DESCRIPTION These functions provide an interface to the Network Information Service (NIS) network-lookup service.
ypclnt(3C) ypclnt(3C) Under conditions of heavy server load or server failure, the NIS domain may become unbound and bind again (perhaps to a different server) while a client is running. This process can cause a break in one of the enumeration (retrieval) rules: specific entries may be seen twice by the client or not at all. This approach protects the client from error messages that would otherwise be returned in the midst of the enumeration.
ypclnt(3C) yp_master() ypclnt(3C) Returns the host name of the master NIS server for a map. yperr_string() Returns a pointer to an error message string that is null-terminated, but contains no period or newline.
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.
ypupdate(3C) ypupdate(3C) NAME ypupdate - changes NIS information SYNOPSIS cc [ flag . . . ] file . . . -lnsl [ library. . . ] #include yp_update (domain, map, ypop, key, keylen, data, datalen) char *domain; char *map; unsigned ypop; char *key; int keylen; char *data; int datalen; Remarks The Network Information Service (NIS) was formerly known as Yellow Pages (yp). Although the name has changed, the functionality of the service remains the same.
(Notes) A (Notes) yA Section 3−−1192 Hewlett-Packard Company −1− HP-UX 11i Version 2: September 2004