⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 posix.3

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 3
📖 第 1 页 / 共 5 页
字号:
.IX Item "raise"Sends the specified signal to the current process.See also \*(L"kill\*(R" in perlfunc and the \f(CW$$\fR in \*(L"$PID\*(R" in perlvar..IP "rand" 8.IX Item "rand"\&\f(CW\*(C`rand()\*(C'\fR is non-portable, see \*(L"rand\*(R" in perlfunc instead..IP "read" 8.IX Item "read"Read from a file.  This uses file descriptors such as those obtained bycalling \f(CW\*(C`POSIX::open\*(C'\fR.  If the buffer \f(CW$buf\fR is not large enough for theread then Perl will extend it to make room for the request..Sp.Vb 2\&        $fd = POSIX::open( "foo", &POSIX::O_RDONLY );\&        $bytes = POSIX::read( $fd, $buf, 3 );.Ve.SpReturns \f(CW\*(C`undef\*(C'\fR on failure..SpSee also \*(L"sysread\*(R" in perlfunc..IP "readdir" 8.IX Item "readdir"This is identical to Perl's builtin \f(CW\*(C`readdir()\*(C'\fR functionfor reading directory entries, see \*(L"readdir\*(R" in perlfunc..IP "realloc" 8.IX Item "realloc"\&\fIrealloc()\fR is C\-specific.  Perl does memory management transparently..IP "remove" 8.IX Item "remove"This is identical to Perl's builtin \f(CW\*(C`unlink()\*(C'\fR functionfor removing files, see \*(L"unlink\*(R" in perlfunc..IP "rename" 8.IX Item "rename"This is identical to Perl's builtin \f(CW\*(C`rename()\*(C'\fR functionfor renaming files, see \*(L"rename\*(R" in perlfunc..IP "rewind" 8.IX Item "rewind"Seeks to the beginning of the file..IP "rewinddir" 8.IX Item "rewinddir"This is identical to Perl's builtin \f(CW\*(C`rewinddir()\*(C'\fR function forrewinding directory entry streams, see \*(L"rewinddir\*(R" in perlfunc..IP "rmdir" 8.IX Item "rmdir"This is identical to Perl's builtin \f(CW\*(C`rmdir()\*(C'\fR functionfor removing (empty) directories, see \*(L"rmdir\*(R" in perlfunc..IP "scanf" 8.IX Item "scanf"\&\fIscanf()\fR is C\-specific, use <> and regular expressions instead,see perlre..IP "setgid" 8.IX Item "setgid"Sets the real group identifier and the effective group identifier forthis process.  Similar to assigning a value to the Perl's builtin\&\f(CW$)\fR variable, see \*(L"$EGID\*(R" in perlvar, except that the latterwill change only the real user identifier, and that the \fIsetgid()\fRuses only a single numeric argument, as opposed to a space-separatedlist of numbers..IP "setjmp" 8.IX Item "setjmp"\&\f(CW\*(C`setjmp()\*(C'\fR is C\-specific: use \f(CW\*(C`eval {}\*(C'\fR instead,see \*(L"eval\*(R" in perlfunc..IP "setlocale" 8.IX Item "setlocale"Modifies and queries program's locale.  The following examples assume.Sp.Vb 1\&        use POSIX qw(setlocale LC_ALL LC_CTYPE);.Ve.Sphas been issued..SpThe following will set the traditional \s-1UNIX\s0 system locale behavior(the second argument \f(CW"C"\fR)..Sp.Vb 1\&        $loc = setlocale( LC_ALL, "C" );.Ve.SpThe following will query the current \s-1LC_CTYPE\s0 category.  (No secondargument means 'query'.).Sp.Vb 1\&        $loc = setlocale( LC_CTYPE );.Ve.SpThe following will set the \s-1LC_CTYPE\s0 behaviour according to the localeenvironment variables (the second argument \f(CW""\fR).Please see your systems \f(CWsetlocale(3)\fR documentation for the localeenvironment variables' meaning or consult perllocale..Sp.Vb 1\&        $loc = setlocale( LC_CTYPE, "" );.Ve.SpThe following will set the \s-1LC_COLLATE\s0 behaviour to ArgentinianSpanish. \fB\s-1NOTE\s0\fR: The naming and availability of locales depends onyour operating system. Please consult perllocale for how to findout which locales are available in your system..Sp.Vb 1\&        $loc = setlocale( LC_ALL, "es_AR.ISO8859\-1" );.Ve.IP "setpgid" 8.IX Item "setpgid"This is similar to the C function \f(CW\*(C`setpgid()\*(C'\fR forsetting the process group identifier of the current process..SpReturns \f(CW\*(C`undef\*(C'\fR on failure..IP "setsid" 8.IX Item "setsid"This is identical to the C function \f(CW\*(C`setsid()\*(C'\fR forsetting the session identifier of the current process..IP "setuid" 8.IX Item "setuid"Sets the real user identifier and the effective user identifier forthis process.  Similar to assigning a value to the Perl's builtin\&\f(CW$<\fR variable, see \*(L"$UID\*(R" in perlvar, except that the latterwill change only the real user identifier..IP "sigaction" 8.IX Item "sigaction"Detailed signal management.  This uses \f(CW\*(C`POSIX::SigAction\*(C'\fR objects forthe \f(CW\*(C`action\*(C'\fR and \f(CW\*(C`oldaction\*(C'\fR arguments (the oldaction can also bejust a hash reference).  Consult your system's \f(CW\*(C`sigaction\*(C'\fR manpagefor details, see also \f(CW\*(C`POSIX::SigRt\*(C'\fR..SpSynopsis:.Sp.Vb 1\&        sigaction(signal, action, oldaction = 0).Ve.SpReturns \f(CW\*(C`undef\*(C'\fR on failure.  The \f(CW\*(C`signal\*(C'\fR must be a number (like\&\s-1SIGHUP\s0), not a string (like \*(L"\s-1SIGHUP\s0\*(R"), though Perl does try hardto understand you..SpIf you use the \s-1SA_SIGINFO\s0 flag, the signal handler will in addition tothe first argument, the signal name, also receive a second argument, ahash reference, inside which are the following keys with the followingsemantics, as defined by POSIX/SUSv3:.Sp.Vb 5\&    signo       the signal number\&    errno       the error number\&    code        if this is zero or less, the signal was sent by\&                a user process and the uid and pid make sense,\&                otherwise the signal was sent by the kernel.Ve.SpThe following are also defined by POSIX/SUSv3, but unfortunatelynot very widely implemented:.Sp.Vb 4\&    pid         the process id generating the signal\&    uid         the uid of the process id generating the signal\&    status      exit value or signal for SIGCHLD\&    band        band event for SIGPOLL.Ve.SpA third argument is also passed to the handler, which contains a copyof the raw binary contents of the siginfo structure: if a system hassome non-POSIX fields, this third argument is where to \fIunpack()\fR themfrom..SpNote that not all siginfo values make sense simultaneously (some arevalid only for certain signals, for example), and not all values makesense from Perl perspective, you should to consult your system's\&\f(CW\*(C`sigaction\*(C'\fR and possibly also \f(CW\*(C`siginfo\*(C'\fR documentation..IP "siglongjmp" 8.IX Item "siglongjmp"\&\fIsiglongjmp()\fR is C\-specific: use \*(L"die\*(R" in perlfunc instead..IP "sigpending" 8.IX Item "sigpending"Examine signals that are blocked and pending.  This uses \f(CW\*(C`POSIX::SigSet\*(C'\fRobjects for the \f(CW\*(C`sigset\*(C'\fR argument.  Consult your system's \f(CW\*(C`sigpending\*(C'\fRmanpage for details..SpSynopsis:.Sp.Vb 1\&        sigpending(sigset).Ve.SpReturns \f(CW\*(C`undef\*(C'\fR on failure..IP "sigprocmask" 8.IX Item "sigprocmask"Change and/or examine calling process's signal mask.  This uses\&\f(CW\*(C`POSIX::SigSet\*(C'\fR objects for the \f(CW\*(C`sigset\*(C'\fR and \f(CW\*(C`oldsigset\*(C'\fR arguments.Consult your system's \f(CW\*(C`sigprocmask\*(C'\fR manpage for details..SpSynopsis:.Sp.Vb 1\&        sigprocmask(how, sigset, oldsigset = 0).Ve.SpReturns \f(CW\*(C`undef\*(C'\fR on failure..IP "sigsetjmp" 8.IX Item "sigsetjmp"\&\f(CW\*(C`sigsetjmp()\*(C'\fR is C\-specific: use \f(CW\*(C`eval {}\*(C'\fR instead,see \*(L"eval\*(R" in perlfunc..IP "sigsuspend" 8.IX Item "sigsuspend"Install a signal mask and suspend process until signal arrives.  This uses\&\f(CW\*(C`POSIX::SigSet\*(C'\fR objects for the \f(CW\*(C`signal_mask\*(C'\fR argument.  Consult yoursystem's \f(CW\*(C`sigsuspend\*(C'\fR manpage for details..SpSynopsis:.Sp.Vb 1\&        sigsuspend(signal_mask).Ve.SpReturns \f(CW\*(C`undef\*(C'\fR on failure..IP "sin" 8.IX Item "sin"This is identical to Perl's builtin \f(CW\*(C`sin()\*(C'\fR functionfor returning the sine of the numerical argument,see \*(L"sin\*(R" in perlfunc.  See also Math::Trig..IP "sinh" 8.IX Item "sinh"This is identical to the C function \f(CW\*(C`sinh()\*(C'\fRfor returning the hyperbolic sine of the numerical argument.See also Math::Trig..IP "sleep" 8.IX Item "sleep"This is functionally identical to Perl's builtin \f(CW\*(C`sleep()\*(C'\fR functionfor suspending the execution of the current for process for certainnumber of seconds, see \*(L"sleep\*(R" in perlfunc.  There is one significantdifference, however: \f(CW\*(C`POSIX::sleep()\*(C'\fR returns the number of\&\fBunslept\fR seconds, while the \f(CW\*(C`CORE::sleep()\*(C'\fR returns thenumber of slept seconds..IP "sprintf" 8.IX Item "sprintf"This is similar to Perl's builtin \f(CW\*(C`sprintf()\*(C'\fR functionfor returning a string that has the arguments formatted as requested,see \*(L"sprintf\*(R" in perlfunc..IP "sqrt" 8.IX Item "sqrt"This is identical to Perl's builtin \f(CW\*(C`sqrt()\*(C'\fR function.for returning the square root of the numerical argument,see \*(L"sqrt\*(R" in perlfunc..IP "srand" 8.IX Item "srand"Give a seed the pseudorandom number generator, see \*(L"srand\*(R" in perlfunc..IP "sscanf" 8.IX Item "sscanf"\&\fIsscanf()\fR is C\-specific, use regular expressions instead,see perlre..IP "stat" 8.IX Item "stat"This is identical to Perl's builtin \f(CW\*(C`stat()\*(C'\fR functionfor returning information about files and directories..IP "strcat" 8.IX Item "strcat"\&\fIstrcat()\fR is C\-specific, use \f(CW\*(C`.=\*(C'\fR instead, see perlop..IP "strchr" 8.IX Item "strchr"\&\fIstrchr()\fR is C\-specific, see \*(L"index\*(R" in perlfunc instead..IP "strcmp" 8.IX Item "strcmp"\&\fIstrcmp()\fR is C\-specific, use \f(CW\*(C`eq\*(C'\fR or \f(CW\*(C`cmp\*(C'\fR instead, see perlop..IP "strcoll" 8.IX Item "strcoll"This is identical to the C function \f(CW\*(C`strcoll()\*(C'\fRfor collating (comparing) strings transformed usingthe \f(CW\*(C`strxfrm()\*(C'\fR function.  Not really needed sincePerl can do this transparently, see perllocale..IP "strcpy" 8.IX Item "strcpy"\&\fIstrcpy()\fR is C\-specific, use \f(CW\*(C`=\*(C'\fR instead, see perlop..IP "strcspn" 8.IX Item "strcspn"\&\fIstrcspn()\fR is C\-specific, use regular expressions instead,see perlre..IP "strerror" 8.IX Item "strerror"Returns the error string for the specified errno.Identical to the string form of the \f(CW$!\fR, see \*(L"$ERRNO\*(R" in perlvar..IP "strftime" 8.IX Item "strftime"Convert date and time information to string.  Returns the string..SpSynopsis:.Sp.Vb 1\&        strftime(fmt, sec, min, hour, mday, mon, year, wday = \-1, yday = \-1, isdst = \-1).Ve.SpThe month (\f(CW\*(C`mon\*(C'\fR), weekday (\f(CW\*(C`wday\*(C'\fR), and yearday (\f(CW\*(C`yday\*(C'\fR) begin at zero.I.e. January is 0, not 1; Sunday is 0, not 1; January 1st is 0, not 1.  Theyear (\f(CW\*(C`year\*(C'\fR) is given in years since 1900.  I.e., the year 1995 is 95; theyear 2001 is 101.  Consult your system's \f(CW\*(C`strftime()\*(C'\fR manpage for detailsabout these and the other arguments..SpIf you want your code to be portable, your format (\f(CW\*(C`fmt\*(C'\fR) argumentshould use only the conversion specifiers defined by the \s-1ANSI\s0 Cstandard (C89, to play safe).  These are \f(CW\*(C`aAbBcdHIjmMpSUwWxXyYZ%\*(C'\fR.But even then, the \fBresults\fR of some of the conversion specifiers arenon-portable.  For example, the specifiers \f(CW\*(C`aAbBcpZ\*(C'\fR change accordingto the locale settings of the user, and both how to set locales (thelocale names) and what output to expect are non-standard.The specifier \f(CW\*(C`c\*(C'\fR changes according to the timezone settings of theuser and the timezone computation rules of the operating system.The \f(CW\*(C`Z\*(C'\fR specifier is notoriously unportable since the names oftimezones are non-standard. Sticking to the numeric specifiers is thesafest route..SpThe given arguments are made consistent as though by calling\&\f(CW\*(C`mktime()\*(C'\fR before calling your system's \f(CW\*(C`strftime()\*(C'\fR function,except that the \f(CW\*(C`isdst\*(C'\fR value is not affected..SpThe string for Tuesday, December 12, 1995..Sp.Vb 2\&        $str = POSIX::strftime( "%A, %B %d, %Y", 0, 0, 0, 12, 11, 95, 2 );\&        print "$str\en";.Ve.IP "strlen" 8.IX Item "strlen"\&\fIstrlen()\fR is C\-specific, use \f(CW\*(C`length()\*(C'\fR instead, see \*(L"length\*(R" in perlfunc..IP "strncat" 8.IX Item "strncat"\&\fIstrncat()\fR is C\-specific, use \f(CW\*(C`.=\*(C'\fR instead, see perlop..IP "strncmp" 8.IX Item "strncmp"\&\fIstrncmp()\fR is C\-specific, use \f(CW\*(C`eq\*(C'\fR instead, see perlop..IP "strncpy" 8.IX Item "strncpy"\&\fIstrncpy()\fR is C\-specific, use \f(CW\*(C`=\*(C'\fR instead, see perlop..IP "strpbrk" 8.IX Item "strpbrk"\&\fIstrpbrk()\fR is C\-specific, use regular expressions instead,see perlre..IP "strrchr" 8.IX Item "strrchr"\&\fIstrrchr()\fR is C\-specific, see \*(L"rindex\*(R" in perlfunc instead..IP "strspn" 8.IX Item "strspn"\&\fIstrspn()\fR is C\-specific, use regular expressions instead,see perlre..IP "strstr" 8.IX Item "strstr"This is identical to Perl's builtin \f(CW\*(C`index()\*(C'\fR function,see \*(L"index\*(R" in perlfunc..IP "strtod" 8.IX Item "strtod"String to double translation. Returns the parsed number and the number

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -