©2004 by Marc J. Rochkind. All rights reserved. Portions marked "Open Source" may be copied under license.

 

Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

SUS_Summary

Go to the documentation of this file.
00001 /* Do not modify this file -- it was generated automatically. */
00002 /**
00003 \par Description:
00004 Clear fd_set bit
00005 (Std. UNIX; see AUP2 Sec. 4.2.3)
00006 \par Headers:
00007     sys/select.h
00008 */
00009 void FD_CLR(
00010 int fd, /**< file descriptor to clear*/
00011 fd_set *fdset   /**< fd_set*/
00012 );
00013 /**
00014 \par Description:
00015 Test fd_set bit
00016 (Std. UNIX; see AUP2 Sec. 4.2.3)
00017 \par Headers:
00018     sys/select.h
00019 \return 1 if set or 0 if clear (no error return)
00020 */
00021 int FD_ISSET(
00022 int fd, /**< file descriptor to test*/
00023 fd_set *fdset   /**< fd_set*/
00024 );
00025 /**
00026 \par Description:
00027 Set fd_set bit
00028 (Std. UNIX; see AUP2 Sec. 4.2.3)
00029 \par Headers:
00030     sys/select.h
00031 */
00032 void FD_SET(
00033 int fd, /**< file descriptor to set*/
00034 fd_set *fdset   /**< fd_set*/
00035 );
00036 /**
00037 \par Description:
00038 Clear entire fd_set
00039 (Std. UNIX; see AUP2 Sec. 4.2.3)
00040 \par Headers:
00041     sys/select.h
00042 */
00043 void FD_ZERO(
00044 fd_set *fdset   /**< fd_set to clear*/
00045 );
00046 /**
00047 \par Description:
00048 Terminate process without clean-up
00049 (Std. UNIX; see AUP2 Sec. 5.7)
00050 \par Headers:
00051     stdlib.h
00052 \return Does not return
00053 */
00054 void _Exit(
00055 int status  /**< exit status*/
00056 );
00057 /**
00058 \par Description:
00059 Terminate process without clean-up
00060 (Std. UNIX; see AUP2 Sec. 5.7)
00061 \par Headers:
00062     unistd.h
00063 \return Does not return
00064 */
00065 void _exit(
00066 int status  /**< exit status*/
00067 );
00068 /**
00069 \par Description:
00070 Jump to jump point without restoring signal mask
00071 (Std. UNIX; see AUP2 Sec. 9.6)
00072 \par Headers:
00073     setjmp.h
00074 */
00075 void _longjmp(
00076 jmp_buf loc_info,   /**< saved location information*/
00077 int val /**< value for setjmp to return*/
00078 );
00079 /**
00080 \par Description:
00081 Set jump point
00082 (Std. UNIX; see AUP2 Sec. 9.6)
00083 \par Headers:
00084     setjmp.h
00085 \return 0 if called directly, non-zero if from longjmp (no error return)
00086 */
00087 int _setjmp(
00088 jmp_buf loc_info    /**< saved location information*/
00089 );
00090 /**
00091 \par Description:
00092 Generate SIGABRT
00093 (Std. UNIX; see AUP2 Sec. 9.1.9)
00094 \par Headers:
00095     stdlib.h
00096 \return Does not return
00097 */
00098 void abort(void);
00099 /**
00100 \par Description:
00101 Accept new connection on socket and create new socket
00102 (Std. UNIX; see AUP2 Sec. 8.1.2)
00103 \par Headers:
00104     sys/socket.h
00105 \return file descriptor or -1 on error (sets errno)
00106 */
00107 int accept(
00108 int socket_fd,  /**< socket file descriptor*/
00109 struct sockaddr *sa,    /**< socket address or NULL*/
00110 socklen_t *sa_len   /**< address length*/
00111 );
00112 /**
00113 \par Description:
00114 Determine accessibility of file
00115 (Std. UNIX; see AUP2 Sec. 3.8.1)
00116 <p>R_OK     read permission 
00117 <br>W_OK        write permission 
00118 <br>X_OK        execute (search) permission 
00119 <br>F_OK        test for existence 
00120 \par Headers:
00121     unistd.h
00122 \return 0 if allowed or -1 if not or on error (sets errno)
00123 */
00124 int access(
00125 const char *path,   /**< pathname*/
00126 int what    /**< permission to be tested*/
00127 );
00128 /**
00129 \par Description:
00130 Cancel asynchronous I/O request
00131 (Std. UNIX; see AUP2 Sec. 3.9.5)
00132 \par Headers:
00133     aio.h
00134 \return result code or -1 on error (sets errno)
00135 */
00136 int aio_cancel(
00137 int fd, /**< file descriptor*/
00138 struct aiocb *aiocbp    /**< control block*/
00139 );
00140 /**
00141 \par Description:
00142 Retrieve error status for asynchronous I/O operation
00143 (Std. UNIX; see AUP2 Sec. 3.9.4)
00144 \par Headers:
00145     aio.h
00146 \return 0, errno value, or EINPROGRESS (does not set errno)
00147 */
00148 int aio_error(
00149 const struct aiocb *aiocbp  /**< control block*/
00150 );
00151 /**
00152 \par Description:
00153 Initiate buffer-cache flushing for one file
00154 (Std. UNIX; see AUP2 Sec. 3.9.6)
00155 \par Headers:
00156     aio.h
00157 \return 0 on success or -1 on error (sets errno)
00158 */
00159 int aio_fsync(
00160 int op, /**< O_SYNC or O_DSYNC*/
00161 struct aiocb *aiocbp    /**< control block*/
00162 );
00163 /**
00164 \par Description:
00165 Asynchronous read from file
00166 (Std. UNIX; see AUP2 Sec. 3.9.3)
00167 \par Headers:
00168     aio.h
00169 \return 0 on success or -1 on error (sets errno)
00170 */
00171 int aio_read(
00172 struct aiocb *aiocbp    /**< control block*/
00173 );
00174 /**
00175 \par Description:
00176 Retrieve return status of asynchronous I/O operation
00177 (Std. UNIX; see AUP2 Sec. 3.9.4)
00178 \par Headers:
00179     aio.h
00180 \return operation return value or -1 on error (sets errno)
00181 */
00182 ssize_t aio_return(
00183 struct aiocb *aiocbp    /**< control block*/
00184 );
00185 /**
00186 \par Description:
00187 Wait for asynchronous I/O request
00188 (Std. UNIX; see AUP2 Sec. 3.9.7)
00189 \par Headers:
00190     aio.h
00191 \return 0 on success or -1 on error (sets errno)
00192 */
00193 int aio_suspend(
00194 const struct aiocb *const list[],   /**< array of control blocks*/
00195 int cbcnt,  /**< number of elements in array*/
00196 const struct timespec *timeout  /**< max time to wait*/
00197 );
00198 /**
00199 \par Description:
00200 Asynchronous write to file
00201 (Std. UNIX; see AUP2 Sec. 3.9.3)
00202 \par Headers:
00203     aio.h
00204 \return 0 on success or -1 on error (sets errno)
00205 */
00206 int aio_write(
00207 struct aiocb *aiocbp    /**< control block*/
00208 );
00209 /**
00210 \par Description:
00211 Schedule an alarm signal
00212 (Std. UNIX; see AUP2 Sec. 9.7.1)
00213 \par Headers:
00214     unistd.h
00215 \return seconds left on previous alarm or zero if none (no error return)
00216 */
00217 unsigned alarm(
00218 unsigned secs   /**< seconds until signal*/
00219 );
00220 /**
00221 \par Description:
00222 Convert broken-down time to local-time string
00223 (Std. UNIX; see AUP2 Sec. 1.7.1)
00224 \par Headers:
00225     time.h
00226 \return string or NULL on error (errno not set)
00227 */
00228 char *asctime(
00229 const struct tm * tmbuf /**< broken-down time*/
00230 );
00231 /**
00232 \par Description:
00233 Register function to be called when process exits
00234 (Std. UNIX; see AUP2 Sec. 1.3.4)
00235 \par Headers:
00236     stdlib.h
00237 \return 0 on success, non-zero on error (errno not set)
00238 */
00239 int atexit(
00240 void (*fcn)(void)   /**< function to be called*/
00241 );
00242 /**
00243 \par Description:
00244 Bind name to socket
00245 (Std. UNIX; see AUP2 Sec. 8.1.2)
00246 \par Headers:
00247     sys/socket.h
00248 \return 0 on success or -1 on error (sets errno)
00249 */
00250 int bind(
00251 int socket_fd,  /**< socket file descriptor*/
00252 const struct sockaddr *sa,  /**< socket address*/
00253 socklen_t sa_len    /**< address length*/
00254 );
00255 /**
00256 \par Description:
00257 Get input speed from termios structure
00258 (Std. UNIX; see AUP2 Sec. 4.5.3)
00259 \par Headers:
00260     termios.h
00261 \return speed (no error return)
00262 */
00263 speed_t cfgetispeed(
00264 const struct termios *tp    /**< attributes*/
00265 );
00266 /**
00267 \par Description:
00268 Get output speed from termios structure
00269 (Std. UNIX; see AUP2 Sec. 4.5.3)
00270 \par Headers:
00271     termios.h
00272 \return speed (no error return)
00273 */
00274 speed_t cfgetospeed(
00275 const struct termios *tp    /**< attributes*/
00276 );
00277 /**
00278 \par Description:
00279 Set input speed in termios structure
00280 (Std. UNIX; see AUP2 Sec. 4.5.3)
00281 \par Headers:
00282     termios.h
00283 \return 0 on success or -1 on error (may set errno)
00284 */
00285 int cfsetispeed(
00286 struct termios *tp, /**< attributes*/
00287 speed_t speed   /**< speed*/
00288 );
00289 /**
00290 \par Description:
00291 Set output speed in termios structure
00292 (Std. UNIX; see AUP2 Sec. 4.5.3)
00293 \par Headers:
00294     termios.h
00295 \return 0 on success or -1 on error (may set errno)
00296 */
00297 int cfsetospeed(
00298 struct termios *tp, /**< attributes*/
00299 speed_t speed   /**< speed*/
00300 );
00301 /**
00302 \par Description:
00303 Change current directory by path
00304 (Std. UNIX; see AUP2 Sec. 3.6.2)
00305 \par Headers:
00306     unistd.h
00307 \return 0 on success or -1 on error (sets errno)
00308 */
00309 int chdir(
00310 const char *path    /**< pathname*/
00311 );
00312 /**
00313 \par Description:
00314 Change mode of file by path
00315 (Std. UNIX; see AUP2 Sec. 3.7.1)
00316 \par Headers:
00317     sys/stat.h
00318 \return 0 on success or -1 on error (sets errno)
00319 */
00320 int chmod(
00321 const char *path,   /**< pathname*/
00322 mode_t mode /**< new mode*/
00323 );
00324 /**
00325 \par Description:
00326 Change owner and group of file by path
00327 (Std. UNIX; see AUP2 Sec. 3.7.2)
00328 \par Headers:
00329     unistd.h
00330 \return 0 on success or -1 on error (sets errno)
00331 */
00332 int chown(
00333 const char *path,   /**< pathname*/
00334 uid_t uid,  /**< new user ID*/
00335 gid_t gid   /**< new group ID*/
00336 );
00337 /**
00338 \par Description:
00339 Change root directory
00340 (Std. UNIX; see AUP2 Sec. 5.14)
00341 \par Headers:
00342     unistd.h
00343 \return 0 on success or -1 on error (sets errno)
00344 */
00345 int chroot(
00346 const char *path    /**< path name*/
00347 );
00348 /**
00349 \par Description:
00350 Get execution time
00351 (Std. UNIX; see AUP2 Sec. 1.7.2)
00352 \par Headers:
00353     time.h
00354 \return time in CLOCKS_PER_SEC or -1 on error (errno not set)
00355 */
00356 clock_t clock(void);
00357 /**
00358 \par Description:
00359 Get process CPU-time clock
00360 (Std. UNIX; see AUP2 Sec. 9.7.5)
00361 \par Headers:
00362     time.h
00363 \return 0 on success or error number on error
00364 */
00365 int clock_getcpuclockid(
00366 pid_t pid,  /**< process ID*/
00367 clockid_t *clock_id /**< returned clock ID*/
00368 );
00369 /**
00370 \par Description:
00371 Get clock resolution
00372 (Std. UNIX; see AUP2 Sec. 9.7.5)
00373 \par Headers:
00374     time.h
00375 \return 0 on success or -1 on error (sets errno)
00376 */
00377 int clock_getres(
00378 clockid_t clock_id, /**< clock ID*/
00379 struct timespec *res    /**< resolution*/
00380 );
00381 /**
00382 \par Description:
00383 Get time from clock
00384 (Std. UNIX; see AUP2 Sec. 9.7.5)
00385 \par Headers:
00386     time.h
00387 \return 0 on success or -1 on error (sets errno)
00388 */
00389 int clock_gettime(
00390 clockid_t clock_id, /**< clock ID (CLOCK_REALTIME, etc.)*/
00391 struct timespec *tp /**< time*/
00392 );
00393 /**
00394 \par Description:
00395 Suspend execution for nanoseconds or until signal
00396 (Std. UNIX; see AUP2 Sec. 9.7.5)
00397 \par Headers:
00398     time.h
00399 \return 0 on success or error number on error
00400 */
00401 int clock_nanosleep(
00402 clockid_t clock_id, /**< clock ID*/
00403 int flags,  /**< TIMER_ABSTIME or zero*/
00404 const struct timespec *nsecs,   /**< nanoseconds to sleep*/
00405 struct timespec *remain /**< remaining time*/
00406 );
00407 /**
00408 \par Description:
00409 Set clock
00410 (Std. UNIX; see AUP2 Sec. 9.7.5)
00411 \par Headers:
00412     time.h
00413 \return 0 on success or -1 on error (sets errno)
00414 */
00415 int clock_settime(
00416 clockid_t clock_id, /**< clock ID*/
00417 const struct timespec *tp   /**< time*/
00418 );
00419 /**
00420 \par Description:
00421 Close file descriptor
00422 (Std. UNIX; see AUP2 Sec. 2.11)
00423 \par Headers:
00424     unistd.h
00425 \return 0 on success or -1 on error (sets errno)
00426 */
00427 int close(
00428 int fd  /**< file descriptor*/
00429 );
00430 /**
00431 \par Description:
00432 Close directory
00433 (Std. UNIX; see AUP2 Sec. 3.6.1)
00434 \par Headers:
00435     dirent.h
00436 \return 0 on success or -1 on error (sets errno)
00437 */
00438 int closedir(
00439 DIR *dirp   /**< DIR pointer from opendir*/
00440 );
00441 /**
00442 \par Description:
00443 Get configuration string
00444 (Std. UNIX; see AUP2 Sec. 1.5.7)
00445 \par Headers:
00446     unistd.h
00447 \return size of value or 0 on error (sets errno on error)
00448 */
00449 size_t confstr(
00450 int name,   /**< option or limit name*/
00451 char *buf,  /**< returned string value*/
00452 size_t len  /**< size of buf*/
00453 );
00454 /**
00455 \par Description:
00456 Connect socket
00457 (Std. UNIX; see AUP2 Sec. 8.1.2)
00458 \par Headers:
00459     sys/socket.h
00460 \return 0 on success or -1 on error (sets errno)
00461 */
00462 int connect(
00463 int socket_fd,  /**< socket file descriptor*/
00464 const struct sockaddr *sa,  /**< socket address*/
00465 socklen_t sa_len    /**< address length*/
00466 );
00467 /**
00468 \par Description:
00469 Create or truncate a file for writing
00470 (Std. UNIX; see AUP2 Sec. 2.4.2)
00471 \par Headers:
00472     sys/stat.h
00473     , fcntl.h
00474 \return file descriptor  or -1 on error (sets errno)
00475 */
00476 int creat(
00477 const char *path,   /**< pathname*/
00478 mode_t perms    /**< permissions*/
00479 );
00480 /**
00481 \par Description:
00482 Get pathname for controlling terminal
00483 (Std. UNIX; see AUP2 Sec. 4.7)
00484 \par Headers:
00485     stdio.h
00486 \return pathname or empty string on error (errno not set)
00487 */
00488 char *ctermid(
00489 char *buf   /**< buffer of size L_ctermid or NULL*/
00490 );
00491 /**
00492 \par Description:
00493 Convert time_t to local-time string
00494 (Std. UNIX; see AUP2 Sec. 1.7.1)
00495 \par Headers:
00496     time.h
00497 \return string or NULL on error (errno not set)
00498 */
00499 char *ctime(
00500 const time_t *t /**< time*/
00501 );
00502 /**
00503 \par Description:
00504 Subtract two time_t values
00505 (Std. UNIX; see AUP2 Sec. 1.7.1)
00506 \par Headers:
00507     time.h
00508 \return time1 - time0 in seconds (no error return)
00509 */
00510 double difftime(
00511 time_t time1,   /**< time*/
00512 time_t time0    /**< time*/
00513 );
00514 /**
00515 \par Description:
00516 Duplicate file descriptor
00517 (Std. UNIX; see AUP2 Sec. 6.3)
00518 \par Headers:
00519     unistd.h
00520 \return new file descriptor or -1 on error (sets errno)
00521 */
00522 int dup(
00523 int fd  /**< file descriptor to duplicate*/
00524 );
00525 /**
00526 \par Description:
00527 Duplicate file descriptor
00528 (Std. UNIX; see AUP2 Sec. 6.3)
00529 \par Headers:
00530     unistd.h
00531 \return new file descriptor or -1 on error (sets errno)
00532 */
00533 int dup2(
00534 int fd, /**< file descriptor to duplicate*/
00535 int fd2 /**< file descriptor to use*/
00536 );
00537 /**
00538 \par Description:
00539 End host-database scan
00540 (Std. UNIX; see AUP2 Sec. 8.8.1)
00541 \par Headers:
00542     netdb.h
00543 */
00544 void endhostent(void);
00545 /**
00546 \par Description:
00547 End network-database scan
00548 (Std. UNIX; see AUP2 Sec. 8.8.2)
00549 \par Headers:
00550     netdb.h
00551 */
00552 void endnetent(void);
00553 /**
00554 \par Description:
00555 End protocol-database scan
00556 (Std. UNIX; see AUP2 Sec. 8.8.3)
00557 \par Headers:
00558     netdb.h
00559 */
00560 void endprotoent(void);
00561 /**
00562 \par Description:
00563 End service-database scan
00564 (Std. UNIX; see AUP2 Sec. 8.8.4)
00565 \par Headers:
00566     netdb.h
00567 */
00568 void endservent(void);
00569 /**
00570 \par Description:
00571 Execute file with argument list
00572 (Std. UNIX; see AUP2 Sec. 5.3)
00573 \par Headers:
00574     unistd.h
00575 \return -1 on error (sets errno)
00576 */
00577 int execl(
00578 const char *path,   /**< program pathname*/
00579 const char *arg0,   /**< first arg (file name)*/
00580 const char *arg1,   /**< second arg*/
00581 ...,    /**< remaining args*/
00582 NULL    /**< arg list terminator*/
00583 );
00584 /**
00585 \par Description:
00586 Execute file with argument list and environment
00587 (Std. UNIX; see AUP2 Sec. 5.3)
00588 \par Headers:
00589     unistd.h
00590 \return -1 on error (sets errno)
00591 */
00592 int execle(
00593 const char *path,   /**< program pathname*/
00594 const char *arg0,   /**< first arg (file name)*/
00595 const char *arg1,   /**< second arg*/
00596 ...,    /**< remaining args*/
00597 NULL    /**< arg list terminator*/
00598 char *const envv[]*/    /**< environment vector*/
00599 );
00600 /**
00601 \par Description:
00602 Execute file with argument list and PATH search
00603 (Std. UNIX; see AUP2 Sec. 5.3)
00604 \par Headers:
00605     unistd.h
00606 \return -1 on error (sets errno)
00607 */
00608 int execlp(
00609 const char *file,   /**< program file name*/
00610 const char *arg0,   /**< first arg (file name)*/
00611 const char *arg1,   /**< second arg*/
00612 ...,    /**< remaining args*/
00613 NULL    /**< arg list terminator*/
00614 );
00615 /**
00616 \par Description:
00617 Execute file with argument vector
00618 (Std. UNIX; see AUP2 Sec. 5.3)
00619 \par Headers:
00620     unistd.h
00621 \return -1 on error (sets errno)
00622 */
00623 int execv(
00624 const char *path,   /**< program pathname*/
00625 char *const argv[]  /**< argument vector*/
00626 );
00627 /**
00628 \par Description:
00629 Execute file with argument vector and environment
00630 (Std. UNIX; see AUP2 Sec. 5.3)
00631 \par Headers:
00632     unistd.h
00633 \return -1 on error (sets errno)
00634 */
00635 int execve(
00636 const char *path,   /**< program pathname*/
00637 char *const argv[], /**< argument vector*/
00638 char *const envv[]  /**< environment vector*/
00639 );
00640 /**
00641 \par Description:
00642 Execute file with argument vector and PATH search
00643 (Std. UNIX; see AUP2 Sec. 5.3)
00644 \par Headers:
00645     unistd.h
00646 \return -1 on error (sets errno)
00647 */
00648 int execvp(
00649 const char *file,   /**< program file name*/
00650 char *const argv[]  /**< argument vector*/
00651 );
00652 /**
00653 \par Description:
00654 Terminate process with clean-up
00655 (Std. UNIX; see AUP2 Sec. 5.7)
00656 \par Headers:
00657     stdlib.h
00658 \return Does not return
00659 */
00660 void exit(
00661 int status  /**< exit status*/
00662 );
00663 /**
00664 \par Description:
00665 Change current directory by file descriptor
00666 (Std. UNIX; see AUP2 Sec. 3.6.2)
00667 \par Headers:
00668     unistd.h
00669 \return 0 on success or -1 on error (sets errno)
00670 */
00671 int fchdir(
00672 int fd  /**< file descriptor*/
00673 );
00674 /**
00675 \par Description:
00676 Change mode of file by file descriptor
00677 (Std. UNIX; see AUP2 Sec. 3.7.1)
00678 \par Headers:
00679     sys/stat.h
00680 \return 0 on success or -1 on error (sets errno)
00681 */
00682 int fchmod(
00683 int fd, /**< file descriptor*/
00684 mode_t mode /**< new mode*/
00685 );
00686 /**
00687 \par Description:
00688 Change owner and group of file by file descriptor
00689 (Std. UNIX; see AUP2 Sec. 3.7.2)
00690 \par Headers:
00691     unistd.h
00692 \return 0 on success or -1 on error (sets errno)
00693 */
00694 int fchown(
00695 int fd, /**< file descriptor*/
00696 uid_t uid,  /**< new user ID*/
00697 gid_t gid   /**< new group ID*/
00698 );
00699 /**
00700 \par Description:
00701 Control open file
00702 (Std. UNIX; see AUP2 Sec. 3.8.3)
00703 \par Headers:
00704     unistd.h
00705     , fcntl.h
00706 \return result depending on op or -1 on error (sets errno)
00707 */
00708 int fcntl(
00709 int fd, /**< file descriptor*/
00710 int op, /**< operation*/
00711 ... /**< optional argument depending on op*/
00712 );
00713 /**
00714 \par Description:
00715 Force buffer-cache flushing for one file’s data
00716 (Std. UNIX; see AUP2 Sec. 2.16.2)
00717 \par Headers:
00718     unistd.h
00719 \return 0 or -1 on error (sets errno)
00720 */
00721 int fdatasync(
00722 int fd  /**< file descriptor*/
00723 );
00724 /**
00725 \par Description:
00726 Create new process
00727 (Std. UNIX; see AUP2 Sec. 5.5)
00728 \par Headers:
00729     unistd.h
00730 \return child’s process-ID and 0 on success or -1 on error (sets errno)
00731 */
00732 pid_t fork(void);
00733 /**
00734 \par Description:
00735 Get system option or limit by file descriptor
00736 (Std. UNIX; see AUP2 Sec. 1.5.6)
00737 \par Headers:
00738     unistd.h
00739 \return option/limit value or -1 (sets errno on error)
00740 */
00741 long fpathconf(
00742 int fd, /**< file descriptor*/
00743 int name    /**< option or limit name*/
00744 );
00745 /**
00746 \par Description:
00747 Free socket-address information
00748 (Std. UNIX; see AUP2 Sec. 8.2.6)
00749 \par Headers:
00750     sys/socket.h
00751     , netdb.h
00752 */
00753 void freeaddrinfo(
00754 struct addrinfo *infop      /**< list to free*/
00755 );
00756 /**
00757 \par Description:
00758 Get file info by file descriptor
00759 (Std. UNIX; see AUP2 Sec. 3.5.1)
00760 \par Headers:
00761     sys/stat.h
00762 \return 0 on success or -1 on error (sets errno)
00763 */
00764 int fstat(
00765 int fd, /**< file descriptor*/
00766 struct stat *buf    /**< returned information*/
00767 );
00768 /**
00769 \par Description:
00770 Get file system information by file descriptor
00771 (Std. UNIX; see AUP2 Sec. 3.2.3)
00772 \par Headers:
00773     sys/statvfs.h
00774 \return 0 on success or -1 on error (sets errno)
00775 */
00776 int fstatvfs(
00777 int fd, /**< file descriptor*/
00778 struct statvfs *buf /**< returned info*/
00779 );
00780 /**
00781 \par Description:
00782 Schedule or force buffer-cache flushing for one file
00783 (Std. UNIX; see AUP2 Sec. 2.16.2)
00784 \par Headers:
00785     unistd.h
00786 \return 0 on success or -1 on error (sets errno)
00787 */
00788 int fsync(
00789 int fd  /**< file descriptor*/
00790 );
00791 /**
00792 \par Description:
00793 Generate System V IPC key
00794 (Std. UNIX; see AUP2 Sec. 7.4.2)
00795 \par Headers:
00796     sys/ipc.h
00797 \return key on success or -1 on error (sets errno)
00798 */
00799 key_t ftok(
00800 const char *path,   /**< pathname of existing file*/
00801 int id  /**< desired key number*/
00802 );
00803 /**
00804 \par Description:
00805 Truncate or stretch file by file descriptor
00806 (Std. UNIX; see AUP2 Sec. 2.17)
00807 \par Headers:
00808     unistd.h
00809 \return 0 on success or -1 on error (sets errno)
00810 */
00811 int ftruncate(
00812 int fd, /**< file descriptor*/
00813 off_t length    /**< new length*/
00814 );
00815 /**
00816 \par Description:
00817 Get error-code description
00818 (Std. UNIX; see AUP2 Sec. 8.2.6)
00819 \par Headers:
00820     netdb.h
00821 \return string (no error return)
00822 */
00823 const char *gai_strerror(
00824 int code    /**< error code*/
00825 );
00826 /**
00827 \par Description:
00828 Get socket-address information
00829 (Std. UNIX; see AUP2 Sec. 8.2.6)
00830 \par Headers:
00831     sys/socket.h
00832     , netdb.h
00833 \return 0 on success or error number on error (errno not set)
00834 */
00835 int getaddrinfo(
00836 const char *nodename,   /**< node name*/
00837 const char *servname,   /**< service name*/
00838 const struct addrinfo *hint,    /**< hint*/
00839 struct addrinfo **infop /**< returned info as linked list*/
00840 );
00841 /**
00842 \par Description:
00843 Get current directory pathname
00844 (Std. UNIX; see AUP2 Sec. 3.4.2)
00845 \par Headers:
00846     unistd.h
00847 \return pathname or NULL on error (sets errno)
00848 */
00849 char *getcwd(
00850 char *buf,  /**< returned pathname*/
00851 size_t bufsize  /**< size of buf*/
00852 );
00853 /**
00854 \par Description:
00855 Convert string to broken-down time with rules
00856 (Std. UNIX; see AUP2 Sec. 1.7.1)
00857 \par Headers:
00858     time.h
00859 \return broken-down time or NULL on error (sets getdate_err)
00860 */
00861 struct tm *getdate(
00862 const char *s   /**< string to convert*/
00863 );
00864 /**
00865 \par Description:
00866 Get effective group ID
00867 (Std. UNIX; see AUP2 Sec. 5.11)
00868 \par Headers:
00869     unistd.h
00870 \return group ID (no error return)
00871 */
00872 gid_t getegid(void);
00873 /**
00874 \par Description:
00875 Get value of environment variable
00876 (Std. UNIX; see AUP2 Sec. 5.2)
00877 \par Headers:
00878     stdlib.h
00879 \return value or NULL if not found (errno not set)
00880 */
00881 char *getenv(
00882 const char *var /**< variable to find*/
00883 );
00884 /**
00885 \par Description:
00886 Get effective user ID
00887 (Std. UNIX; see AUP2 Sec. 5.11)
00888 \par Headers:
00889     unistd.h
00890 \return user ID (no error return)
00891 */
00892 uid_t geteuid(void);
00893 /**
00894 \par Description:
00895 Get real group ID
00896 (Std. UNIX; see AUP2 Sec. 5.11)
00897 \par Headers:
00898     unistd.h
00899 \return group ID (no error return)
00900 */
00901 gid_t getgid(void);
00902 /**
00903 \par Description:
00904 Get group-file entry
00905 (Std. UNIX; see AUP2 Sec. 3.5.2)
00906 \par Headers:
00907     grp.h
00908 \return pointer to structure or NULL on error (sets errno)
00909 */
00910 struct group *getgrgid(
00911 gid_t gid   /**< group ID*/
00912 );
00913 /**
00914 \par Description:
00915 Lookup host by address
00916 (Std. UNIX; see AUP2 Sec. 8.8.1)
00917 \par Headers:
00918     netdb.h
00919 \return pointer to hostent or NULL on error (sets h_errno)
00920 */
00921 struct hostent *gethostbyaddr(
00922 const void *addr,   /**< IP address*/
00923 socklen_t len,  /**< length of address*/
00924 int family  /**< family (called “type” in SUS)*/
00925 );
00926 /**
00927 \par Description:
00928 Lookup host by name
00929 (Std. UNIX; see AUP2 Sec. 8.8.1)
00930 \par Headers:
00931     netdb.h
00932 \return pointer to hostent or NULL on error (sets h_errno)
00933 */
00934 struct hostent *gethostbyname(
00935 const char *nodename,   /**< node name*/
00936 );
00937 /**
00938 \par Description:
00939 Get next host-database entry
00940 (Std. UNIX; see AUP2 Sec. 8.8.1)
00941 \par Headers:
00942     netdb.h
00943 \return next entry or NULL on end of database (errno not set)
00944 */
00945 struct hostent *gethostent(void);
00946 /**
00947 \par Description:
00948 Get identifier for local host
00949 (Std. UNIX; see AUP2 Sec. 8.8.1)
00950 \par Headers:
00951     unistd.h
00952 \return identifier (no error return)
00953 */
00954 long gethostid(void);
00955 /**
00956 \par Description:
00957 Get name of host
00958 (Std. UNIX; see AUP2 Sec. 8.2.7)
00959 \par Headers:
00960     unistd.h
00961 \return 0 on success or -1 on error (errno not set)
00962 */
00963 int gethostname(
00964 char *name, /**< returned name*/
00965 size_t namelen  /**< size of name buffer*/
00966 );
00967 /**
00968 \par Description:
00969 Get value of interval timer
00970 (Std. UNIX; see AUP2 Sec. 9.7.4)
00971 \par Headers:
00972     sys/time.h
00973 \return 0 on success or -1 on error (sets errno)
00974 */
00975 int getitimer(
00976 int which,  /**< timer to get*/
00977 struct itimerval *val   /**< returned value*/
00978 );
00979 /**
00980 \par Description:
00981 Get login name
00982 (Std. UNIX; see AUP2 Sec. 3.5.2)
00983 \par Headers:
00984     unistd.h
00985 \return name or NULL on error (sets errno)
00986 */
00987 char *getlogin(void);
00988 /**
00989 \par Description:
00990 Get name information
00991 (Std. UNIX; see AUP2 Sec. 8.8.1)
00992 \par Headers:
00993     sys/socket.h
00994     , netdb.h
00995 \return 0 on success or error number on error
00996 */
00997 int getnameinfo(
00998 const struct sockaddr *sa,  /**< socket address*/
00999 socklen_t sa_len,   /**< socket-address length*/
01000 char *nodename, /**< node name*/
01001 socklen_t nodelen,  /**< node-name buffer length*/
01002 char *servname, /**< service name*/
01003 socklen_t servlen,  /**< service-name buffer length*/
01004 unsigned flags  /**< flags*/
01005 );
01006 /**
01007 \par Description:
01008 Lookup network by number
01009 (Std. UNIX; see AUP2 Sec. 8.8.2)
01010 \par Headers:
01011     netdb.h
01012 \return pointer to netent or NULL if not found (errno not set)
01013 */
01014 struct netent *getnetbyaddr(
01015 uint32_t net,   /**< network number (to match n_net member)*/
01016 int type    /**< family (to match n_addrtype member)*/
01017 );
01018 /**
01019 \par Description:
01020 Lookup network by name
01021 (Std. UNIX; see AUP2 Sec. 8.8.2)
01022 \par Headers:
01023     netdb.h
01024 \return pointer to netent or NULL if not found (errno not set)
01025 */
01026 struct netent *getnetbyname(
01027 const char *name    /**< network name (to match n_name member)*/
01028 );
01029 /**
01030 \par Description:
01031 Get network-database entry
01032 (Std. UNIX; see AUP2 Sec. 8.8.2)
01033 \par Headers:
01034     netdb.h
01035 \return pointer to netent or NULL end of database (errno not set)
01036 */
01037 struct netent *getnetent(void);
01038 /**
01039 \par Description:
01040 Get socket address of connected socket
01041 (Std. UNIX; see AUP2 Sec. 8.9.2)
01042 \par Headers:
01043     sys/socket.h
01044 \return 0 on success or -1 on error (sets errno)
01045 */
01046 int getpeername(
01047 int socket_fd,  /**< socket file descriptor*/
01048 struct sockaddr *sa,    /**< socket address*/
01049 socklen_t *sa_len   /**< address length*/
01050 );
01051 /**
01052 \par Description:
01053 Get process-group ID
01054 (Std. UNIX; see AUP2 Sec. 4.3.3)
01055 \par Headers:
01056     unistd.h
01057 \return process-group ID or -1 on error (sets errno)
01058 */
01059 pid_t getpgid(
01060 pid_t pid   /**< process ID or 0 for calling process*/
01061 );
01062 /**
01063 \par Description:
01064 Get process ID
01065 (Std. UNIX; see AUP2 Sec. 5.13)
01066 \par Headers:
01067     unistd.h
01068 \return process ID (no error return)
01069 */
01070 pid_t getpid(void);
01071 /**
01072 \par Description:
01073 Get parent process ID
01074 (Std. UNIX; see AUP2 Sec. 5.13)
01075 \par Headers:
01076     unistd.h
01077 \return parent process ID (no error return)
01078 */
01079 pid_t getppid(void);
01080 /**
01081 \par Description:
01082 Lookup protocol by name
01083 (Std. UNIX; see AUP2 Sec. 8.8.3)
01084 \par Headers:
01085     netdb.h
01086 \return pointer to protoent or NULL if not found (errno not set)
01087 */
01088 struct protoent *getprotobyname(
01089 const char *name    /**< protocol name*/
01090 );
01091 /**
01092 \par Description:
01093 Lookup protocol by number
01094 (Std. UNIX; see AUP2 Sec. 8.8.3)
01095 \par Headers:
01096     netdb.h
01097 \return pointer to protoent or NULL if not found (errno not set)
01098 */
01099 struct protoent *getprotobynumber(
01100 int proto   /**< protocol number*/
01101 );
01102 /**
01103 \par Description:
01104 Get protocol-database entry
01105 (Std. UNIX; see AUP2 Sec. 8.8.3)
01106 \par Headers:
01107     netdb.h
01108 \return pointer to protoent or NULL end of database (errno not set)
01109 */
01110 struct protoent *getprotoent(void);
01111 /**
01112 \par Description:
01113 Get password-file entry
01114 (Std. UNIX; see AUP2 Sec. 3.5.2)
01115 \par Headers:
01116     pwd.h
01117 \return pointer to structure or NULL on error (sets errno)
01118 */
01119 struct passwd *getpwuid(
01120 uid_t uid   /**< user ID*/
01121 );
01122 /**
01123 \par Description:
01124 Get resource limits
01125 (Std. UNIX; see AUP2 Sec. 5.16)
01126 \par Headers:
01127     sys/resource.h
01128 \return 0 on success or -1 on error (sets errno)
01129 */
01130 int getrlimit(
01131 int resource,   /**< resource*/
01132 struct rlimit *rlp  /**< returned limits*/
01133 );
01134 /**
01135 \par Description:
01136 Get resource usage
01137 (Std. UNIX; see AUP2 Sec. 5.16)
01138 \par Headers:
01139     sys/resource.h
01140 \return 0 on success or -1 on error (sets errno)
01141 */
01142 int getrusage(
01143 int who,    /**< RUSAGE_SELF or RUSAGE_CHILDREN*/
01144 struct rusage *r_usage  /**< returned usage information*/
01145 );
01146 /**
01147 \par Description:
01148 Lookup service by name
01149 (Std. UNIX; see AUP2 Sec. 8.8.4)
01150 \par Headers:
01151     netdb.h
01152 \return pointer to protoent or NULL if not found (errno not set)
01153 */
01154 struct servent *getservbyname(
01155 const char *name,   /**< */
01156 const char *proto   /**< */
01157 );
01158 /**
01159 \par Description:
01160 Lookup service by port
01161 (Std. UNIX; see AUP2 Sec. 8.8.4)
01162 \par Headers:
01163     netdb.h
01164 \return pointer to protoent or NULL if not found (errno not set)
01165 */
01166 struct servent *getservbyport(
01167 int port,   /**< */
01168 const char *proto   /**< */
01169 );
01170 /**
01171 \par Description:
01172 Get service-database entry
01173 (Std. UNIX; see AUP2 Sec. 8.8.4)
01174 \par Headers:
01175     netdb.h
01176 \return pointer to servent or NULL end of database (errno not set)
01177 */
01178 struct servent *getservent(void);
01179 /**
01180 \par Description:
01181 Get session ID
01182 (Std. UNIX; see AUP2 Sec. 4.3.2)
01183 \par Headers:
01184     unistd.h
01185 \return session ID or -1 on error (sets errno)
01186 */
01187 pid_t getsid(
01188 pid_t pid   /**< process ID or 0 for calling process*/
01189 );
01190 /**
01191 \par Description:
01192 Get socket address
01193 (Std. UNIX; see AUP2 Sec. 8.9.2)
01194 \par Headers:
01195     sys/socket.h
01196 \return 0 on success or -1 on error (sets errno)
01197 */
01198 int getsockname(
01199 int socket_fd,  /**< socket file descriptor*/
01200 struct sockaddr *sa,    /**< socket address*/
01201 socklen_t *sa_len   /**< address length*/
01202 );
01203 /**
01204 \par Description:
01205 Get the socket options
01206 (Std. UNIX; see AUP2 Sec. 8.3)
01207 \par Headers:
01208     sys/socket.h
01209 \return 0 on success or -1 on error (sets errno)
01210 */
01211 int getsockopt(
01212 int socket, /**< socket*/
01213 int level,  /**< level to be accessed*/
01214 int option, /**< option to set*/
01215 const void *value,  /**< value to set*/
01216 socklen_t *value_len    /**< length of value*/
01217 );
01218 /**
01219 \par Description:
01220 Get current date and time as timeval
01221 (Std. UNIX; see AUP2 Sec. 1.7.1)
01222 \par Headers:
01223     sys/time.h
01224 \return 0 on success or -1 (maybe) on error (may set errno)
01225 */
01226 int gettimeofday(
01227 struct timeval *tvalbuf,    /**< returned time*/
01228 void *dummy /**< always NULL*/
01229 );
01230 /**
01231 \par Description:
01232 Get real user ID
01233 (Std. UNIX; see AUP2 Sec. 5.11)
01234 \par Headers:
01235     unistd.h
01236 \return user ID (no error return)
01237 */
01238 uid_t getuid(void);
01239 /**
01240 \par Description:
01241 Convert time_t to UTC broken-down time
01242 (Std. UNIX; see AUP2 Sec. 1.7.1)
01243 \par Headers:
01244     time.h
01245 \return broken-down time (no error return)
01246 */
01247 struct tm *gmtime(
01248 const time_t *t /**< time*/
01249 );
01250 /**
01251 \par Description:
01252 Get access to slave side of pty
01253 (Std. UNIX; see AUP2 Sec. 4.10.1)
01254 \par Headers:
01255     stdlib.h
01256 \return 0 on success or -1 on error (sets errno)
01257 */
01258 int grantpt(
01259 int fd  /**< file descriptor*/
01260 );
01261 /**
01262 \par Description:
01263 Convert 32-bit value from host to network byte order
01264 (Std. UNIX; see AUP2 Sec. 8.1.4)
01265 \par Headers:
01266     arpa/inet.h
01267 \return number in network byte order (no error return)
01268 */
01269 uint32_t htonl(
01270 uint32_t hostnum    /**< 32-bit number in host byte order*/
01271 );
01272 /**
01273 \par Description:
01274 Convert 16-bit value from host to network byte order
01275 (Std. UNIX; see AUP2 Sec. 8.1.4)
01276 \par Headers:
01277     arpa/inet.h
01278 \return number in network byte order (no error return)
01279 */
01280 uint16_t htons(
01281 uint16_t hostnum    /**< 16-bit number in host byte order*/
01282 );
01283 /**
01284 \par Description:
01285 Free array allocated by if_nameindex
01286 (Std. UNIX; see AUP2 Sec. 8.8.5)
01287 \par Headers:
01288     net/if.h
01289 */
01290 void if_freenameindex(
01291 struct if_nameindex *ptr    /**< pointer to array*/
01292 );
01293 /**
01294 \par Description:
01295 Map network interface index to name
01296 (Std. UNIX; see AUP2 Sec. 8.8.5)
01297 \par Headers:
01298     net/if.h
01299 \return name or NULL on error (sets errno)
01300 */
01301 char *if_indextoname(
01302 unsigned ifindex,   /**< interface index*/
01303 char *ifname    /**< interface name*/
01304 );
01305 /**
01306 \par Description:
01307 Get all network interface names and indexes
01308 (Std. UNIX; see AUP2 Sec. 8.8.5)
01309 \par Headers:
01310     net/if.h
01311 \return array or NULL on error (sets errno)
01312 */
01313 struct if_nameindex *if_nameindex(void);
01314 /**
01315 \par Description:
01316 Map network interface name to index
01317 (Std. UNIX; see AUP2 Sec. 8.8.5)
01318 \par Headers:
01319     net/if.h
01320 \return index or 0 on error (errno not set)
01321 */
01322 unsigned if_nametoindex(
01323 const char *ifname  /**< interface name*/
01324 );
01325 /**
01326 \par Description:
01327 Convert dotted IPv4 address string to integer
01328 (Std. UNIX; see AUP2 Sec. 8.2.3)
01329 \par Headers:
01330     arpa/inet.h
01331 \return IP address or (in_addr_t)-1 on error (errno not set)
01332 */
01333 in_addr_t inet_addr(
01334 const char *cp  /**< dotted IP address*/
01335 );
01336 /**
01337 \par Description:
01338 Convert integer IPv4 address to dotted string
01339 (Std. UNIX; see AUP2 Sec. 8.2.3)
01340 \par Headers:
01341     arpa/inet.h
01342 \return string (no error return)
01343 */
01344 char *inet_ntoa(
01345 struct in_addr in   /**< integer address*/
01346 );
01347 /**
01348 \par Description:
01349 Convert IPv4 or IPv6 binary addresses to string
01350 (Std. UNIX; see AUP2 Sec. 8.9.5)
01351 \par Headers:
01352     arpa/inet.h
01353 \return string or NULL on error (sets errno)
01354 */
01355 const char *inet_ntop(
01356 int domain, /**< AF_INET or AF_INET6*/
01357 const void *src,    /**< pointer to binary address (input)*/
01358 char *dst,  /**< string (output)*/
01359 socklen_t dst_len   /**< length of dst buffer*/
01360 );
01361 /**
01362 \par Description:
01363 Convert IPv4 or IPv6 string addresses to binary
01364 (Std. UNIX; see AUP2 Sec. 8.9.5)
01365 \par Headers:
01366     arpa/inet.h
01367 \return 1 on success, 0 on invalid string, or -1 on error (sets errno)
01368 */
01369 int inet_pton(
01370 int domain, /**< AF_INET or AF_INET6*/
01371 const char *src,    /**< string (input)*/
01372 void *dst   /**< buffer for binary address (output)*/
01373 );
01374 /**
01375 \par Description:
01376 Control a character device
01377 (Std. UNIX; see AUP2 Sec. 4.4)
01378 \par Headers:
01379     ...
01380 \return -1 on error (sets errno); some other value on success
01381 */
01382 int ioctl(
01383 int fd, /**< file descriptor*/
01384 int req,    /**< request*/
01385 ... /**< arguments that depend on request*/
01386 );
01387 /**
01388 \par Description:
01389 Test for a terminal
01390 (Std. UNIX; see AUP2 Sec. 4.7)
01391 \par Headers:
01392     unistd.h
01393 \return 1 if a terminal and 0 if not (may set errno on 0 return)
01394 */
01395 int isatty(
01396 int fd  /**< file descriptor*/
01397 );
01398 /**
01399 \par Description:
01400 Generate signal for processes
01401 (Std. UNIX; see AUP2 Sec. 9.1.9)
01402 \par Headers:
01403     signal.h
01404 \return 0 on success or -1 on error (sets errno)
01405 */
01406 int kill(
01407 pid_t pid,  /**< process ID or other specification*/
01408 int signum  /**< signal*/
01409 );
01410 /**
01411 \par Description:
01412 Generate signal for process group
01413 (Std. UNIX; see AUP2 Sec. 9.1.9)
01414 \par Headers:
01415     signal.h
01416 \return 0 on success or -1 on error (sets errno)
01417 */
01418 int killpg(
01419 pid_t pgrp, /**< process-group ID*/
01420 int signum  /**< signal*/
01421 );
01422 /**
01423 \par Description:
01424 Change owner and group of symbolic link by path
01425 (Std. UNIX; see AUP2 Sec. 3.7.2)
01426 \par Headers:
01427     unistd.h
01428 \return 0 on success or -1 on error (sets errno)
01429 */
01430 int lchown(
01431 const char *path,   /**< pathname*/
01432 uid_t uid,  /**< user ID*/
01433 gid_t gid   /**< group ID*/
01434 );
01435 /**
01436 \par Description:
01437 Create hard link
01438 (Std. UNIX; see AUP2 Sec. 3.3.1)
01439 \par Headers:
01440     unistd.h
01441 \return 0 on success or -1 on error (sets errno)
01442 */
01443 int link(
01444 const char *oldpath,    /**< old pathname*/
01445 const char *newpath /**< new pathname*/
01446 );
01447 /**
01448 \par Description:
01449 List-directed I/O
01450 (Std. UNIX; see AUP2 Sec. 3.9.9)
01451 \par Headers:
01452     aio.h
01453 \return 0 on success or -1 on error (sets errno)
01454 */
01455 int lio_listio(
01456 int mode,   /**< LIO_WAIT or LIO_NOWAIT*/
01457 struct aiocb *const list[], /**< array of control blocks*/
01458 int cbcnt,  /**< number of elements in array*/
01459 struct sigevent *sig    /**< NULL or signal to generate*/
01460 );
01461 /**
01462 \par Description:
01463 Mark socket for accepting and set queue limit
01464 (Std. UNIX; see AUP2 Sec. 8.1.2)
01465 \par Headers:
01466     sys/socket.h
01467 \return 0 on success or -1 on error (sets errno)
01468 */
01469 int listen(
01470 int socket_fd,  /**< socket file descriptor*/
01471 int backlog /**< maximum connection queue length*/
01472 );
01473 /**
01474 \par Description:
01475 Convert time_t to local broken-down time
01476 (Std. UNIX; see AUP2 Sec. 1.7.1)
01477 \par Headers:
01478     time.h
01479 \return broken-down time (no error return)
01480 */
01481 struct tm *localtime(
01482 const time_t *t /**< time*/
01483 );
01484 /**
01485 \par Description:
01486 Lock section of file
01487 (Std. UNIX; see AUP2 Sec. 7.11.3)
01488 \par Headers:
01489     unistd.h
01490 \return 0 on success or -1 on error (sets errno)
01491 */
01492 int lockf(
01493 int fd, /**< file descriptor*/
01494 int op, /**< operation*/
01495 off_t len   /**< length of section*/
01496 );
01497 /**
01498 \par Description:
01499 Jump to jump point
01500 (Std. UNIX; see AUP2 Sec. 9.6)
01501 \par Headers:
01502     setjmp.h
01503 */
01504 void longjmp(
01505 jmp_buf loc_info,   /**< saved location information*/
01506 int val /**< value for setjmp to return*/
01507 );
01508 /**
01509 \par Description:
01510 Set and get file offset
01511 (Std. UNIX; see AUP2 Sec. 2.13)
01512 \par Headers:
01513     unistd.h
01514 \return new file offset or -1 on error (sets errno)
01515 */
01516 off_t lseek(
01517 int fd, /**< file descriptor*/
01518 off_t pos,  /**< position*/
01519 int whence  /**< interpretation*/
01520 );
01521 /**
01522 \par Description:
01523 Get file info by path without following symbolic link
01524 (Std. UNIX; see AUP2 Sec. 3.5.1)
01525 \par Headers:
01526     sys/stat.h
01527 \return 0 on success or -1 on error (sets errno)
01528 */
01529 int lstat(
01530 const char *path,   /**< pathname*/
01531 struct stat *buf    /**< returned information*/
01532 );
01533 /**
01534 \par Description:
01535 Make directory
01536 (Std. UNIX; see AUP2 Sec. 3.6.3)
01537 \par Headers:
01538     sys/stat.h
01539 \return 0 on success or -1 on error (sets errno)
01540 */
01541 int mkdir(
01542 const char *path,   /**< pathname*/
01543 mode_t perms    /**< permissions*/
01544 );
01545 /**
01546 \par Description:
01547 Make a FIFO
01548 (Std. UNIX; see AUP2 Sec. 7.2.1)
01549 \par Headers:
01550     sys/stat.h
01551 \return 0 on success or -1 on error (sets errno)
01552 */
01553 int mkfifo(
01554 const char *path,   /**< pathname*/
01555 mode_t perms    /**< permissions*/
01556 );
01557 /**
01558 \par Description:
01559 Make file
01560 (Std. UNIX; see AUP2 Sec. 3.8.2)
01561 \par Headers:
01562     sys/stat.h
01563 \return 0 on success or -1 on error (sets errno)
01564 */
01565 int mknod(
01566 const char *path,   /**< pathname*/
01567 mode_t perms,   /**< mode*/
01568 dev_t dev   /**< device-ID*/
01569 );
01570 /**
01571 \par Description:
01572 Create and open file with unique name
01573 (Std. UNIX; see AUP2 Sec. 2.7)
01574 \par Headers:
01575     stdlib.h
01576 \return open file descriptor or -1 on error (may not set errno)
01577 */
01578 int mkstemp(
01579 char *template  /**< template for file name*/
01580 );
01581 /**
01582 \par Description:
01583 Convert local broken-down time to time_t
01584 (Std. UNIX; see AUP2 Sec. 1.7.1)
01585 \par Headers:
01586     time.h
01587 \return time or -1 on error (errno not set)
01588 */
01589 time_t mktime(
01590 struct tm *tmbuf    /**< broken-down time*/
01591 );
01592 /**
01593 \par Description:
01594 Map pages of memory
01595 (Std. UNIX; see AUP2 Sec. 7.14.1)
01596 \par Headers:
01597     sys/mman.h
01598 \return pointer to segment or MAP_FAILED on error (sets errno)
01599 */
01600 void *mmap(
01601 void *addr, /**< desired address or NULL*/
01602 size_t len, /**< length of segment*/
01603 int prot,   /**< protection (see below)*/
01604 int flags,  /**< flags*/
01605 int fd, /**< file descriptor*/
01606 off_t off   /**< offset in file or shared-memory object*/
01607 );
01608 /**
01609 \par Description:
01610 Mount file system (non-standard)
01611 (Std. UNIX; see AUP2 Sec. 3.2.4)
01612 \par Headers:
01613     sys/mount.h
01614 \return 0 on success or -1 on error (sets errno)
01615 */
01616 int mount(
01617 const char *source, /**< device*/
01618 const char *target, /**< directory*/
01619 const char *type,   /**< type (e.g., ext2)*/
01620 unsigned long flags,    /**< mount flags (e.g., MS_RDONLY)*/
01621 const void *data    /**< file-system-dependent data*/
01622 );
01623 /**
01624 \par Description:
01625 Close message queue
01626 (Std. UNIX; see AUP2 Sec. 7.7.1)
01627 \par Headers:
01628     mqueue.h
01629 \return zero on success or -1 on error (sets errno)
01630 */
01631 int mq_close(
01632 mqd_t mqd   /**< message-queue descriptor*/
01633 );
01634 /**
01635 \par Description:
01636 Get message-queue attributes
01637 (Std. UNIX; see AUP2 Sec. 7.7.1)
01638 \par Headers:
01639     mqueue.h
01640 \return 0 on success or -1 on error (sets errno)
01641 */
01642 int mq_getattr(
01643 mqd_t mqd,  /**< message-queue descriptor*/
01644 struct mq_attr *attr    /**< attributes*/
01645 );
01646 /**
01647 \par Description:
01648 Register or unregister for message notification
01649 (Std. UNIX; see AUP2 Sec. 7.7.1)
01650 \par Headers:
01651     mqueue.h
01652 \return 0 on success or -1 on error (sets errno)
01653 */
01654 int mq_notify(
01655 mqd_t mqd,  /**< message-queue descriptor*/
01656 const struct sigevent *ep   /**< notification*/
01657 );
01658 /**
01659 \par Description:
01660 Open message-queue
01661 (Std. UNIX; see AUP2 Sec. 7.7.1)
01662 <p>mqd_t mq_open(
01663 <br>const char *name,       POSIX IPC name 
01664 <br>int flags,      flags (including O_CREAT) 
01665 <br>mode_t perms,       permissions 
01666 <br>struct mq_attr *attr        attributes (or NULL) 
01667 <br>);
01668 \par Headers:
01669     mqueue.h
01670 \return message-queue descriptor or -1 on error (sets errno)
01671 */
01672 mqd_t mq_open(
01673 const char *name,   /**< POSIX IPC name*/
01674 int flags   /**< flags (excluding O_CREAT)*/
01675 );
01676 /**
01677 \par Description:
01678 Receive message
01679 (Std. UNIX; see AUP2 Sec. 7.7.1)
01680 \par Headers:
01681     mqueue.h
01682 \return size of message or -1 on error (sets errno)
01683 */
01684 ssize_t mq_receive(
01685 mqd_t mqd,  /**< message-queue descriptor*/
01686 char *msg,  /**< message buffer*/
01687 size_t msgsize, /**< size of message buffer*/
01688 unsigned *priorityp /**< returned priority or NULL*/
01689 );
01690 /**
01691 \par Description:
01692 Send message
01693 (Std. UNIX; see AUP2 Sec. 7.7.1)
01694 \par Headers:
01695     mqueue.h
01696 \return 0 on success or -1 on error (sets errno)
01697 */
01698 int mq_send(
01699 mqd_t mqd,  /**< message-queue descriptor*/
01700 const char *msg,    /**< message*/
01701 size_t msgsize, /**< size of message*/
01702 unsigned priority   /**< priority*/
01703 );
01704 /**
01705 \par Description:
01706 Set message queue attributes (<b>REALTIME</b>)
01707 (Std. UNIX; see AUP2 Sec. 7.7.1)
01708 \par Headers:
01709     mqueue.h
01710 \return 0 on success or -1 on error (sets errno)
01711 */
01712 int mq_setattr(
01713 mqd_t mqd,  /**< message-queue descriptor*/
01714 const struct mq_attr *attr, /**< new attributes*/
01715 struct mq_attr *oldattr /**< old attributes*/
01716 );
01717 /**
01718 \par Description:
01719 Receive message with timeout
01720 (Std. UNIX; see AUP2 Sec. 7.7.1)
01721 \par Headers:
01722     mqueue.h
01723     , mqueue.h
01724     , time.h
01725 \return size of message or -1 on error (sets errno)
01726 */
01727 ssize_t mq_timedreceive(
01728 mqd_t mqd,  /**< message-queue descriptor*/
01729 char *msg,  /**< message buffer*/
01730 size_t msgsize, /**< size of message buffer*/
01731 unsigned *priorityp /**< returned priority or NULL*/
01732 const struct timespec *tmout    /**< timeout*/
01733 );
01734 /**
01735 \par Description:
01736 Send message with timeout
01737 (Std. UNIX; see AUP2 Sec. 7.7.1)
01738 \par Headers:
01739     mqueue.h
01740     , mqueue.h
01741     , time.h
01742 \return 0 on success or -1 on error (sets errno)
01743 */
01744 int mq_timedsend(
01745 mqd_t mqd,  /**< message-queue descriptor*/
01746 const char *msg,    /**< message*/
01747 size_t msgsize, /**< size of message*/
01748 unsigned priority   /**< priority*/
01749 const struct timespec *tmout    /**< timeout*/
01750 );
01751 /**
01752 \par Description:
01753 Remove message queue
01754 (Std. UNIX; see AUP2 Sec. 7.7.1)
01755 \par Headers:
01756     mqueue.h
01757 \return 0 on success or -1 on error (sets errno)
01758 */
01759 int mq_unlink(
01760 const char *name    /**< POSIX IPC name*/
01761 );
01762 /**
01763 \par Description:
01764 Control message queue
01765 (Std. UNIX; see AUP2 Sec. 7.5.1)
01766 \par Headers:
01767     sys/msg.h
01768 \return 0 on success or -1 on error (sets errno)
01769 */
01770 int msgctl(
01771 int msqid,  /**< identifier*/
01772 int cmd,    /**< command*/
01773 struct msqid_ds *data   /**< data for command*/
01774 );
01775 /**
01776 \par Description:
01777 Get message-queue identifier
01778 (Std. UNIX; see AUP2 Sec. 7.5.1)
01779 \par Headers:
01780     sys/msg.h
01781 \return identifier or -1 on error (sets errno)
01782 */
01783 int msgget(
01784 key_t key,  /**< key*/
01785 int flags   /**< creation flags*/
01786 );
01787 /**
01788 \par Description:
01789 Receive message
01790 (Std. UNIX; see AUP2 Sec. 7.5.1)
01791 \par Headers:
01792     sys/msg.h
01793 \return number of bytes placed in mtext or -1 on error (sets errno)
01794 */
01795 ssize_t msgrcv(
01796 int msqid,  /**< identifier*/
01797 const void *msgp,   /**< message*/
01798 size_t mtextsize,   /**< size of mtext buffer*/
01799 long msgtype,   /**< message type requested*/
01800 int flags   /**< flags*/
01801 );
01802 /**
01803 \par Description:
01804 Send message
01805 (Std. UNIX; see AUP2 Sec. 7.5.1)
01806 \par Headers:
01807     sys/msg.h
01808 \return 0 on success or -1 on error (sets errno)
01809 */
01810 int msgsnd(
01811 int msqid,  /**< identifier*/
01812 const void *msgp,   /**< message*/
01813 size_t msgsize, /**< size of message*/
01814 int flags   /**< flags*/
01815 );
01816 /**
01817 \par Description:
01818 Unmap pages of memory
01819 (Std. UNIX; see AUP2 Sec. 7.14.1)
01820 \par Headers:
01821     sys/mman.h
01822 \return 0 on success or -1 on error (sets errno)
01823 */
01824 int munmap(
01825 void *addr, /**< pointer to segment*/
01826 size_t len  /**< length of segment*/
01827 );
01828 /**
01829 \par Description:
01830 Suspend execution for nanoseconds or until signal
01831 (Std. UNIX; see AUP2 Sec. 9.7.3)
01832 \par Headers:
01833     time.h
01834 \return 0 on success or -1 on error (sets errno)
01835 */
01836 int nanosleep(
01837 const struct timespec *nsecs,   /**< nanoseconds to sleep*/
01838 struct timespec *remain /**< remaining time*/
01839 );
01840 /**
01841 \par Description:
01842 Change nice value
01843 (Std. UNIX; see AUP2 Sec. 5.15)
01844 \par Headers:
01845     unistd.h
01846 \return old nice value - NZERO or -1 on error (sets errno)
01847 */
01848 int nice(
01849 int incr    /**< increment*/
01850 );
01851 /**
01852 \par Description:
01853 Convert 32-bit value from network to host byte order
01854 (Std. UNIX; see AUP2 Sec. 8.1.4)
01855 \par Headers:
01856     arpa/inet.h
01857 \return number in host byte order (no error return)
01858 */
01859 uint32_t ntohl(
01860 uint32_t netnum /**< 32-bit number in network byte order*/
01861 );
01862 /**
01863 \par Description:
01864 Convert 16-bit value from network to host byte order
01865 (Std. UNIX; see AUP2 Sec. 8.1.4)
01866 \par Headers:
01867     arpa/inet.h
01868 \return number in host byte order (no error return)
01869 */
01870 uint16_t ntohs(
01871 uint16_t netnum /**< 16-bit number in network byte order*/
01872 );
01873 /**
01874 \par Description:
01875 Open or create a file
01876 (Std. UNIX; see AUP2 Sec. 2.4)
01877 \par Headers:
01878     sys/stat.h
01879     , fcntl.h
01880 \return file descriptor or -1 on error (sets errno)
01881 */
01882 int open(
01883 const char *path,   /**< pathname*/
01884 int flags,  /**< flags*/
01885 mode_t perms    /**< permissions (when creating)*/
01886 );
01887 /**
01888 \par Description:
01889 Open directory
01890 (Std. UNIX; see AUP2 Sec. 3.6.1)
01891 \par Headers:
01892     dirent.h
01893 \return DIR pointer or NULL on error (sets errno)
01894 */
01895 DIR *opendir(
01896 const char *path    /**< directory pathname*/
01897 );
01898 /**
01899 \par Description:
01900 Get system option or limit by path
01901 (Std. UNIX; see AUP2 Sec. 1.5.6)
01902 \par Headers:
01903     unistd.h
01904 \return option/limit value or -1 (sets errno on error)
01905 */
01906 long pathconf(
01907 const char *path,   /**< pathname*/
01908 int name    /**< option or limit name*/
01909 );
01910 /**
01911 \par Description:
01912 Wait for signal
01913 (Std. UNIX; see AUP2 Sec. 9.2.1)
01914 \par Headers:
01915     unistd.h
01916 \return -1 on error (sets errno)
01917 */
01918 int pause(void);
01919 /**
01920 \par Description:
01921 Create pipe
01922 (Std. UNIX; see AUP2 Sec. 6.2.1)
01923 \par Headers:
01924     unistd.h
01925 \return 0 on success or -1 on error (sets errno)
01926 */
01927 int pipe(
01928 int pfd[2]  /**< file descriptors*/
01929 );
01930 /**
01931 \par Description:
01932 Wait for I/O to be ready
01933 (Std. UNIX; see AUP2 Sec. 4.2.4)
01934 \par Headers:
01935     poll.h
01936 \return number of ready file descriptors or -1 on error (sets errno)
01937 */
01938 int poll(
01939 struct pollfd fdinfo[], /**< info on file descriptors to be tested*/
01940 nfds_t nfds,    /**< number of elements in fdinfo array*/
01941 int timeout /**< time-out (milliseconds)*/
01942 );
01943 /**
01944 \par Description:
01945 Open pty
01946 (Std. UNIX; see AUP2 Sec. 4.10.1)
01947 \par Headers:
01948     stdlib.h
01949     , fcntl.h
01950 \return 0 on success or -1 on error (sets errno)
01951 */
01952 int posix_openpt(
01953 int oflag   /**< O_RDWR optionally ORed with O_NOCTTY*/
01954 );
01955 /**
01956 \par Description:
01957 Read from file descriptor at offset
01958 (Std. UNIX; see AUP2 Sec. 2.14)
01959 \par Headers:
01960     unistd.h
01961 \return number of bytes read or -1 on error (sets errno)
01962 */
01963 ssize_t pread(
01964 int fd, /**< file descriptor*/
01965 void *buf,  /**< address to receive data*/
01966 size_t nbytes   /**< amount to read*/
01967 off_t offset    /**< where to read*/
01968 );
01969 /**
01970 \par Description:
01971 Wait for I/O to be ready
01972 (Std. UNIX; see AUP2 Sec. 4.2.3)
01973 \par Headers:
01974     sys/select.h
01975 \return number of bits set or -1 on error (sets errno)
01976 */
01977 int pselect(
01978 int nfds,      /**< highest fd + 1*/
01979 fd_set *readset,       /**< read set or NULL*/
01980 fd_set *writeset,      /**< write set or NULL*/
01981 fd_set *errorset,      /**< error set or NULL*/
01982 const struct timespec *timeout, /**< time-out (nanoseconds) or NULL*/
01983 const sigset_t *sigmask    /**< signal mask*/
01984 );
01985 /**
01986 \par Description:
01987 Cancel thread
01988 (Std. UNIX; see AUP2 Sec. 5.17.5)
01989 \par Headers:
01990     pthread.h
01991 \return 0 on success, error number on failure
01992 */
01993 int pthread_cancel(
01994 pthread_t thread_id /**< ID of thread to cancel*/
01995 );
01996 /**
01997 \par Description:
01998 Uninstall cleanup handler
01999 (Std. UNIX; see AUP2 Sec. 5.17.5)
02000 \par Headers:
02001     pthread.h
02002 */
02003 void pthread_cleanup_pop(
02004 int execute /**< execute handler?*/
02005 );
02006 /**
02007 \par Description:
02008 Install cleanup handler
02009 (Std. UNIX; see AUP2 Sec. 5.17.5)
02010 \par Headers:
02011     pthread.h
02012 */
02013 void pthread_cleanup_push(
02014 void (*handler)(void*), /**< pointer to cleanup-handler function*/
02015 void *arg   /**< data to pass to function*/
02016 );
02017 /**
02018 \par Description:
02019 Signal condition
02020 (Std. UNIX; see AUP2 Sec. 5.17.4)
02021 \par Headers:
02022     pthread.h
02023 \return 0 on success, error number on failure
02024 */
02025 int pthread_cond_signal(
02026 pthread_cond_t *cond    /**< condition variable*/
02027 );
02028 /**
02029 \par Description:
02030 Wait for condition
02031 (Std. UNIX; see AUP2 Sec. 5.17.4)
02032 \par Headers:
02033     pthread.h
02034 \return 0 on success, error number on failure
02035 */
02036 int pthread_cond_wait(
02037 pthread_cond_t *cond,   /**< condition variable */ pthread_mutex_t *mutex  /* mutex*/
02038 );
02039 /**
02040 \par Description:
02041 Create a thread
02042 (Std. UNIX; see AUP2 Sec. 5.17.1)
02043 \par Headers:
02044     pthread.h
02045 \return 0 on success, error number on failure
02046 */
02047 int pthread_create(
02048 pthread_t *thread_id,   /**< new thread’s ID*/
02049 const pthread_attr_t *attr, /**< attributes (or NULL)*/
02050 void *(*start_fcn)(void *), /**< starting function*/
02051 void *arg   /**< arg to starting function*/
02052 );
02053 /**
02054 \par Description:
02055 Wait for thread to terminate
02056 (Std. UNIX; see AUP2 Sec. 5.17.2)
02057 \par Headers:
02058     pthread.h
02059 \return 0 on success, error number on failure
02060 */
02061 int pthread_join(
02062 pthread_t thread_id,    /**< ID of thread to join*/
02063 void **status_ptr   /**< NULL or returned exit status*/
02064 );
02065 /**
02066 \par Description:
02067 Generate signal for thread
02068 (Std. UNIX; see AUP2 Sec. 9.1.9)
02069 \par Headers:
02070     signal.h
02071 \return 0 on success, error number on failure (errno not set)
02072 */
02073 int pthread_kill(
02074 pthread_t thread_id,    /**< thread ID*/
02075 int signum  /**< signal*/
02076 );
02077 /**
02078 \par Description:
02079 Lock mutex
02080 (Std. UNIX; see AUP2 Sec. 5.17.3)
02081 \par Headers:
02082     pthread.h
02083 \return 0 on success, error number on failure
02084 */
02085 int pthread_mutex_lock(
02086 pthread_mutex_t *mutex  /**< mutex to lock*/
02087 );
02088 /**
02089 \par Description:
02090 Unlock mutex
02091 (Std. UNIX; see AUP2 Sec. 5.17.3)
02092 \par Headers:
02093     pthread.h
02094 \return 0 on success, error number on failure
02095 */
02096 int pthread_mutex_unlock(
02097 pthread_mutex_t *mutex  /**< mutex to unlock*/
02098 );
02099 /**
02100 \par Description:
02101 Change thread’s signal mask
02102 (Std. UNIX; see AUP2 Sec. 9.1.5)
02103 \par Headers:
02104 \return 0 on success, error number on failure (errno not set)
02105 */
02106 int pthread_sigmask(
02107 int how,    /**< how signal mask is to be changed*/
02108 const sigset_t *set,    /**< input set*/
02109 sigset_t *oset  /**< previous signal mask*/
02110 );
02111 /**
02112 \par Description:
02113 Test for cancellation
02114 (Std. UNIX; see AUP2 Sec. 5.17.5)
02115 \par Headers:
02116     pthread.h
02117 */
02118 void pthread_testcancel(void);
02119 /**
02120 \par Description:
02121 Get name of slave side of pty
02122 (Std. UNIX; see AUP2 Sec. 4.10.1)
02123 \par Headers:
02124     stdlib.h
02125 \return name or NULL on error (errno not set)
02126 */
02127 char *ptsname(
02128 int fd  /**< file descriptor*/
02129 );
02130 /**
02131 \par Description:
02132 Change or add to environment
02133 (Std. UNIX; see AUP2 Sec. 5.2)
02134 \par Headers:
02135     stdlib.h
02136 \return 0 on success or non-zero on error (sets errno)
02137 */
02138 int putenv(
02139 char *string    /**< string of form name=value*/
02140 );
02141 /**
02142 \par Description:
02143 Write to file descriptor at offset
02144 (Std. UNIX; see AUP2 Sec. 2.14)
02145 \par Headers:
02146     unistd.h
02147 \return number of bytes written or -1 on error (sets errno)
02148 */
02149 ssize_t pwrite(
02150 int fd, /**< file descriptor*/
02151 const void *buf,    /**< data to write*/
02152 size_t nbytes   /**< amount to write*/
02153 off_t offset    /**< where to write*/
02154 );
02155 /**
02156 \par Description:
02157 Generate signal for process
02158 (Std. UNIX; see AUP2 Sec. 9.1.9)
02159 \par Headers:
02160     signal.h
02161 \return 0 on success or non-zero on error (sets errno)
02162 */
02163 int raise(
02164 int signum  /**< signal*/
02165 );
02166 /**
02167 \par Description:
02168 Read from file descriptor
02169 (Std. UNIX; see AUP2 Sec. 2.10)
02170 \par Headers:
02171     unistd.h
02172 \return number of bytes read or -1 on error (sets errno)
02173 */
02174 ssize_t read(
02175 int fd, /**< file descriptor*/
02176 void *buf,  /**< address to receive data*/
02177 size_t nbytes   /**< amount to read*/
02178 );
02179 /**
02180 \par Description:
02181 Read directory
02182 (Std. UNIX; see AUP2 Sec. 3.6.1)
02183 \par Headers:
02184     dirent.h
02185 \return structure or NULL on EOF or error (sets errno)
02186 */
02187 struct dirent *readdir(
02188 DIR *dirp   /**< DIR pointer from opendir*/
02189 );
02190 /**
02191 \par Description:
02192 Read a directory
02193 (Std. UNIX; see AUP2 Sec. 3.6.1)
02194 \par Headers:
02195     dirent.h
02196 \return 0 on success or error number on error (sets errno)
02197 */
02198 int readdir_r(
02199 DIR *restrict dirp, /**< DIR pointer from opendir*/
02200 struct dirent *entry,   /**< structure to hold entry*/
02201 struct dirent **result  /**< result (pointer or NULL)*/
02202 );
02203 /**
02204 \par Description:
02205 Read a symbolic link
02206 (Std. UNIX; see AUP2 Sec. 3.3.3)
02207 \par Headers:
02208     unistd.h
02209 \return byte count or -1 on error (sets errno)
02210 */
02211 ssize_t readlink(
02212 const char *path,   /**< pathname*/
02213 char *buf,  /**< returned text*/
02214 size_t bufsize  /**< buffer size*/
02215 );
02216 /**
02217 \par Description:
02218 Scatter read
02219 (Std. UNIX; see AUP2 Sec. 2.15)
02220 \par Headers:
02221     sys/uio.h
02222 \return number of bytes read or -1 on error (sets errno) 
02223 */
02224 ssize_t readv(
02225 int fd, /**< file descriptor*/
02226 const struct iovec *iov,    /**< vector of data buffers*/
02227 int iovcnt  /**< number of elements*/
02228 );
02229 /**
02230 \par Description:
02231 Receive data from socket
02232 (Std. UNIX; see AUP2 Sec. 8.9.1)
02233 \par Headers:
02234     sys/socket.h
02235 \return number of bytes received, 0, or -1 on error (sets errno)
02236 */
02237 ssize_t recv(
02238 int socket_fd,  /**< socket file descriptor*/
02239 void *buffer,   /**< buffer to receive data*/
02240 size_t length,  /**< length of buffer*/
02241 int flags   /**< flags*/
02242 );
02243 /**
02244 \par Description:
02245 Receive message from socket
02246 (Std. UNIX; see AUP2 Sec. 8.6.2)
02247 \par Headers:
02248     sys/socket.h
02249 \return number of bytes received, 0, or -1 on error (sets errno)
02250 */
02251 ssize_t recvfrom(
02252 int socket_fd,  /**< socket file descriptor*/
02253 void *buffer,   /**< buffer for received message*/
02254 size_t length,  /**< length of buffer*/
02255 int flags,  /**< flags*/
02256 struct sockaddr *sa,    /**< address of sender*/
02257 socklen_t *sa_len   /**< address length*/
02258 );
02259 /**
02260 \par Description:
02261 Receive a message from a socket
02262 (Std. UNIX; see AUP2 Sec. 8.6.3)
02263 \par Headers:
02264     sys/socket.h
02265 \return number of bytes received, 0, or -1 on error (sets errno)
02266 */
02267 ssize_t recvmsg(
02268 int socket_fd,  /**< socket file descriptor*/
02269 struct msghdr *message, /**< message*/
02270 int flags   /**< flags*/
02271 );
02272 /**
02273 \par Description:
02274 Rename a file
02275 (Std. UNIX; see AUP2 Sec. 3.3.2)
02276 \par Headers:
02277     stdio.h
02278 \return 0 on success or -1 on error (sets errno)
02279 */
02280 int rename(
02281 const char *oldpath,    /**< old pathname*/
02282 const char *newpath /**< new pathname*/
02283 );
02284 /**
02285 \par Description:
02286 Rewind directory
02287 (Std. UNIX; see AUP2 Sec. 3.6.1)
02288 \par Headers:
02289     dirent.h
02290 */
02291 void rewinddir(
02292 DIR *dirp   /**< DIR pointer from opendir*/
02293 );
02294 /**
02295 \par Description:
02296 Remove directory
02297 (Std. UNIX; see AUP2 Sec. 3.6.3)
02298 \par Headers:
02299     unistd.h
02300 \return 0 on success or -1 on error (sets errno)
02301 */
02302 int rmdir(
02303 const char *path    /**< pathname*/
02304 );
02305 /**
02306 \par Description:
02307 Seek directory
02308 (Std. UNIX; see AUP2 Sec. 3.6.1)
02309 \par Headers:
02310     dirent.h
02311 */
02312 void seekdir(
02313 DIR *dirp,  /**< DIR pointer from opendir*/
02314 long loc    /**< location*/
02315 );
02316 /**
02317 \par Description:
02318 Wait for I/O to be ready
02319 (Std. UNIX; see AUP2 Sec. 4.2.3)
02320 \par Headers:
02321     sys/select.h
02322 \return number of bits set or -1 on error (sets errno)
02323 */
02324 int select(
02325 int nfds,      /**< highest fd + 1*/
02326 fd_set *readset,       /**< read set or NULL*/
02327 fd_set *writeset,      /**< write set or NULL*/
02328 fd_set *errorset,      /**< error set or NULL*/
02329 struct timeval *timeout    /**< time-out (microseconds) or NULL*/
02330 );
02331 /**
02332 \par Description:
02333 Close named semaphore
02334 (Std. UNIX; see AUP2 Sec. 7.10.1)
02335 \par Headers:
02336     semaphore.h
02337 \return 0 on success or -1 on error (sets errno)
02338 */
02339 int sem_close(
02340 sem_t *sem  /**< semaphore*/
02341 );
02342 /**
02343 \par Description:
02344 Destroy unnamed semaphore
02345 (Std. UNIX; see AUP2 Sec. 7.10.2)
02346 \par Headers:
02347     semaphore.h
02348 \return 0 on success or -1 on error (sets errno)
02349 */
02350 int sem_destroy(
02351 sem_t *sem  /**< semaphore*/
02352 );
02353 /**
02354 \par Description:
02355 Get value of semaphore
02356 (Std. UNIX; see AUP2 Sec. 7.10.1)
02357 \par Headers:
02358     semaphore.h
02359 \return 0 on success or -1 on error (sets errno)
02360 */
02361 int sem_getvalue(
02362 sem_t *restrict sem,    /**< semaphpre*/
02363 int *valuep /**< returned value*/
02364 );
02365 /**
02366 \par Description:
02367 Initialize unnamed semaphore
02368 (Std. UNIX; see AUP2 Sec. 7.10.2)
02369 \par Headers:
02370     semaphore.h
02371 \return 0 on success or -1 on error (sets errno)
02372 */
02373 int sem_init(
02374 sem_t *sem, /**< semaphore*/
02375 int pshared,    /**< shared between processes?*/
02376 unsigned value  /**< initial value*/
02377 );
02378 /**
02379 \par Description:
02380 Open named semaphore
02381 (Std. UNIX; see AUP2 Sec. 7.10.1)
02382 <p>sem_t *sem_open(
02383 <br>const char *name,       POSIX IPC name 
02384 <br>int flags,      flags (including O_CREAT) 
02385 <br>mode_t perms,       permissions 
02386 <br>unsigned value      initial value 
02387 <br>);
02388 \par Headers:
02389     semaphore.h
02390 \return pointer to semaphore or SEM_FAILED on error (sets errno)
02391 */
02392 sem_t *sem_open(
02393 const char *name,   /**< POSIX IPC name*/
02394 int flags   /**< flags (excluding O_CREAT)*/
02395 );
02396 /**
02397 \par Description:
02398 Increment semaphore
02399 (Std. UNIX; see AUP2 Sec. 7.10.1)
02400 \par Headers:
02401     semaphore.h
02402 \return 0 on success or -1 on error (sets errno)
02403 */
02404 int sem_post(
02405 sem_t *sem  /**< semaphore*/
02406 );
02407 /**
02408 \par Description:
02409 Decrement semaphore
02410 (Std. UNIX; see AUP2 Sec. 7.10.1)
02411 \par Headers:
02412     semaphore.h
02413     , time.h
02414 \return 0 on success or -1 on error (sets errno)
02415 */
02416 int sem_timedwait(
02417 sem_t *restrict sem,    /**< semaphore*/
02418 const struct timespec *time /**< absolute time*/
02419 );
02420 /**
02421 \par Description:
02422 Decrement semaphore if possible
02423 (Std. UNIX; see AUP2 Sec. 7.10.1)
02424 \par Headers:
02425     semaphore.h
02426 \return 0 on success or -1 on error (sets errno)
02427 */
02428 int sem_trywait(
02429 sem_t *sem  /**< semaphore*/
02430 );
02431 /**
02432 \par Description:
02433 Remove named semaphore
02434 (Std. UNIX; see AUP2 Sec. 7.10.1)
02435 \par Headers:
02436     semaphore.h
02437 \return 0 on success or -1 on error (sets errno)
02438 */
02439 int sem_unlink(
02440 const char *name    /**< POSIX IPC name*/
02441 );
02442 /**
02443 \par Description:
02444 Decrement semaphore
02445 (Std. UNIX; see AUP2 Sec. 7.10.1)
02446 \par Headers:
02447     semaphore.h
02448 \return 0 on success or -1 on error (sets errno)
02449 */
02450 int sem_wait(
02451 sem_t *sem  /**< semaphore*/
02452 );
02453 /**
02454 \par Description:
02455 Control semaphore set
02456 (Std. UNIX; see AUP2 Sec. 7.9.1)
02457 \par Headers:
02458     sys/sem.h
02459 \return value or 0 on success; -1 on error (sets errno)
02460 */
02461 int semctl(
02462 int semid,  /**< identifier*/
02463 int semnum, /**< semaphore number*/
02464 int cmd,    /**< command*/
02465 union semun arg /**< argument for command*/
02466 );
02467 /**
02468 \par Description:
02469 Get semaphore-set identifier
02470 (Std. UNIX; see AUP2 Sec. 7.9.1)
02471 \par Headers:
02472     sys/sem.h
02473 \return identifier or -1 on error (sets errno)
02474 */
02475 int semget(
02476 key_t key,  /**< key*/
02477 int nsems,  /**< size of set*/
02478 int flags   /**< flags*/
02479 );
02480 /**
02481 \par Description:
02482 Operate on semaphore set
02483 (Std. UNIX; see AUP2 Sec. 7.9.2)
02484 \par Headers:
02485     sys/sem.h
02486 \return 0 on success or -1 on error (sets errno)
02487 */
02488 int semop(
02489 int semid,  /**< identifier*/
02490 struct sembuf *sops,    /**< operations*/
02491 size_t nsops    /**< number of operations*/
02492 );
02493 /**
02494 \par Description:
02495 Send data to socket
02496 (Std. UNIX; see AUP2 Sec. 8.9.1)
02497 \par Headers:
02498     sys/socket.h
02499 \return number of bytes sent or -1 on error (sets errno)
02500 */
02501 ssize_t send(
02502 int socket_fd,  /**< socket file descriptor*/
02503 const void *data,   /**< data to send*/
02504 size_t length,  /**< length of data*/
02505 int flags   /**< flags*/
02506 );
02507 /**
02508 \par Description:
02509 Send a message on a socket using a message structure
02510 (Std. UNIX; see AUP2 Sec. 8.6.3)
02511 \par Headers:
02512     sys/socket.h
02513 \return number of bytes sent or -1 on error (sets errno)
02514 */
02515 ssize_t sendmsg(
02516 int socket_fd,  /**< socket file descriptor*/
02517 const struct msghdr *message,   /**< message*/
02518 int flags   /**< flags*/
02519 );
02520 /**
02521 \par Description:
02522 Send message to socket
02523 (Std. UNIX; see AUP2 Sec. 8.6.2)
02524 \par Headers:
02525     sys/socket.h
02526 \return number of bytes sent or -1 on error (sets errno)
02527 */
02528 ssize_t sendto(
02529 int socket_fd,  /**< socket file descriptor*/
02530 const void *message,    /**< message to send*/
02531 size_t length,  /**< length of message*/
02532 int flags,  /**< flags*/
02533 const struct sockaddr *sa,  /**< target address*/
02534 socklen_t sa_len    /**< length of target address*/
02535 );
02536 /**
02537 \par Description:
02538 Set effective group ID
02539 (Std. UNIX; see AUP2 Sec. 5.12)
02540 \par Headers:
02541     unistd.h
02542 \return 0 on success or -1 on error (sets errno)
02543 */
02544 int setegid(
02545 gid_t gid   /**< effective group ID*/
02546 );
02547 /**
02548 \par Description:
02549 Change or add to environment
02550 (Std. UNIX; see AUP2 Sec. 5.2)
02551 \par Headers:
02552     stdlib.h
02553 \return 0 on success or -1 on error (sets errno)
02554 */
02555 int setenv(
02556 const char *var,    /**< variable to be changed or added*/
02557 const char *val,    /**< value*/
02558 int overwrite   /**< overwrite?*/
02559 );
02560 /**
02561 \par Description:
02562 Set effective user ID
02563 (Std. UNIX; see AUP2 Sec. 5.12)
02564 \par Headers:
02565     unistd.h
02566 \return 0 on success or -1 on error (sets errno)
02567 */
02568 int seteuid(
02569 uid_t uid   /**< effective user ID*/
02570 );
02571 /**
02572 \par Description:
02573 Set real, effective, and saved group ID
02574 (Std. UNIX; see AUP2 Sec. 5.12)
02575 \par Headers:
02576     unistd.h
02577 \return 0 on success or -1 on error (sets errno)
02578 */
02579 int setgid(
02580 gid_t gid   /**< real and saved group ID*/
02581 );
02582 /**
02583 \par Description:
02584 Start host-database scan
02585 (Std. UNIX; see AUP2 Sec. 8.8.1)
02586 \par Headers:
02587     netdb.h
02588 */
02589 void sethostent(
02590 int stayopen    /**< leave connection open?*/
02591 );
02592 /**
02593 \par Description:
02594 Set value of interval timer
02595 (Std. UNIX; see AUP2 Sec. 9.7.4)
02596 \par Headers:
02597     sys/time.h
02598 \return 0 on success or -1 on error (sets errno)
02599 */
02600 int setitimer(
02601 int which,  /**< timer to set*/
02602 const struct itimerval *val,    /**< value to set*/
02603 struct itimerval *oval  /**< returned old value*/
02604 );
02605 /**
02606 \par Description:
02607 Set jump point
02608 (Std. UNIX; see AUP2 Sec. 9.6)
02609 \par Headers:
02610     setjmp.h
02611 \return 0 if called directly, non-zero if from longjmp (no error return)
02612 */
02613 int setjmp(
02614 jmp_buf loc_info    /**< saved location information*/
02615 );
02616 /**
02617 \par Description:
02618 Start network-database scan
02619 (Std. UNIX; see AUP2 Sec. 8.8.2)
02620 \par Headers:
02621     netdb.h
02622 */
02623 void setnetent(
02624 int stayopen    /**< leave connection open?*/
02625 );
02626 /**
02627 \par Description:
02628 Set or create process-group
02629 (Std. UNIX; see AUP2 Sec. 4.3.3)
02630 \par Headers:
02631     unistd.h
02632 \return 0 on success or -1 on error (sets errno)
02633 */
02634 int setpgid(
02635 pid_t pid,  /**< process ID or 0 for calling process*/
02636 pid_t pgid  /**< process-group ID*/
02637 );
02638 /**
02639 \par Description:
02640 Start protocol-database scan
02641 (Std. UNIX; see AUP2 Sec. 8.8.3)
02642 \par Headers:
02643     netdb.h
02644 */
02645 void setprotoent(
02646 int stayopen    /**< leave connection open?*/
02647 );
02648 /**
02649 \par Description:
02650 Set resource limits
02651 (Std. UNIX; see AUP2 Sec. 5.16)
02652 \par Headers:
02653     sys/resource.h
02654 \return 0 on success or -1 on error (sets errno)
02655 */
02656 int setrlimit(
02657 int resource,   /**< resource*/
02658 const struct rlimit *rlp    /**< limits to set*/
02659 );
02660 /**
02661 \par Description:
02662 Start service-database scan
02663 (Std. UNIX; see AUP2 Sec. 8.8.4)
02664 \par Headers:
02665     netdb.h
02666 */
02667 void setservent(
02668 int stayopen    /**< leave connection open?*/
02669 );
02670 /**
02671 \par Description:
02672 Create session and process group
02673 (Std. UNIX; see AUP2 Sec. 4.3.2)
02674 \par Headers:
02675     unistd.h
02676 \return process-group ID or -1 on error (sets errno)
02677 */
02678 pid_t setsid(void);
02679 /**
02680 \par Description:
02681 Set the socket options
02682 (Std. UNIX; see AUP2 Sec. 8.3)
02683 \par Headers:
02684     sys/socket.h
02685 \return 0 on success or -1 on error (sets errno)
02686 */
02687 int setsockopt(
02688 int socket_fd,  /**< socket file descriptor*/
02689 int level,  /**< level to be accessed*/
02690 int option, /**< option to set*/
02691 const void *value,  /**< value to set*/
02692 socklen_t value_len /**< length of value*/
02693 );
02694 /**
02695 \par Description:
02696 Set real, effective, and saved user ID
02697 (Std. UNIX; see AUP2 Sec. 5.12)
02698 \par Headers:
02699     unistd.h
02700 \return 0 on success or -1 on error (sets errno)
02701 */
02702 int setuid(
02703 uid_t uid   /**< real and saved user ID*/
02704 );
02705 /**
02706 \par Description:
02707 Open shared-memory object
02708 (Std. UNIX; see AUP2 Sec. 7.14.1)
02709 \par Headers:
02710     sys/mman.h
02711 \return file descriptor or -1 on error (sets errno)
02712 */
02713 int shm_open(
02714 const char *name,   /**< POSIX IPC name*/
02715 int flags,  /**< flags*/
02716 mode_t perms    /**< permissions*/
02717 );
02718 /**
02719 \par Description:
02720 Remove shared-memory object
02721 (Std. UNIX; see AUP2 Sec. 7.14.1)
02722 \par Headers:
02723     sys/mman.h
02724 \return 0 on success or -1 on error (sets errno)
02725 */
02726 int shm_unlink(
02727 const char *name    /**< POSIX IPC name*/
02728 );
02729 /**
02730 \par Description:
02731 Attach shared memory segment
02732 (Std. UNIX; see AUP2 Sec. 7.13.1)
02733 \par Headers:
02734     sys/shm.h
02735 \return pointer or -1 on error (sets errno)
02736 */
02737 void *shmat(
02738 int shmid,  /**< identifier*/
02739 const void *shmaddr,    /**< desired address or NULL*/
02740 int flags   /**< attachment flags*/
02741 );
02742 /**
02743 \par Description:
02744 Control shared memory segment
02745 (Std. UNIX; see AUP2 Sec. 7.13.1)
02746 \par Headers:
02747     sys/shm.h
02748 \return 0 on success or -1 on error (sets errno)
02749 */
02750 int shmctl(
02751 int shmid,  /**< identifier*/
02752 int cmd,    /**< command*/
02753 struct shmid_ds *data   /**< data for command*/
02754 );
02755 /**
02756 \par Description:
02757 Detach shared memory segment
02758 (Std. UNIX; see AUP2 Sec. 7.13.1)
02759 \par Headers:
02760     sys/shm.h
02761 \return 0 on success or -1 on error (sets errno)
02762 */
02763 int shmdt(
02764 const void *shmaddr /**< pointer to segment*/
02765 );
02766 /**
02767 \par Description:
02768 Get shared memory segment
02769 (Std. UNIX; see AUP2 Sec. 7.13.1)
02770 \par Headers:
02771     sys/shm.h
02772 \return shared-memory identifier or -1 on error (sets errno)
02773 */
02774 int shmget(
02775 key_t key,  /**< key*/
02776 size_t size,    /**< size of segment*/
02777 int flags   /**< creation flags*/
02778 );
02779 /**
02780 \par Description:
02781 Shut down socket send and/or receive operations
02782 (Std. UNIX; see AUP2 Sec. 8.9.4)
02783 \par Headers:
02784     sys/socket.h
02785 \return 0 on success or -1 on error (sets errno)
02786 */
02787 int shutdown(
02788 int socket_fd,  /**< socket file descriptor*/
02789 int how /**< SHUT_RD, SHUT_WR, or SHUT_RDWR*/
02790 );
02791 /**
02792 \par Description:
02793 Set signal action
02794 (Std. UNIX; see AUP2 Sec. 9.1.6)
02795 \par Headers:
02796     signal.h
02797 \return 0 on success or -1 on error (sets errno)
02798 */
02799 int sigaction(
02800 int signum, /**< signal*/
02801 const struct sigaction *act,    /**< new action*/
02802 struct sigaction *oact  /**< old action*/
02803 );
02804 /**
02805 \par Description:
02806 Add signal to signal set
02807 (Std. UNIX; see AUP2 Sec. 9.1.5)
02808 \par Headers:
02809     signal.h
02810 \return 0 on success or -1 on error (sets errno)
02811 */
02812 int sigaddset(
02813 sigset_t *set,  /**< signal set*/
02814 int signum  /**< signal*/
02815 );
02816 /**
02817 \par Description:
02818 Set and get alternate stack context
02819 (Std. UNIX; see AUP2 Sec. 9.3)
02820 \par Headers:
02821     signal.h
02822 \return 0 on success or -1 on error (sets errno)
02823 */
02824 int sigaltstack(
02825 const stack_t *stack,   /**< new stack*/
02826 stack_t *ostack /**< old stack*/
02827 );
02828 /**
02829 \par Description:
02830 Delete a signal from a signal set
02831 (Std. UNIX; see AUP2 Sec. 9.1.5)
02832 \par Headers:
02833     signal.h
02834 \return 0 on success or -1 on error (sets errno)
02835 */
02836 int sigdelset(
02837 sigset_t *set,  /**< signal set*/
02838 int signum  /**< signal*/
02839 );
02840 /**
02841 \par Description:
02842 Initialize empty signal set
02843 (Std. UNIX; see AUP2 Sec. 9.1.5)
02844 \par Headers:
02845     signal.h
02846 \return 0 on success or -1 on error (sets errno)
02847 */
02848 int sigemptyset(
02849 sigset_t *set   /**< signal set*/
02850 );
02851 /**
02852 \par Description:
02853 Initialize full signal set
02854 (Std. UNIX; see AUP2 Sec. 9.1.5)
02855 \par Headers:
02856     signal.h
02857 \return 0 on success or -1 on error (sets errno)
02858 */
02859 int sigfillset(
02860 sigset_t *set   /**< signal set*/
02861 );
02862 /**
02863 \par Description:
02864 Block a signal
02865 (Std. UNIX; see AUP2 Sec. 9.4)
02866 \par Headers:
02867     signal.h
02868 \return 0 on success or -1 on error (sets errno)
02869 */
02870 int sighold(
02871 int signum, /**< signal*/
02872 );
02873 /**
02874 \par Description:
02875 Ignore signal
02876 (Std. UNIX; see AUP2 Sec. 9.4)
02877 \par Headers:
02878     signal.h
02879 \return 0 on success or -1 on error (sets errno)
02880 */
02881 int sigignore(
02882 int signum, /**< signal*/
02883 );
02884 /**
02885 \par Description:
02886 Structure for sigaction and waitid
02887 (Std. UNIX; see AUP2 Sec. 5.8 and 9.5.1)
02888 \par Headers:
02889 */
02890 typedef struct {
02891 int si_signo;   /**< signal number*/
02892 int si_errno;   /**< errno value associated with signal*/
02893 int si_code;    /**< signal code (see below)*/
02894 pid_t si_pid;   /**< sending process ID*/
02895 uid_t si_uid;   /**< real user ID of sending process*/
02896 void *si_addr;  /**< address of faulting instruction*/
02897 int si_status;  /**< exit value or signal*/
02898 long si_band;   /**< band event for SIGPOLL*/
02899 union sigval si_value;  /**< signal value*/
02900 } siginfo_t;
02901 /**
02902 \par Description:
02903 Set or clear SA_RESTART flag
02904 (Std. UNIX; see AUP2 Sec. 9.3)
02905 \par Headers:
02906     signal.h
02907 \return 0 on success or -1 on error (sets errno)
02908 */
02909 int siginterrupt(
02910 int signum, /**< signal*/
02911 int flag  /**< non-zero to clear, zero to set*/
02912 );
02913 /**
02914 \par Description:
02915 Test for signal in signal set
02916 (Std. UNIX; see AUP2 Sec. 9.1.5)
02917 \par Headers:
02918     signal.h
02919 \return 1 if member, 0 if not, or -1 on error (sets errno)
02920 */
02921 int sigismember(
02922 const sigset_t *set,    /**< signal set*/
02923 int signum  /**< signal*/
02924 );
02925 /**
02926 \par Description:
02927 Jump to jump point, restore signal mask if saved
02928 (Std. UNIX; see AUP2 Sec. 9.6)
02929 \par Headers:
02930     setjmp.h
02931 */
02932 void siglongjmp(
02933 sigjmp_buf loc_info,    /**< saved location information*/
02934 int val /**< value for sigsetjmp to return*/
02935 );
02936 /**
02937 \par Description:
02938 Set signal action
02939 (Std. UNIX; see AUP2 Sec. 9.4)
02940 \par Headers:
02941     signal.h
02942 \return old action or SIG_ERR on error (sets errno)
02943 */
02944 void (*signal(
02945 int signum, /**< signal*/
02946 void (*act)(int)    /**< new action*/
02947 ))(int);
02948 /**
02949 \par Description:
02950 Change signal mask and wait for signal
02951 (Std. UNIX; see AUP2 Sec. 9.4)
02952 \par Headers:
02953     signal.h
02954 \return -1 on error, always (sets errno)
02955 */
02956 int sigpause(
02957 int signum, /**< signal*/
02958 );
02959 /**
02960 \par Description:
02961 Examine pending signals
02962 (Std. UNIX; see AUP2 Sec. 9.3)
02963 \par Headers:
02964     signal.h
02965 \return 0 on success or -1 on error (sets errno)
02966 */
02967 int sigpending(
02968 sigset_t *set   /**< returned set of pending signals*/
02969 );
02970 /**
02971 \par Description:
02972 Change thread’s signal mask (single thread only)
02973 (Std. UNIX; see AUP2 Sec. 9.1.5)
02974 \par Headers:
02975     signal.h
02976 \return 0 on success or -1 on error (sets errno)
02977 */
02978 int sigprocmask(
02979 int how,    /**< how signal mask is to be changed*/
02980 const sigset_t *set,    /**< input set*/
02981 sigset_t *oset  /**< previous signal mask*/
02982 );
02983 /**
02984 \par Description:
02985 Generate signal for process
02986 (Std. UNIX; see AUP2 Sec. 9.5.4)
02987 \par Headers:
02988     signal.h
02989 \return 0 on success or -1 on error (sets errno)
02990 */
02991 int sigqueue(
02992 pid_t pid,  /**< process ID*/
02993 int signum, /**< signal*/
02994 const union sigval value    /**< value*/
02995 );
02996 /**
02997 \par Description:
02998 Unblock signal
02999 (Std. UNIX; see AUP2 Sec. 9.4)
03000 \par Headers:
03001     signal.h
03002 \return 0 on success or -1 on error (sets errno)
03003 */
03004 int sigrelse(
03005 int signum, /**< signal*/
03006 );
03007 /**
03008 \par Description:
03009 Signal management
03010 (Std. UNIX; see AUP2 Sec. 9.4)
03011 \par Headers:
03012     signal.h
03013 \return old action or SIG_ERR on error (sets errno)
03014 */
03015 void (*sigset(
03016 int signum, /**< signal*/
03017 void (*act)(int)    /**< new action*/
03018 ))(int);
03019 /**
03020 \par Description:
03021 Set jump point
03022 (Std. UNIX; see AUP2 Sec. 9.6)
03023 \par Headers:
03024     setjmp.h
03025 \return 0 if called directly, non-zero if from siglongjmp (no error return)
03026 */
03027 int sigsetjmp(
03028 sigjmp_buf loc_info,    /**< saved location information*/
03029 int savemask    /**< non-zero to save signal mask*/
03030 );
03031 /**
03032 \par Description:
03033 Change signal mask and wait for signal
03034 (Std. UNIX; see AUP2 Sec. 9.2.3)
03035 \par Headers:
03036     signal.h
03037 \return -1 on error, always (sets errno)
03038 */
03039 int sigsuspend(
03040 const sigset_t *sigmask /**< temporary signal mask*/
03041 );
03042 /**
03043 \par Description:
03044 Wait for signal
03045 (Std. UNIX; see AUP2 Sec. 9.5.5)
03046 \par Headers:
03047     signal.h
03048 \return signal number or -1 on error (sets errno)
03049 */
03050 int sigtimedwait(
03051 const sigset_t *set,    /**< signals to wait for*/
03052 siginfo_t *info,    /**< returned info*/
03053 const struct timespec *ts   /**< max. time to wait*/
03054 );
03055 /**
03056 \par Description:
03057 Wait for signal
03058 (Std. UNIX; see AUP2 Sec. 9.2.2)
03059 \par Headers:
03060     signal.h
03061 \return 0 on success or error number on error
03062 */
03063 int sigwait(
03064 const sigset_t *set,    /**< signals to wait for*/
03065 int *signum /**< signal that was delivered*/
03066 );
03067 /**
03068 \par Description:
03069 Wait for signal
03070 (Std. UNIX; see AUP2 Sec. 9.5.5)
03071 \par Headers:
03072     signal.h
03073 \return signal number or -1 on error (sets errno)
03074 */
03075 int sigwaitinfo(
03076 const sigset_t *set,    /**< signals to wait for*/
03077 siginfo_t *info /**< returned info*/
03078 );
03079 /**
03080 \par Description:
03081 Suspend execution for seconds or until signal
03082 (Std. UNIX; see AUP2 Sec. 9.7.2)
03083 \par Headers:
03084     unistd.h
03085 \return unslept amount
03086 */
03087 unsigned sleep(
03088 unsigned secs   /**< seconds to sleep*/
03089 );
03090 /**
03091 \par Description:
03092 Test presence of out-of-band mark
03093 (Std. UNIX; see AUP2 Sec. 8.7)
03094 \par Headers:
03095     sys/socket.h
03096 \return 1 if at mark, 0 if not, or -1 on error (sets errno)
03097 */
03098 int sockatmark(
03099 int socket_fd,  /**< socket file descriptor*/
03100 );
03101 /**
03102 \par Description:
03103 Create endpoint for communication
03104 (Std. UNIX; see AUP2 Sec. 8.1.2)
03105 \par Headers:
03106     sys/socket.h
03107 \return file descriptor or -1 on error (sets errno)
03108 */
03109 int socket(
03110 int domain, /**< domain (AF_UNIX, AF_INET, etc.)*/
03111 int type,   /**< SOCK_STREAM, SOCK_DGRAM, etc.*/
03112 int protocol    /**< specific to type; usually zero*/
03113 );
03114 /**
03115 \par Description:
03116 Create pair of sockets
03117 (Std. UNIX; see AUP2 Sec. 8.9.3)
03118 \par Headers:
03119     sys/socket.h
03120 \return 0 on success or -1 on error (sets errno)
03121 */
03122 int socketpair(
03123 int domain, /**< domain (AF_UNIX, AF_INET, etc.)*/
03124 int type,   /**< SOCK_STREAM, SOCK_DGRAM, etc.*/
03125 int protocol    /**< specific to type; usually zero*/
03126 int socket_vector[2]    /**< returned socket file descriptors*/
03127 );
03128 /**
03129 \par Description:
03130 Get file info by path
03131 (Std. UNIX; see AUP2 Sec. 3.5.1)
03132 \par Headers:
03133     sys/stat.h
03134 \return 0 on success or -1 on error (sets errno)
03135 */
03136 int stat(
03137 const char *path,   /**< pathname*/
03138 struct stat *buf    /**< returned information*/
03139 );
03140 /**
03141 \par Description:
03142 Get file system information by path
03143 (Std. UNIX; see AUP2 Sec. 3.2.3)
03144 \par Headers:
03145     sys/statvfs.h
03146 \return 0 on success or -1 on error (sets errno)
03147 */
03148 int statvfs(
03149 const char *path    /**< pathname*/
03150 struct statvfs *buf /**< returned info*/
03151 );
03152 /**
03153 \par Description:
03154 Convert broken-down time to string with format
03155 (Std. UNIX; see AUP2 Sec. 1.7.1)
03156 \par Headers:
03157     time.h
03158 \return byte count or 0 on error (errno not set)
03159 */
03160 size_t strftime(
03161 char *buf,  /**< output buffer*/
03162 size_t bufsize, /**< size of buffer*/
03163 const char *format, /**< format*/
03164 const struct tm *tmbuf  /**< broken-down time*/
03165 );
03166 /**
03167 \par Description:
03168 Convert string to broken-down time with format
03169 (Std. UNIX; see AUP2 Sec. 1.7.1)
03170 \par Headers:
03171     time.h
03172 \return ? or NULL on error (errno not set)
03173 */
03174 char *strptime(
03175 const char *s,  /**< string to convert*/
03176 const char *format, /**< format*/
03177 struct tm *tmbuf    /**< broken-down time (output)*/
03178 );
03179 /**
03180 \par Description:
03181 Structure for simple-semaphore functions
03182 (Std. UNIX; see AUP2 Sec. 7.9.2)
03183 \par Headers:
03184 */
03185 struct SimpleSem {
03186     union {
03187         int sm_semid;/**< System V semaphore-set ID*/
03188         void *sm_sem;/**< POSIX sem_t pointer (needs a cast)*/
03189     } sm;
03190 };
03191 /**
03192 \par Description:
03193 Structure for getaddrinfo
03194 (Std. UNIX; see AUP2 Sec. 8.2.6)
03195 \par Headers:
03196 */
03197 struct addrinfo {
03198 int ai_flags;   /**< input flags*/
03199 int ai_family;  /**< address family*/
03200 int ai_socktype;    /**< socket type*/
03201 int ai_protocol;    /**< protocol*/
03202 socklen_t ai_addrlen;   /**< length of socket address*/
03203 struct sockaddr *ai_addr;   /**< socket address*/
03204 char *ai_canonname; /**< canonical name of service location*/
03205 struct addrinfo *ai_next;   /**< pointer to next structure in list*/
03206 };
03207 /**
03208 \par Description:
03209 AIO control block
03210 (Std. UNIX; see AUP2 Sec. 3.9.2)
03211 \par Headers:
03212 */
03213 struct aiocb {
03214 int aio_fildes; /**< file descriptor*/
03215 off_t aio_offset;   /**< file offset*/
03216 volatile void *aio_buf; /**< buffer*/
03217 size_t aio_nbytes;  /**< size of transfer*/
03218 int aio_reqprio;    /**< request priority offset*/
03219 struct sigevent aio_sigevent;   /**< signal information*/
03220 int aio_lio_opcode; /**< operation to be performed*/
03221 };
03222 /**
03223 \par Description:
03224 Structure for readdir
03225 (Std. UNIX; see AUP2 Sec. 3.6.1)
03226 \par Headers:
03227 */
03228 struct dirent {
03229 ino_t d_ino;    /**< i-number*/
03230 char d_name[];  /**< name*/
03231 };
03232 /**
03233 \par Description:
03234 Structure for fcntl file locking
03235 (Std. UNIX; see AUP2 Sec. 7.11.4)
03236 \par Headers:
03237 */
03238 struct flock {
03239 short l_type;   /**< lock type: F_RDLCK, F_WRLCK, F_UNLCK*/
03240 short l_whence;     /**< interpretation of l_start*/
03241 off_t l_start;  /**< start of section*/
03242 off_t l_len;    /**< length of section*/
03243 pid_t l_pid;    /**< process holding lock; used with F_GETLK*/
03244 };
03245 /**
03246 \par Description:
03247 Structure for getgrgid
03248 (Std. UNIX; see AUP2 Sec. 3.5.2)
03249 \par Headers:
03250 */
03251 struct group {
03252 char *gr_name;  /**< group name*/
03253 gid_t gr_gid;   /**< group ID*/
03254 char **gr_mem;  /**< member-name array (NULL terminated*/
03255 };
03256 /**
03257 \par Description:
03258 Structure for host-database functions
03259 (Std. UNIX; see AUP2 Sec. 8.8.1)
03260 \par Headers:
03261 */
03262 struct hostent {
03263 char *h_name;   /**< official host name*/
03264 char **h_aliases;   /**< array of alternative host names*/
03265 int h_addrtype; /**< address family (not type)*/
03266 int h_length;   /**< length of each address*/
03267 char **h_addr_list; /**< array of pointers to network addresses*/
03268 };
03269 /**
03270 \par Description:
03271 Structure for network-interface functions
03272 (Std. UNIX; see AUP2 Sec. 8.8.5)
03273 \par Headers:
03274 */
03275 struct if_nameindex {
03276 unsigned if_index;  /**< interface index*/
03277 char *if_name;  /**< interface name*/
03278 };
03279 /**
03280 \par Description:
03281 Structure for readv and writev
03282 (Std. UNIX; see AUP2 Sec. 2.15)
03283 \par Headers:
03284 */
03285 struct iovec {
03286     void *iov_base;/**< base address of data*/
03287     size_t iov_len;/**< size of this piece*/
03288 };
03289 /**
03290 \par Description:
03291 Structure for System V IPC permissions
03292 (Std. UNIX; see AUP2 Sec. 7.4.3)
03293 \par Headers:
03294 */
03295 struct ipc_perm {
03296 uid_t uid;  /**< owner user-ID*/
03297 gid_t gid;  /**< owner group-ID*/
03298 uid_t cuid; /**< creator user-ID*/
03299 gid_t cgid; /**< creator group-ID*/
03300 mode_t mode;    /**< permission bits*/
03301 };
03302 /**
03303 \par Description:
03304 Structure for timer_ functions
03305 (Std. UNIX; see AUP2 Sec. 9.7.6)
03306 \par Headers:
03307 */
03308 struct itimerspec {
03309 struct timespec it_interval;    /**< reset value*/
03310 struct timespec it_value;   /**< current value*/
03311 };
03312 /**
03313 \par Description:
03314 Structure for getitimer and setitimer
03315 (Std. UNIX; see AUP2 Sec. 9.7.4)
03316 \par Headers:
03317 */
03318 struct itimerval {
03319 struct timeval it_interval; /**< reset value*/
03320 struct timeval it_value;    /**< current value*/
03321 };
03322 /**
03323 \par Description:
03324 Structure for mq_open, mq_getattr, and mq_setattr
03325 (Std. UNIX; see AUP2 Sec. 7.7.1)
03326 \par Headers:
03327 */
03328 struct mq_attr {
03329 long mq_flags;  /**< flags*/
03330 long mq_maxmsg; /**< max number of messages*/
03331 long mq_msgsize;    /**< max message size*/
03332 long mq_curmsgs;    /**< number of messages currently queued*/
03333 };
03334 /**
03335 \par Description:
03336 Typical structure for msgsnd and msgrcv
03337 (Std. UNIX; see AUP2 Sec. 7.5.1)
03338 \par Headers:
03339 */
03340 struct msg {
03341     long mtype;/**< message type*/
03342     char mtext[MTEXTSIZE];/**< message text*/
03343 };
03344 /**
03345 \par Description:
03346 Structure for sendmsg and recvmsg
03347 (Std. UNIX; see AUP2 Sec. 8.6.3)
03348 \par Headers:
03349 */
03350 struct msghdr {
03351 void *msg_name; /**< optional address*/
03352 socklen_t msg_namelen;  /**< size of address*/
03353 struct iovec *msg_iov;  /**< scatter/gather array*/
03354 int msg_iovlen; /**< number of elements in msg_iov*/
03355 void *msg_control;  /**< ancillary data*/
03356 socklen_t msg_controllen;   /**< ancillary data buffer len*/
03357 int msg_flags;  /**< flags on received message*/
03358 };
03359 /**
03360 \par Description:
03361 Structure for msgctl
03362 (Std. UNIX; see AUP2 Sec. 7.5.1)
03363 \par Headers:
03364 */
03365 struct msqid_ds {
03366 struct ipc_perm msg_perm;   /**< permission structure*/
03367 msgqnum_t msg_qnum; /**< number of messages currently on queue*/
03368 msglen_t msg_qbytes;    /**< maximum number of bytes allowed on queue*/
03369 pid_t msg_lspid;    /**< process ID of last msgsnd*/
03370 pid_t msg_lrpid;    /**< process ID of last msgrcv*/
03371 time_t msg_stime;   /**< time of last msgsnd*/
03372 time_t msg_rtime;   /**< time of last msgrcv*/
03373 time_t msg_ctime;   /**< time of last msgctl change*/
03374 };
03375 /**
03376 \par Description:
03377 Structure for network-database functions
03378 (Std. UNIX; see AUP2 Sec. 8.8.2)
03379 \par Headers:
03380 */
03381 struct netent {
03382 char *n_name;   /**< official network name*/
03383 char **n_aliases;   /**< array of alternative network names*/
03384 int n_addrtype; /**< address family (not type)*/
03385 uint32_t n_net; /**< network number*/
03386 };
03387 /**
03388 \par Description:
03389 Structure for getpwuid
03390 (Std. UNIX; see AUP2 Sec. 3.5.2)
03391 \par Headers:
03392 */
03393 struct passwd {
03394 char *pw_name;  /**< login name*/
03395 uid_t pw_uid;   /**< user ID*/
03396 gid_t pw_gid;   /**< group ID*/
03397 char *pw_dir;   /**< login directory*/
03398 char *pw_shell;     /**< login shell*/
03399 };
03400 /**
03401 \par Description:
03402 Structure for poll
03403 (Std. UNIX; see AUP2 Sec. 4.2.4)
03404 \par Headers:
03405 */
03406 struct pollfd {
03407 int fd; /**< file descriptor*/
03408 short events;   /**< input event flags (see table, below)*/
03409 short revents;  /**< output event flags (see table, below)*/
03410 };
03411 /**
03412 \par Description:
03413 Structure for protocol-database functions
03414 (Std. UNIX; see AUP2 Sec. 8.8.3)
03415 \par Headers:
03416 */
03417 struct protoent {
03418 char *p_name;   /**< official protocol name*/
03419 char **p_aliases;   /**< array of alternative protocol names*/
03420 int p_proto;    /**< protocol number*/
03421 };
03422 /**
03423 \par Description:
03424 Structure for getrlimit and setrlimit
03425 (Std. UNIX; see AUP2 Sec. 5.16)
03426 \par Headers:
03427 */
03428 struct rlimit {
03429 rlim_t rlim_cur;    /**< current (soft) limit*/
03430 rlim_t rlim_max;    /**< maximum (hard) limit*/
03431 };
03432 /**
03433 \par Description:
03434 Structure for getrusage
03435 (Std. UNIX; see AUP2 Sec. 5.16)
03436 \par Headers:
03437 */
03438 struct rusage {
03439 struct timeval ru_utime;    /**< user time used*/
03440 struct timeval ru_stime;    /**< system time used*/
03441 /**< following members are nonstandard*/
03442 long ru_maxrss; /**< maximum resident set size*/
03443 long ru_ixrss;  /**< integral shared memory size*/
03444 long ru_idrss;  /**< integral unshared data size*/
03445 long ru_isrss;  /**< integral unshared stack size*/
03446 long ru_minflt; /**< page reclaims*/
03447 long ru_majflt; /**< page faults*/
03448 long ru_nswap;  /**< swaps*/
03449 long ru_inblock;    /**< block input operations*/
03450 long ru_oublock;    /**< block output operations*/
03451 long ru_msgsnd; /**< messages sent*/
03452 long ru_msgrcv; /**< messages received*/
03453 long ru_nsignals;   /**< signals received*/
03454 long ru_nvcsw;  /**< voluntary context switches*/
03455 long ru_nivcsw; /**< involuntary context switches*/
03456 };
03457 /**
03458 \par Description:
03459 Structure for semop
03460 (Std. UNIX; see AUP2 Sec. 7.9.2)
03461 \par Headers:
03462 */
03463 struct sembuf {
03464     unsigned short sem_num;/**< semaphore number*/
03465     short sem_op;/**< Semaphore operation*/
03466     short sem_flg;/**< Operation flags*/
03467 };
03468 /**
03469 \par Description:
03470 Structure for semctl
03471 (Std. UNIX; see AUP2 Sec. 7.9.1)
03472 \par Headers:
03473 */
03474 struct semid_ds {
03475 struct ipc_perm sem_perm;   /**< permission structure*/
03476 unsigned short sem_nsems;   /**< size of set*/
03477 time_t sem_otime;   /**< time of last semop*/
03478 time_t sem_ctime;   /**< time of last semctl*/
03479 };
03480 /**
03481 \par Description:
03482 Structure for service-database functions
03483 (Std. UNIX; see AUP2 Sec. 8.8.4)
03484 \par Headers:
03485 */
03486 struct servent {
03487 char *s_name;   /**< official service name*/
03488 char **s_aliases;   /**< array of alternative service names*/
03489 int s_port; /**< port number*/
03490 char *s_proto;  /**< name of protocol for this service*/
03491 };
03492 /**
03493 \par Description:
03494 Structure for sigaction
03495 (Std. UNIX; see AUP2 Sec. 9.1.6)
03496 \par Headers:
03497 */
03498 struct sigaction {
03499 void (*sa_handler)(int);    /**< SIG_DFL, SIG_IGN, or function pointer*/
03500 sigset_t sa_mask;   /**< additional signals to be blocked */    int sa_flags;   /* flags*/
03501 void (*sa_sigaction)(int, siginfo_t *, void *); /**< Realtime Signal handler*/
03502 };
03503 /**
03504 \par Description:
03505 Structure for RTS-generation functions
03506 (Std. UNIX; see AUP2 Sec. 9.5.6)
03507 \par Headers:
03508 */
03509 struct sigevent {
03510 int sigev_notify;   /**< notification type (see below)*/
03511 int sigev_signo;    /**< signal number*/
03512 union sigval sigev_value;   /**< signal value*/
03513 void (*sigev_notify_function)(union sigval); /**< thread function*/
03514 pthread_attr_t *sigev_notify_attributes;     /**< thread attributes*/
03515 };
03516 /**
03517 \par Description:
03518 Structure for AF_INET socket addresses
03519 (Std. UNIX; see AUP2 Sec. 8.2.3)
03520 <p>struct in_addr {
03521 <br>in_addr_t s_addr        IPv4 address (uint32_t) 
03522 <br>};
03523 \par Headers:
03524     netinet/in.h
03525 */
03526 struct sockaddr_in {
03527 sa_family_t sin_family; /**< AF_INET*/
03528 in_port_t sin_port; /**< port number (uint16_t)*/
03529 struct in_addr sin_addr;    /**< IPv4 address*/
03530 };
03531 /**
03532 \par Description:
03533 Structure for AF_INET6 socket addresses
03534 (Std. UNIX; see AUP2 Sec. 8.2.4)
03535 <p>struct in6_addr {
03536 <br>uint8_t s6_addr[16];        IPv6 address 
03537 <br>};
03538 \par Headers:
03539     netinet/in.h
03540 */
03541 struct sockaddr_in6 {
03542 sa_family_t sin6_family;    /**< AF_INET6*/
03543 in_port_t sin6_port;    /**< port number (uint16_t)*/
03544 uint32_t sin6_flowinfo; /**< traffic class and flow information*/
03545 struct in6_addr sin6_addr;  /**< IPv4 address*/
03546 uint32_t sin6_scope_id; /**< set of interfaces for a scope*/
03547 };
03548 /**
03549 \par Description:
03550 Structure for AF_UNIX socket addresses
03551 (Std. UNIX; see AUP2 Sec. 8.2.2)
03552 \par Headers:
03553     sys/un.h
03554 */
03555 struct sockaddr_un {
03556 sa_family_t sun_family; /**< AF_UNIX*/
03557 char sun_path[X];   /**< socket pathname*/
03558 };
03559 /**
03560 \par Description:
03561 Structure for stat, fstat, and lstat
03562 (Std. UNIX; see AUP2 Sec. 3.5.1)
03563 \par Headers:
03564 */
03565 struct stat {
03566 dev_t st_dev;   /**< device ID of file system*/
03567 ino_t st_ino;   /**< i-number*/
03568 mode_t st_mode; /**< mode (see below).*/
03569 nlink_t st_nlink;   /**< number of hard links*/
03570 uid_t st_uid;   /**< user ID*/
03571 gid_t st_gid;   /**< group ID*/
03572 dev_t st_rdev;  /**< device ID (if special file).*/
03573 off_t st_size;  /**< size in bytes*/
03574 time_t st_atime;    /**< last access*/
03575 time_t st_mtime;    /**< last data modification*/
03576 time_t st_ctime;    /**< last i-node modification*/
03577 blksize_t st_blksize;   /**< optimal I/O size*/
03578 blkcnt_t st_blocks; /**< allocated 512-byte blocks*/
03579 };
03580 /**
03581 \par Description:
03582 Structure for statvfs and fstatvfs
03583 (Std. UNIX; see AUP2 Sec. 3.2.3)
03584 \par Headers:
03585 */
03586 struct statvfs {
03587 unsigned long f_bsize;  /**< block size*/
03588 unsigned long f_frsize; /**< fundamental (fblock) size*/
03589 fsblkcnt_t f_blocks;    /**< total number of fblocks*/
03590 fsblkcnt_t f_bfree; /**< number of free fblocks*/
03591 fsblkcnt_t f_bavail;    /**< number of avail. fblocks*/
03592 fsfilcnt_t f_files; /**< total number of i-numbers*/
03593 fsfilcnt_t f_ffree; /**< number of free i-numbers*/
03594 fsfilcnt_t f_favail;    /**< number of avail. i-numbers*/
03595 unsigned long f_fsid;   /**< file-system ID*/
03596 unsigned long f_flag;   /**< flags (see below)*/
03597 unsigned long f_namemax;    /**< max length of filename*/
03598 };
03599 /**
03600 \par Description:
03601 Structure for terminal-control functions
03602 (Std. UNIX; see AUP2 Sec. 4.5.1)
03603 \par Headers:
03604 */
03605 struct termios {
03606 tcflag_t c_iflag;   /**< input flags*/
03607 tcflag_t c_oflag;   /**< output flags*/
03608 tcflag_t c_cflag;   /**< control flags*/
03609 tcflag_t c_lflag;   /**< local flags*/
03610 cc_t c_cc[NCCS];    /**< control characters*/
03611 };
03612 /**
03613 \par Description:
03614 Structure for time in seconds and nanoseconds
03615 (Std. UNIX; see AUP2 Sec. 1.7.2)
03616 \par Headers:
03617 */
03618 struct timespec {
03619 time_t tv_sec;  /**< seconds*/
03620 long tv_nsec;   /**< nanoseconds*/
03621 };
03622 /**
03623 \par Description:
03624 Structure for gettimeofday
03625 (Std. UNIX; see AUP2 Sec. 1.7.1)
03626 \par Headers:
03627 */
03628 struct timeval {
03629 time_t tv_sec;  /**< seconds*/
03630 suseconds_t tv_usec;    /**< microseconds*/
03631 };
03632 /**
03633 \par Description:
03634 Structure for broken-down time
03635 (Std. UNIX; see AUP2 Sec. 1.7.1)
03636 \par Headers:
03637 */
03638 struct tm {
03639 int tm_sec; /**< second [0,60]*/
03640 int tm_min; /**< minute [0,59]*/
03641 int tm_hour;    /**< hour [0,23]*/
03642 int tm_mday;    /**< day of month [1,31]*/
03643 int tm_mon; /**< month  [0,11]*/
03644 int tm_year;    /**< years since 1900*/
03645 int tm_wday;    /**< day of week [0,6] (0 = Sunday)*/
03646 int tm_yday;    /**< day of year [0,365]*/
03647 int tm_isdst;   /**< daylight-savings flag*/
03648 };
03649 /**
03650 \par Description:
03651 Structure for times system call
03652 (Std. UNIX; see AUP2 Sec. 1.7.2)
03653 \par Headers:
03654 */
03655 struct tms {
03656 clock_t tms_utime;  /**< user time*/
03657 clock_t tms_stime;  /**< sys time*/
03658 clock_t tms_cutime; /**< user time of terminated children*/
03659 clock_t tms_cstime; /**< sys time of terminated children*/
03660 };
03661 /**
03662 \par Description:
03663 Structure for utime
03664 (Std. UNIX; see AUP2 Sec. 3.7.3)
03665 \par Headers:
03666 */
03667 struct utimbuf {
03668 time_t actime;  /**< access time*/
03669 time_t modtime; /**< modification time*/
03670 };
03671 /**
03672 \par Description:
03673 Create a symbolic link
03674 (Std. UNIX; see AUP2 Sec. 3.3.3)
03675 \par Headers:
03676     unistd.h
03677 \return 0 on success or -1 on error (sets errno)
03678 */
03679 int symlink(
03680 const char *oldpath,    /**< old pathname*/
03681 const char *newpath /**< possible new pathname*/
03682 );
03683 /**
03684 \par Description:
03685 Schedule buffer-cache flushing
03686 (Std. UNIX; see AUP2 Sec. 2.16.2)
03687 \par Headers:
03688     unistd.h
03689 */
03690 void sync(void);
03691 /**
03692 \par Description:
03693 Get system option or limit
03694 (Std. UNIX; see AUP2 Sec. 1.5.5)
03695 \par Headers:
03696     unistd.h
03697 \return option/limit value or -1 (sets errno on error)
03698 */
03699 long sysconf(
03700 int name    /**< option or limit name*/
03701 );
03702 /**
03703 \par Description:
03704 Run command
03705 (Std. UNIX; see AUP2 Sec. 5.5)
03706 \par Headers:
03707     stdlib.h
03708 \return exit status or -1 on error (sets errno)
03709 */
03710 int system(
03711 const char *command /**< command*/
03712 );
03713 /**
03714 \par Description:
03715 Drain (wait for) terminal output
03716 (Std. UNIX; see AUP2 Sec. 4.6)
03717 \par Headers:
03718     termios.h
03719 \return 0 on success or -1 on error (sets errno)
03720 */
03721 int tcdrain(
03722 int fd  /**< file descriptor*/
03723 );
03724 /**
03725 \par Description:
03726 Suspend or restart flow of terminal input or output
03727 (Std. UNIX; see AUP2 Sec. 4.6)
03728 \par Headers:
03729     termios.h
03730 \return 0 on success or -1 on error (sets errno)
03731 */
03732 int tcflow(
03733 int fd, /**< file descriptor*/
03734 int action  /**< direction and suspend/restart*/
03735 );
03736 /**
03737 \par Description:
03738 Flush (throw away) terminal output, input, or both
03739 (Std. UNIX; see AUP2 Sec. 4.6)
03740 \par Headers:
03741     termios.h
03742 \return 0 on success or -1 on error (sets errno)
03743 */
03744 int tcflush(
03745 int fd, /**< file descriptor*/
03746 int queue   /**< queue to be affected*/
03747 );
03748 /**
03749 \par Description:
03750 Get terminal attributes
03751 (Std. UNIX; see AUP2 Sec. 4.5.1)
03752 \par Headers:
03753     termios.h
03754 \return 0 on success or -1 on error (sets errno)
03755 */
03756 int tcgetattr(
03757 int fd, /**< file descriptor*/
03758 struct termios *tp  /**< attributes*/
03759 );
03760 /**
03761 \par Description:
03762 Get foreground process-group ID
03763 (Std. UNIX; see AUP2 Sec. 4.3.4)
03764 \par Headers:
03765     unistd.h
03766 \return process-group ID or -1 on error (sets errno)
03767 */
03768 pid_t tcgetpgrp(
03769 int fd  /**< file descriptor*/
03770 );
03771 /**
03772 \par Description:
03773 Get session ID
03774 (Std. UNIX; see AUP2 Sec. 4.3.4)
03775 \par Headers:
03776     termios.h
03777 \return session ID or -1 on error (sets errno)
03778 */
03779 pid_t tcgetsid(
03780 int fd  /**< file descriptor*/
03781 );
03782 /**
03783 \par Description:
03784 Send break to terminal
03785 (Std. UNIX; see AUP2 Sec. 4.6)
03786 \par Headers:
03787     termios.h
03788 \return 0 on success or -1 on error (sets errno)
03789 */
03790 int tcsendbreak(
03791 int fd, /**< file descriptor*/
03792 int duration    /**< duration of break*/
03793 );
03794 /**
03795 \par Description:
03796 Set terminal attributes
03797 (Std. UNIX; see AUP2 Sec. 4.5.1)
03798 \par Headers:
03799     termios.h
03800 \return 0 on success or -1 on error (sets errno)
03801 */
03802 int tcsetattr(
03803 int fd, /**< file descriptor*/
03804 int actions,    /**< actions on setting*/
03805 const struct termios *tp    /**< attributes*/
03806 );
03807 /**
03808 \par Description:
03809 Set foreground process-group ID
03810 (Std. UNIX; see AUP2 Sec. 4.3.4)
03811 \par Headers:
03812     unistd.h
03813 \return 0 on success or -1 on error (sets errno)
03814 */
03815 int tcsetpgrp(
03816 int fd, /**< file descriptor*/
03817 pid_t pgid  /**< process-group ID*/
03818 );
03819 /**
03820 \par Description:
03821 Get directory location
03822 (Std. UNIX; see AUP2 Sec. 3.6.1)
03823 \par Headers:
03824     dirent.h
03825 \return location (no error return)
03826 */
03827 long telldir(
03828 DIR *dirp   /**< DIR pointer from opendir*/
03829 );
03830 /**
03831 \par Description:
03832 Get current date and time as time_t
03833 (Std. UNIX; see AUP2 Sec. 1.7.1)
03834 \par Headers:
03835     time.h
03836 \return time or -1 on error (errno not set)
03837 */
03838 time_t time(
03839 time_t *t   /**< NULL or returned time*/
03840 );
03841 /**
03842 \par Description:
03843 Create per-process timer
03844 (Std. UNIX; see AUP2 Sec. 9.7.6)
03845 \par Headers:
03846     signal.h
03847     , time.h
03848 \return 0 on success or -1 on error (sets errno)
03849 */
03850 int timer_create(
03851 clockid_t clockid,  /**< clock ID*/
03852 struct sigevent *sig,   /**< NULL or signal to generate*/
03853 timer_t *timer_id   /**< returned timer ID*/
03854 );
03855 /**
03856 \par Description:
03857 Delete per-process timer
03858 (Std. UNIX; see AUP2 Sec. 9.7.6)
03859 \par Headers:
03860     time.h
03861 \return 0 on success or -1 on error (sets errno)
03862 */
03863 int timer_delete(
03864 timer_t timer_id    /**< timer ID*/
03865 );
03866 /**
03867 \par Description:
03868 Get per-process timer overrun count
03869 (Std. UNIX; see AUP2 Sec. 9.7.6)
03870 \par Headers:
03871     time.h
03872 \return overrun count  or -1 on error (sets errno)
03873 */
03874 int timer_getoverrun(
03875 timer_t timer_id    /**< timer ID*/
03876 );
03877 /**
03878 \par Description:
03879 Get value of per-process timer
03880 (Std. UNIX; see AUP2 Sec. 9.7.6)
03881 \par Headers:
03882     time.h
03883 \return 0 on success or -1 on error (sets errno)
03884 */
03885 int timer_gettime(
03886 timer_t timer_id,   /**< timer ID*/
03887 struct itimerspec *val  /**< returned value*/
03888 );
03889 /**
03890 \par Description:
03891 Set value of per-process timer
03892 (Std. UNIX; see AUP2 Sec. 9.7.6)
03893 \par Headers:
03894     time.h
03895 \return 0 on success or -1 on error (sets errno)
03896 */
03897 int timer_settime(
03898 timer_t timer_id,   /**< timer ID*/
03899 int flags,  /**< flags*/
03900 const struct itimerspec *val,   /**< value to set*/
03901 struct itimerspec *oval /**< returned old value*/
03902 );
03903 /**
03904 \par Description:
03905 Get process and child-process execution times
03906 (Std. UNIX; see AUP2 Sec. 1.7.2)
03907 \par Headers:
03908     sys/times.h
03909 \return time in clock ticks or -1 on error (sets errno)
03910 */
03911 clock_t times(
03912 struct tms *buffer  /**< */
03913 );
03914 /**
03915 \par Description:
03916 Truncate or stretch file by path
03917 (Std. UNIX; see AUP2 Sec. 2.17)
03918 \par Headers:
03919     unistd.h
03920 \return 0 on success or -1 on error (sets errno)
03921 */
03922 int truncate(
03923 const char *path,   /**< pathname*/
03924 off_t length    /**< new length*/
03925 );
03926 /**
03927 \par Description:
03928 Find pathname of terminal
03929 (Std. UNIX; see AUP2 Sec. 4.7)
03930 \par Headers:
03931     unistd.h
03932 \return string or NULL on error (sets errno)
03933 */
03934 char *ttyname(
03935 int fd  /**< file descriptor*/
03936 );
03937 /**
03938 \par Description:
03939 Find pathname of terminal
03940 (Std. UNIX; see AUP2 Sec. 4.7)
03941 \par Headers:
03942     unistd.h
03943 \return 0 on success or error number on error (sets errno)
03944 */
03945 int ttyname_r(
03946 int fd, /**< file descriptor*/
03947 char *buf,  /**< buffer for pathname*/
03948 size_t bufsize  /**< size of buffer*/
03949 );
03950 /**
03951 \par Description:
03952 Set time zone information
03953 (Std. UNIX; see AUP2 Sec. 1.7.1)
03954 \par Headers:
03955     time.h
03956 */
03957 extern int daylight;/**< DST? (not in FreeBSD)*/
03958 extern long timezone; /**< timezone in secs (not in FreeBSD)*/
03959 extern char *tzname[2]; /**< timezone strings (not in FreeBSD)*/
03960 void tzset(void);
03961 /**
03962 \par Description:
03963 Get and set process limits
03964 (Std. UNIX; see AUP2 Sec. 5.16)
03965 \par Headers:
03966     ulimit.h
03967 \return limit or -1 with errno changed on error (sets errno)
03968 */
03969 long ulimit(
03970 int cmd,    /**< command*/
03971 ... /**< optional argument*/
03972 );
03973 /**
03974 \par Description:
03975 Set and get file mode creation mask
03976 (Std. UNIX; see AUP2 Sec. 2.5)
03977 \par Headers:
03978     sys/stat.h
03979 \return previous mask (no error return)
03980 */
03981 mode_t umask(
03982 mode_t cmask    /**< new mask*/
03983 );
03984 /**
03985 \par Description:
03986 Unmount file system (non-standard)
03987 (Std. UNIX; see AUP2 Sec. 3.2.4)
03988 \par Headers:
03989     sys/mount.h
03990 \return 0 on success or -1 on error (sets errno)
03991 */
03992 int umount(
03993 const char *target  /**< directory*/
03994 );
03995 /**
03996 \par Description:
03997 Get the name of the current system
03998 (Std. UNIX; see AUP2 Sec. 8.8.1)
03999 \par Headers:
04000     sys/utsname.h
04001 \return ? or -1 on error (sets errno)
04002 */
04003 int uname(
04004 struct utsname *name    /**< */
04005 );
04006 /**
04007 \par Description:
04008 Union for semctl
04009 (Std. UNIX; see AUP2 Sec. 7.9.1)
04010 \par Headers:
04011 */
04012 union semun {
04013     int val;/**< integer*/
04014     struct semid_ds *buf;/**< pointer to structure*/
04015     unsigned short *array;/**< array*/
04016 };
04017 /**
04018 \par Description:
04019 Union for signal values
04020 (Std. UNIX; see AUP2 Sec. 9.5.1)
04021 \par Headers:
04022 */
04023 union sigval {
04024 int sival_int;  /**< Integer signal value*/
04025 void *sival_ptr;    /**< Pointer signal value*/
04026 };
04027 /**
04028 \par Description:
04029 Remove directory entry
04030 (Std. UNIX; see AUP2 Sec. 2.6)
04031 \par Headers:
04032     unistd.h
04033 \return 0 on success or -1 on error (sets errno)
04034 */
04035 int unlink(
04036 const char *path    /**< pathname*/
04037 );
04038 /**
04039 \par Description:
04040 Unlock pty
04041 (Std. UNIX; see AUP2 Sec. 4.10.1)
04042 \par Headers:
04043     stdlib.h
04044 \return 0 on success or -1 on error (sets errno)
04045 */
04046 int unlockpt(
04047 int fd  /**< file descriptor*/
04048 );
04049 /**
04050 \par Description:
04051 Remove environment variable
04052 (Std. UNIX; see AUP2 Sec. 5.2)
04053 \par Headers:
04054     stdlib.h
04055 \return 0 on success or -1 on error (sets errno)
04056 */
04057 int unsetenv(
04058 const char *var /**< variable to be removed*/
04059 );
04060 /**
04061 \par Description:
04062 Suspend execution for microseconds or until signal
04063 (Std. UNIX; see AUP2 Sec. 9.7.3)
04064 \par Headers:
04065     unistd.h
04066 \return 0 on success or -1 on error (sets errno)
04067 */
04068 int usleep(
04069 useconds_t usecs    /**< microseconds to sleep*/
04070 );
04071 /**
04072 \par Description:
04073 Set file access and modification times
04074 (Std. UNIX; see AUP2 Sec. 3.7.3)
04075 \par Headers:
04076     utime.h
04077 \return 0 on success or -1 on error (sets errno)
04078 */
04079 int utime(
04080 const char *path,   /**< pathname*/
04081 const struct utimbuf *timbuf    /**< new times*/
04082 );
04083 /**
04084 \par Description:
04085 Create new process; share memory (obsolete)
04086 (Std. UNIX; see AUP2 Sec. 5.5)
04087 \par Headers:
04088     unistd.h
04089 \return child’s process-ID and 0 on success or -1 on error (sets errno)
04090 */
04091 pid_t vfork(void);
04092 /**
04093 \par Description:
04094 Wait for child process to terminate
04095 (Std. UNIX; see AUP2 Sec. 5.8)
04096 \par Headers:
04097     sys/wait.h
04098 \return process ID or -1 on error (sets errno)
04099 */
04100 pid_t wait(
04101 int *statusp,   /**< pointer to status or NULL*/
04102 );
04103 /**
04104 \par Description:
04105 Wait for child process to change state [X/Open]
04106 (Std. UNIX; see AUP2 Sec. 5.8)
04107 \par Headers:
04108     sys/wait.h
04109 \return 0 on success or -1 on error (sets errno)
04110 */
04111 int waitid(
04112 idtype_t idtype,    /**< interpretation of id*/
04113 id_t id,    /**< process or process-group ID*/
04114 siginfo_t *infop,   /**< returned info*/
04115 int options /**< options*/
04116 );
04117 /**
04118 \par Description:
04119 Wait for child process to change state
04120 (Std. UNIX; see AUP2 Sec. 5.8)
04121 \par Headers:
04122     sys/wait.h
04123 \return process ID or 0 on success or -1 on error (sets errno)
04124 */
04125 pid_t waitpid(
04126 pid_t pid,  /**< process or process-group ID*/
04127 int *statusp,   /**< pointer to status or NULL*/
04128 int options /**< options (see below)*/
04129 );
04130 /**
04131 \par Description:
04132 Convert broken-down time to wide-character string with format
04133 (Std. UNIX; see AUP2 Sec. 1.7.1)
04134 \par Headers:
04135     wchar.h
04136 \return wchar_t count or zero on error (errno not set)
04137 */
04138 size_t wcsftime(
04139 wchar_t *buf,   /**< output buffer*/
04140 size_t bufsize,     /**< size of buffer*/
04141 const wchar_t *format,  /**< format*/
04142 const struct tm *tmbuf  /**< broken-down time*/
04143 );
04144 /**
04145 \par Description:
04146 Write to file descriptor
04147 (Std. UNIX; see AUP2 Sec. 2.9)
04148 \par Headers:
04149     unistd.h
04150 \return number of bytes written or -1 on error (sets errno)
04151 */
04152 ssize_t write(
04153 int fd, /**< file descriptor*/
04154 const void *buf,    /**< data to write*/
04155 size_t nbytes   /**< amount to write*/
04156 );
04157 /**
04158 \par Description:
04159 Gather write
04160 (Std. UNIX; see AUP2 Sec. 2.15)
04161 \par Headers:
04162     sys/uio.h
04163 \return number of bytes written or -1 on error (sets errno)
04164 */
04165 ssize_t writev(
04166 int fd, /**< file descriptor*/
04167 const struct iovec *iov,    /**< vector of data buffers*/
04168 int iovcnt  /**< number of elements*/
04169 );

Generated on Fri Apr 23 10:57:04 2004 for AUP2 Example Source by doxygen 1.3.1