Provides access to standard POSIX 1003.1 identifiers: functions,
classes, and constants. Can be use
d to
import one or multiple symbols:
Functions listed as C-specific are not implemented.use POSIX; # import all symbols use POSIX qw(setsid); # import one symbol use POSIX qw(:errno_h :fcntl_h); # import sets of symbols
_exit | Identical to C function _exit(2) |
abort | Identical to C function abort(3) |
abs | Identical to Perl's abs function |
access |
Determines accessibility of a file; returns |
acos | Identical to C function |
alarm | Identical to Perl's |
asctime | Identical to C function |
asin | Identical to C function |
assert | Similar to C macro |
atan | Identical to C function |
atan2 | Identical to Perl's |
atexit | C-specific; use |
atof | C-specific |
atoi | C-specific |
atol | C-specific |
bsearch | Not supplied |
calloc | C-specific |
ceil | Identical to C function |
chdir | Identical to Perl's |
chmod | Identical to Perl's |
chown | Identical to Perl's |
clearerr | Uses method |
clock | Identical to C function |
close | Closes a file; returns |
closedir | Identical to Perl's |
cos | Identical to Perl's |
cosh | Identical to C function |
creat | Creates a new file |
ctermid | Generates path name for the controlling terminal |
ctime | Identical to C function |
cuserid | Gets user's login name |
difftime | Identical to C function |
div | C-specific |
dup |
Similar to C function |
dup2 |
Similar to C function |
errno | Returns the value of |
execl | C-specific; use Perl's |
execle | C-specific; use Perl's |
execlp | C-specific; use Perl's |
execv | C-specific; use Perl's |
execve | C-specific; use Perl's |
execvp | C-specific; use Perl's |
exit | Identical to Perl's |
exp | Identical to Perl's |
fabs | Identical to Perl's |
fclose | Uses method |
fcntl | Identical to Perl's |
fdopen | Uses method |
feof | Uses method |
ferror | Uses method |
fflush | Uses method |
fgetc | Uses method |
fgetpos | Uses method |
fgets | Uses method |
fileno | Uses method |
floor | Identical to C function |
fmod | Identical to C function |
fopen | Uses method |
fork | Identical to Perl's |
fpathconf |
Returns value of a configurable limit on a file or directory,
or |
fprintf | C-specific; use Perl's |
fputc | C-specific; use Perl's |
fputs | C-specific; use Perl's |
fread | C-specific; use Perl's |
free | C-specific |
freopen | C-specific; use Perl's |
frexp | Returns mantissa and exponent of a floating-point number |
fscanf | C-specific; use |
fseek | Uses method |
fsetpos | Uses method |
fstat | Gets file status |
ftell | Uses method |
fwrite | C-specific; use Perl's |
getc | Identical to Perl's |
getchar | Returns one character from STDIN |
getcwd | Returns name of current working directory |
getegid | Returns effective group ID (gid) |
getenv | Returns value of the specified environment variable |
geteuid | Returns the effective user ID (uid) |
getgid | Returns the user's real group ID (gid) |
getgrgid | Identical to Perl's |
getgrnam | Identical to Perl's |
getgroups | Returns ids of the user's supplementary groups |
getlogin | Identical to Perl's |
getpgrp | Identical to Perl's |
getpid | Returns ID of the process (pid) |
getppid | Identical to Perl's |
getpwnam | Identical to Perl's |
getpwuid | Identical to Perl's |
gets | Returns one line from STDIN |
getuid | Returns user's ID (uid) |
gmtime | Identical to Perl's |
isalnum | Identical to C function, but can apply to one character or a whole string |
isalpha | Identical to C function, but can apply to one character or a whole string |
isatty | Returns Boolean indicating whether the specified filehandle is connected to a TTY |
iscntrl | Identical to C function, but can apply to one character or a whole string |
isdigit | Identical to C function, but can apply to one character or a whole string |
isgraph | Identical to C function, but can apply to one character or a whole string |
islower | Identical to C function, but can apply to one character or a whole string |
isprint | Identical to C function, but can apply to one character or a whole string |
ispunct | Identical to C function, but can apply to one character or a whole string |
isspace | Identical to C function, but can apply to one character or a whole string |
isupper | Identical to C function, but can apply to one character or a whole string |
isxdigit | Identical to C function, but can apply to one character or a whole string |
kill | Identical to Perl's |
labs | C-specific; use Perl's |
ldexp | Identical to C function |
ldiv |
C-specific; use division operator ( |
link | Identical to Perl's |
localeconv | Gets numeric formatting information. Returns reference to a hash containing the current locale formatting values. |
localtime | Identical to Perl's |
log | Identical to Perl's |
log10 | Identical to C function |
longjmp | C-specific; use Perl's |
lseek |
Moves the read/write file pointer; returns |
malloc | C-specific |
mblen | Identical to C function |
mbstowcs | Identical to C function |
mbtowc | Identical to C function |
memchr | C-specific; use Perl's |
memcmp | C-specific; use |
memcpy | C-specific; use |
memmove | C-specific; use |
memset | C-specific; use |
mkdir | Identical to Perl's |
mkfifo | Similar to C function |
mktime |
Converts date/time information to a calendar time; returns |
modf | Returns integral and fractional parts of a floating-point number |
nice |
Similar to C function |
offsetof | C-specific |
open |
Opens file for reading or writing; returns |
opendir |
Opens directory for reading; returns |
pathconf |
Retrieves value of a configurable limit on a file or directory;
returns |
pause |
Similar to C function |
perror | Identical to C function |
pipe | Creates an interprocess channel |
pow | Computes |
printf | Prints specified arguments to STDOUT |
putc | C-specific; use Perl's |
putchar | C-specific; use Perl's |
puts | C-specific; use Perl's |
qsort | C-specific; use Perl's |
raise | Sends specified signal to current process |
rand | Non-portable; use Perl's |
read | Reads from a file; returns |
readdir | Identical to Perl's |
realloc | C-specific |
remove | Identical to Perl's |
rename | Identical to Perl's |
rewind | Seeks to beginning of file |
rewinddir | Identical to Perl's |
rmdir | Identical to Perl's |
scanf | C-specific; use |
setgid | Sets real group id for this process |
setjmp | C-specific; use |
setlocale | Modifies and queries program's locale |
setpgid |
Similar to C function |
setsid | Identical to C function |
setuid | Sets real user ID for this process |
sigaction |
Detailed signal management; returns |
siglongjmp | C-specific; use Perl's |
sigpending |
Examines blocked, pending signals and returns |
sigprocmask |
Changes and/or examines this process's signal mask; returns
|
sigsetjmp | C-specific; use |
sigsuspend |
Installs signal mask and suspends process until signal arrives;
returns |
sin | Identical to Perl's |
sinh | Identical to C function |
sleep | Identical to Perl's |
sprintf | Identical to Perl's |
sqrt | Identical to Perl's |
srand | Identical to Perl's |
sscanf | C-specific; use regular expressions |
stat | Identical to Perl's |
strcat | C-specific; use |
strchr | C-specific; use |
strcmp | C-specific; use |
strcoll | Identical to C function |
strcpy | C-specific; use |
strcspn | C-specific; use regular expressions |
strerror | Returns error string for the specified |
strftime | Converts date and time to string and returns the string |
strlen | C-specific; use |
strncat | C-specific; use |
strncmp | C-specific; use |
strncpy | C-specific; use |
stroul | C-specific |
strpbrk | C-specific |
strrchr | C-specific; use |
strspn | C-specific |
strstr | Identical to Perl's |
strtod | C-specific |
strtok | C-specific |
strtol | C-specific |
strtoul | C-specific |
strxfrm | String transformation; returns the transformed string |
sysconf |
Retrieves values of system configurable variables;
returns |
system | Identical to Perl's |
tan | Identical to C function |
tanh | Identical to C function |
tcdrain |
Similar to C function |
tcflow |
Similar to C function |
tcflush |
Similar to C function |
tcgetpgrp | Identical to C function |
tcsendbreak |
Similar to C function |
tcsetpgrp |
Similar to C function |
time | Identical to Perl's |
times | Returns, in clock ticks, elapsed realtime since some point in the past, user and system times for this process, and user and system times for child processes |
tmpfile | Uses method |
tmpnam | Returns a name for a temporary file |
tolower | Identical to Perl's |
toupper | Identical to Perl's |
ttyname | Identical to C function |
tzname |
Retrieves time conversion information from the |
tzset | Identical to C function |
umask | Identical to Perl's |
uname | Gets name of current operating system |
ungetc | Uses method |
unlink | Identical to Perl's |
utime | Identical to Perl's |
vfprintf | C-specific |
vprintf | C-specific |
vsprintf | C-specific |
wait | Identical to Perl's |
waitpid |
Waits for child process to change state; identical
to Perl's |
wcstombs | Identical to C function |
wctomb | Identical to C function |
write | Writes to file; returns |
The following sections show the classes that are defined and their methods:
The following constants are associated with the Termios class:
B0 B75 B134 B200 B600 B1800 B4800 B19200 B50 B110 B150 B300 B1200 B2400 B9600 B38400
VEOF VERASE VKILL VSUSP VSTOP VTIME VEOL VINTR VQUIT VSTART VMIN NCCS
CLOCAL CSIZE CS6 CS8 HUPCL PARODD CREAD CS5 CS7 CSTOPS PARENB
BRKINT IGNBRK IGNPAR INPCK IXOFF PARMRK ICRNL IGNCR INLCR ISTRIP IXON
ECHO ECHONL ISIG ECHOE ICANON NOFLSH ECHOK IEXTEN TOSTOP
OPOST
TCSADRAIN TCIOFLUSH TCIFLUSH TCSANOW TCOFLUSH TCSAFLUSH TCOON TCION TCIOFF
The following are other constants defined in the POSIX module:
_PC_CHOWN_RESTRICTED _PC_LINK_MAX _PC_MAX_CANON _PC_MAX_INPUT _PC_NAME_MAX _PC_NO_TRUNC _PC_PATH_MAX _PC_PIPE_BUF _PC_VDISABLE
_POSIX_ARG_MAX _POSIX_CHILD_MAX _POSIX_CHOWN_RESTRICTED _POSIX_JOB_CONTROL _POSIX_LINK_MAX _POSIX_MAX_CANON _POSIX_MAX_INPUT _POSIX_NAME_MAX _POSIX_NGROUPS_MAX _POSIX_NO_TRUNC _POSIX_OPEN_MAX _POSIX_PATH_MAX _POSIX_PIPE_BUF _POSIX_SAVED_IDS _POSIX_SSIZE_MAX _POSIX_STREAM_MAX _POSIX_TZNAME_MAX _POSIX_VDISABLE _POSIX_VERSION
_SC_ARG_MAX _SC_CHILD_MAX _SC_CLK_TCK _SC_JOB_CONTROL _SC_NGROUPS_MAX _SC_OPEN_MAX _SC_SAVED_IDS _SC_STREAM_MAX _SC_TZNAME_MAX _SC_VERSION
E2BIG EACCES EAGAIN EBADF EBUSY ECHILD EDEADLK EDOM EEXIST EFAUL EFBIG EINTR EINVAL EIO EISDIR EMFILE EMLINK ENAMETOOLONG ENFILE ENODE ENOENT ENOEXEC ENOLCK ENOMEM ENOSPC ENOSYS ENOTDIR ENOTEMPTY ENOTTY ENXIO EPERM EPIPE ERANGE EROFS ESPIPE ESRCH EXDEV
FD_CLOEXEC F_DUPFD F_GETFD F_GETFL F_GETLK F_OK F_RDLCK F_SETFD F_SETFL F_SETLK F_SETLKW F_UNLCK F_WRLCK O_ACCMODE O_APPEND O_CREAT O_EXCL O_NOCTTY O_NONBLOCK O_RDONLY O_RDWR O_TRUNC O_WRONLY
DBL_DIG DBL_EPSILON DBL_MANT_DIG DBL_MAX DBL_MAX_10_EXP DBL_MAX_EXP DBL_MIN DBL_MIN_10_EXP DBL_MIN_EXP FLT_DIG FLT_EPSILON FLT_MANT_DIG FLT_MAX FLT_MAX_10_EXP FLT_MAX_EXP FLT_MIN FLT_MIN_10_EXP FLT_MIN_EXP FLT_RADIX FLT_ROUNDS LDBL_DIG LDBL_EPSILON LDBL_MANT_DIG LDBL_MAX LDBL_MAX_10_EXP LDBL_MAX_EXP LDBL_MIN LDBL_MIN_10_EXP LDBL_MIN_EXP
ARG_MAX CHAR_BIT CHAR_MAX CHAR_MIN CHILD_MAX INT_MAX INT_MIN LINK_MAX LONG_MAX LONG_MIN MAX_CANON MAX_INPUT MB_LEN_MAX NAME_MAX NGROUPS_MAX OPEN_MAX PATH_MAX PIPE_BUF SCHAR_MAX SCHAR_MIN SHRT_MAX SHRT_MIN SSIZE_MAX STREAM_MAX TZNAME_MAX UCHAR_MAX UINT_MAX ULONG_MAX USHRT_MAX
LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY LC_NUMERIC LC_TIME
HUGE_VAL
SA_NOCLDSTOP SIGABRT SIGALRM SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT SIGSEGV SIGSTOP SIGTERM SIGTSTP SIGTTIN SIGTTOU SIGUSR1 SIGUSR2 SIG_BLOCK SIG_DFL SIG_ERR SIG_IGN SIG_SETMASK SIG_UNBLOCK
S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_ISGID S_ISUID S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR
S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISREG
EXIT_FAILURE EXIT_SUCCESS MB_CUR_MAX RAND_MAX
BUFSIZ EOF FILENAME_MAX L_ctermid L_cuserid L_tmpname TMP_MAX
CLK_TCK CLOCKS_PER_SEC
R_OK SEEK_CUR SEEK_END SEEK_SET STDIN_FILENO STDOUT_FILENO STRERR_FILENO W_OK X_OK
WNOHANG WUNTRACED
WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG WIFSTOPPED WSTOPSIG
Copyright © 2001 O'Reilly & Associates. All rights reserved.