Debian Codegraph @

codelitephp/resources/cc/posix.php

raw
1 <?php
2
3 // Start of posix v.
4
5 /**
6 * Send a signal to a process
7 * @link http://www.php.net/manual/en/function.posix-kill.php
8 * @param pid int <p>
9 * The process identifier.
10 * </p>
11 * @param sig int <p>
12 * One of the PCNTL signals constants.
13 * </p>
14 * @return bool Returns true on success, false on failure.
15 */
16 function posix_kill ($pid, $sig) {}
17
18 /**
19 * Return the current process identifier
20 * @link http://www.php.net/manual/en/function.posix-getpid.php
21 * @return int the identifier, as an integer.
22 */
23 function posix_getpid () {}
24
25 /**
26 * Return the parent process identifier
27 * @link http://www.php.net/manual/en/function.posix-getppid.php
28 * @return int the identifier, as an integer.
29 */
30 function posix_getppid () {}
31
32 /**
33 * Return the real user ID of the current process
34 * @link http://www.php.net/manual/en/function.posix-getuid.php
35 * @return int the user id, as an integer
36 */
37 function posix_getuid () {}
38
39 /**
40 * Set the UID of the current process
41 * @link http://www.php.net/manual/en/function.posix-setuid.php
42 * @param uid int <p>
43 * The user id.
44 * </p>
45 * @return bool Returns true on success, false on failure.
46 */
47 function posix_setuid ($uid) {}
48
49 /**
50 * Return the effective user ID of the current process
51 * @link http://www.php.net/manual/en/function.posix-geteuid.php
52 * @return int the user id, as an integer
53 */
54 function posix_geteuid () {}
55
56 /**
57 * Set the effective UID of the current process
58 * @link http://www.php.net/manual/en/function.posix-seteuid.php
59 * @param uid int <p>
60 * The user id.
61 * </p>
62 * @return bool Returns true on success, false on failure.
63 */
64 function posix_seteuid ($uid) {}
65
66 /**
67 * Return the real group ID of the current process
68 * @link http://www.php.net/manual/en/function.posix-getgid.php
69 * @return int the real group id, as an integer.
70 */
71 function posix_getgid () {}
72
73 /**
74 * Set the GID of the current process
75 * @link http://www.php.net/manual/en/function.posix-setgid.php
76 * @param gid int <p>
77 * The group id.
78 * </p>
79 * @return bool Returns true on success, false on failure.
80 */
81 function posix_setgid ($gid) {}
82
83 /**
84 * Return the effective group ID of the current process
85 * @link http://www.php.net/manual/en/function.posix-getegid.php
86 * @return int an integer of the effective group ID.
87 */
88 function posix_getegid () {}
89
90 /**
91 * Set the effective GID of the current process
92 * @link http://www.php.net/manual/en/function.posix-setegid.php
93 * @param gid int <p>
94 * The group id.
95 * </p>
96 * @return bool Returns true on success, false on failure.
97 */
98 function posix_setegid ($gid) {}
99
100 /**
101 * Return the group set of the current process
102 * @link http://www.php.net/manual/en/function.posix-getgroups.php
103 * @return array an array of integers containing the numeric group ids of the group
104 * set of the current process.
105 */
106 function posix_getgroups () {}
107
108 /**
109 * Return login name
110 * @link http://www.php.net/manual/en/function.posix-getlogin.php
111 * @return string the login name of the user, as a string.
112 */
113 function posix_getlogin () {}
114
115 /**
116 * Return the current process group identifier
117 * @link http://www.php.net/manual/en/function.posix-getpgrp.php
118 * @return int the identifier, as an integer.
119 */
120 function posix_getpgrp () {}
121
122 /**
123 * Make the current process a session leader
124 * @link http://www.php.net/manual/en/function.posix-setsid.php
125 * @return int the session id, or -1 on errors.
126 */
127 function posix_setsid () {}
128
129 /**
130 * Set process group id for job control
131 * @link http://www.php.net/manual/en/function.posix-setpgid.php
132 * @param pid int <p>
133 * The process id.
134 * </p>
135 * @param pgid int <p>
136 * The process group id.
137 * </p>
138 * @return bool Returns true on success, false on failure.
139 */
140 function posix_setpgid ($pid, $pgid) {}
141
142 /**
143 * Get process group id for job control
144 * @link http://www.php.net/manual/en/function.posix-getpgid.php
145 * @param pid int <p>
146 * The process id.
147 * </p>
148 * @return int the identifier, as an integer.
149 */
150 function posix_getpgid ($pid) {}
151
152 /**
153 * Get the current sid of the process
154 * @link http://www.php.net/manual/en/function.posix-getsid.php
155 * @param pid int <p>
156 * The process identifier. If set to 0, the current process is
157 * assumed. If an invalid pid is
158 * specified, then false is returned and an error is set which
159 * can be checked with posix_get_last_error.
160 * </p>
161 * @return int the identifier, as an integer.
162 */
163 function posix_getsid ($pid) {}
164
165 /**
166 * Get system name
167 * @link http://www.php.net/manual/en/function.posix-uname.php
168 * @return array a hash of strings with information about the
169 * system. The indices of the hash are
170 *
171 *
172 * sysname - operating system name (e.g. Linux)
173 *
174 *
175 * nodename - system name (e.g. valiant)
176 *
177 *
178 * release - operating system release (e.g. 2.2.10)
179 *
180 *
181 * version - operating system version (e.g. #4 Tue Jul 20
182 * 17:01:36 MEST 1999)
183 *
184 *
185 * machine - system architecture (e.g. i586)
186 *
187 *
188 * domainname - DNS domainname (e.g. example.com)
189 *
190 *
191 * </p>
192 * <p>
193 * domainname is a GNU extension and not part of POSIX.1, so this
194 * field is only available on GNU systems or when using the GNU
195 * libc.
196 */
197 function posix_uname () {}
198
199 /**
200 * Get process times
201 * @link http://www.php.net/manual/en/function.posix-times.php
202 * @return array a hash of strings with information about the current
203 * process CPU usage. The indices of the hash are:
204 *
205 *
206 *
207 * ticks - the number of clock ticks that have elapsed since
208 * reboot.
209 *
210 *
211 *
212 *
213 * utime - user time used by the current process.
214 *
215 *
216 *
217 *
218 * stime - system time used by the current process.
219 *
220 *
221 *
222 *
223 * cutime - user time used by current process and children.
224 *
225 *
226 *
227 *
228 * cstime - system time used by current process and children.
229 */
230 function posix_times () {}
231
232 /**
233 * Get path name of controlling terminal
234 * @link http://www.php.net/manual/en/function.posix-ctermid.php
235 * @return string Upon successful completion, returns string of the pathname to
236 * the current controlling terminal. Otherwise false is returned and errno
237 * is set, which can be checked with posix_get_last_error.
238 */
239 function posix_ctermid () {}
240
241 /**
242 * Determine terminal device name
243 * @link http://www.php.net/manual/en/function.posix-ttyname.php
244 * @param fd mixed
245 * @return string On success, returns a string of the absolute path of the
246 * fd. On failure, returns false
247 */
248 function posix_ttyname ($fd) {}
249
250 /**
251 * Determine if a file descriptor is an interactive terminal
252 * @link http://www.php.net/manual/en/function.posix-isatty.php
253 * @param fd mixed
254 * @return bool true if fd is an open descriptor connected
255 * to a terminal and false otherwise.
256 */
257 function posix_isatty ($fd) {}
258
259 /**
260 * Pathname of current directory
261 * @link http://www.php.net/manual/en/function.posix-getcwd.php
262 * @return string a string of the absolute pathname on success.
263 * On error, returns false and sets errno which can be checked with
264 * posix_get_last_error.
265 */
266 function posix_getcwd () {}
267
268 /**
269 * Create a fifo special file (a named pipe)
270 * @link http://www.php.net/manual/en/function.posix-mkfifo.php
271 * @param pathname string <p>
272 * Path to the FIFO file.
273 * </p>
274 * @param mode int <p>
275 * The second parameter mode has to be given in
276 * octal notation (e.g. 0644). The permission of the newly created
277 * FIFO also depends on the setting of the current
278 * umask. The permissions of the created file are
279 * (mode & ~umask).
280 * </p>
281 * @return bool Returns true on success, false on failure.
282 */
283 function posix_mkfifo ($pathname, $mode) {}
284
285 /**
286 * Create a special or ordinary file (POSIX.1)
287 * @link http://www.php.net/manual/en/function.posix-mknod.php
288 * @param pathname string <p>
289 * The file to create
290 * </p>
291 * @param mode int <p>
292 * This parameter is constructed by a bitwise OR between file type (one of
293 * the following constants: POSIX_S_IFREG,
294 * POSIX_S_IFCHR, POSIX_S_IFBLK,
295 * POSIX_S_IFIFO or
296 * POSIX_S_IFSOCK) and permissions.
297 * </p>
298 * @param major int[optional] <p>
299 * The major device kernel identifier (required to pass when using
300 * S_IFCHR or S_IFBLK).
301 * </p>
302 * @param minor int[optional] <p>
303 * The minor device kernel identifier.
304 * </p>
305 * @return bool Returns true on success, false on failure.
306 */
307 function posix_mknod ($pathname, $mode, $major = null, $minor = null) {}
308
309 /**
310 * Determine accessibility of a file
311 * @link http://www.php.net/manual/en/function.posix-access.php
312 * @param file string <p>
313 * The name of the file to be tested.
314 * </p>
315 * @param mode int[optional] <p>
316 * A mask consisting of one or more of POSIX_F_OK,
317 * POSIX_R_OK, POSIX_W_OK and
318 * POSIX_X_OK.
319 * </p>
320 * <p>
321 * POSIX_R_OK, POSIX_W_OK and
322 * POSIX_X_OK request checking whether the file
323 * exists and has read, write and execute permissions, respectively.
324 * POSIX_F_OK just requests checking for the
325 * existence of the file.
326 * </p>
327 * @return bool Returns true on success, false on failure.
328 */
329 function posix_access ($file, $mode = null) {}
330
331 /**
332 * Return info about a group by name
333 * @link http://www.php.net/manual/en/function.posix-getgrnam.php
334 * @param name string <p>The name of the group</p>
335 * @return array The array elements returned are:
336 * <table>
337 * The group information array
338 *
339 *
340 * <tr valign="top">
341 * <td>Element</td>
342 * <td>Description</td>
343 * </tr>
344 *
345 *
346 * <tr valign="top">
347 * <td>name</td>
348 * <td>
349 * The name element contains the name of the group. This is
350 * a short, usually less than 16 character "handle" of the
351 * group, not the real, full name. This should be the same as
352 * the name parameter used when
353 * calling the function, and hence redundant.
354 * </td>
355 * </tr>
356 * <tr valign="top">
357 * <td>passwd</td>
358 * <td>
359 * The passwd element contains the group's password in an
360 * encrypted format. Often, for example on a system employing
361 * "shadow" passwords, an asterisk is returned instead.
362 * </td>
363 * </tr>
364 * <tr valign="top">
365 * <td>gid</td>
366 * <td>
367 * Group ID of the group in numeric form.
368 * </td>
369 * </tr>
370 * <tr valign="top">
371 * <td>members</td>
372 * <td>
373 * This consists of an array of
374 * string's for all the members in the group.
375 * </td>
376 * </tr>
377 *
378 *
379 * </table>
380 */
381 function posix_getgrnam ($name) {}
382
383 /**
384 * Return info about a group by group id
385 * @link http://www.php.net/manual/en/function.posix-getgrgid.php
386 * @param gid int <p>
387 * The group id.
388 * </p>
389 * @return array The array elements returned are:
390 * <table>
391 * The group information array
392 *
393 *
394 * <tr valign="top">
395 * <td>Element</td>
396 * <td>Description</td>
397 * </tr>
398 *
399 *
400 * <tr valign="top">
401 * <td>name</td>
402 * <td>
403 * The name element contains the name of the group. This is
404 * a short, usually less than 16 character "handle" of the
405 * group, not the real, full name.
406 * </td>
407 * </tr>
408 * <tr valign="top">
409 * <td>passwd</td>
410 * <td>
411 * The passwd element contains the group's password in an
412 * encrypted format. Often, for example on a system employing
413 * "shadow" passwords, an asterisk is returned instead.
414 * </td>
415 * </tr>
416 * <tr valign="top">
417 * <td>gid</td>
418 * <td>
419 * Group ID, should be the same as the
420 * gid parameter used when calling the
421 * function, and hence redundant.
422 * </td>
423 * </tr>
424 * <tr valign="top">
425 * <td>members</td>
426 * <td>
427 * This consists of an array of
428 * string's for all the members in the group.
429 * </td>
430 * </tr>
431 *
432 *
433 * </table>
434 */
435 function posix_getgrgid ($gid) {}
436
437 /**
438 * Return info about a user by username
439 * @link http://www.php.net/manual/en/function.posix-getpwnam.php
440 * @param username string <p>
441 * An alphanumeric username.
442 * </p>
443 * @return array On success an array with the following elements is returned, else
444 * false is returned:
445 * <table>
446 * The user information array
447 *
448 *
449 * <tr valign="top">
450 * <td>Element</td>
451 * <td>Description</td>
452 * </tr>
453 *
454 *
455 * <tr valign="top">
456 * <td>name</td>
457 * <td>
458 * The name element contains the username of the user. This is
459 * a short, usually less than 16 character "handle" of the
460 * user, not the real, full name. This should be the same as
461 * the username parameter used when
462 * calling the function, and hence redundant.
463 * </td>
464 * </tr>
465 * <tr valign="top">
466 * <td>passwd</td>
467 * <td>
468 * The passwd element contains the user's password in an
469 * encrypted format. Often, for example on a system employing
470 * "shadow" passwords, an asterisk is returned instead.
471 * </td>
472 * </tr>
473 * <tr valign="top">
474 * <td>uid</td>
475 * <td>
476 * User ID of the user in numeric form.
477 * </td>
478 * </tr>
479 * <tr valign="top">
480 * <td>gid</td>
481 * <td>
482 * The group ID of the user. Use the function
483 * posix_getgrgid to resolve the group
484 * name and a list of its members.
485 * </td>
486 * </tr>
487 * <tr valign="top">
488 * <td>gecos</td>
489 * <td>
490 * GECOS is an obsolete term that refers to the finger
491 * information field on a Honeywell batch processing system.
492 * The field, however, lives on, and its contents have been
493 * formalized by POSIX. The field contains a comma separated
494 * list containing the user's full name, office phone, office
495 * number, and home phone number. On most systems, only the
496 * user's full name is available.
497 * </td>
498 * </tr>
499 * <tr valign="top">
500 * <td>dir</td>
501 * <td>
502 * This element contains the absolute path to the home
503 * directory of the user.
504 * </td>
505 * </tr>
506 * <tr valign="top">
507 * <td>shell</td>
508 * <td>
509 * The shell element contains the absolute path to the
510 * executable of the user's default shell.
511 * </td>
512 * </tr>
513 *
514 *
515 * </table>
516 */
517 function posix_getpwnam ($username) {}
518
519 /**
520 * Return info about a user by user id
521 * @link http://www.php.net/manual/en/function.posix-getpwuid.php
522 * @param uid int <p>
523 * The user identifier.
524 * </p>
525 * @return array an associative array with the following elements:
526 * <table>
527 * The user information array
528 *
529 *
530 * <tr valign="top">
531 * <td>Element</td>
532 * <td>Description</td>
533 * </tr>
534 *
535 *
536 * <tr valign="top">
537 * <td>name</td>
538 * <td>
539 * The name element contains the username of the user. This is
540 * a short, usually less than 16 character "handle" of the
541 * user, not the real, full name.
542 * </td>
543 * </tr>
544 * <tr valign="top">
545 * <td>passwd</td>
546 * <td>
547 * The passwd element contains the user's password in an
548 * encrypted format. Often, for example on a system employing
549 * "shadow" passwords, an asterisk is returned instead.
550 * </td>
551 * </tr>
552 * <tr valign="top">
553 * <td>uid</td>
554 * <td>
555 * User ID, should be the same as the
556 * uid parameter used when calling the
557 * function, and hence redundant.
558 * </td>
559 * </tr>
560 * <tr valign="top">
561 * <td>gid</td>
562 * <td>
563 * The group ID of the user. Use the function
564 * posix_getgrgid to resolve the group
565 * name and a list of its members.
566 * </td>
567 * </tr>
568 * <tr valign="top">
569 * <td>gecos</td>
570 * <td>
571 * GECOS is an obsolete term that refers to the finger
572 * information field on a Honeywell batch processing system.
573 * The field, however, lives on, and its contents have been
574 * formalized by POSIX. The field contains a comma separated
575 * list containing the user's full name, office phone, office
576 * number, and home phone number. On most systems, only the
577 * user's full name is available.
578 * </td>
579 * </tr>
580 * <tr valign="top">
581 * <td>dir</td>
582 * <td>
583 * This element contains the absolute path to the
584 * home directory of the user.
585 * </td>
586 * </tr>
587 * <tr valign="top">
588 * <td>shell</td>
589 * <td>
590 * The shell element contains the absolute path to the
591 * executable of the user's default shell.
592 * </td>
593 * </tr>
594 *
595 *
596 * </table>
597 */
598 function posix_getpwuid ($uid) {}
599
600 /**
601 * Return info about system resource limits
602 * @link http://www.php.net/manual/en/function.posix-getrlimit.php
603 * @return array an associative array of elements for each
604 * limit that is defined. Each limit has a soft and a hard limit.
605 * <table>
606 * List of possible limits returned
607 *
608 *
609 * <tr valign="top">
610 * <td>Limit name</td>
611 * <td>Limit description</td>
612 * </tr>
613 *
614 *
615 * <tr valign="top">
616 * <td>core</td>
617 * <td>
618 * The maximum size of the core file. When 0, not core files are
619 * created. When core files are larger than this size, they will
620 * be truncated at this size.
621 * </td>
622 * </tr>
623 * <tr valign="top">
624 * <td>totalmem</td>
625 * <td>
626 * The maximum size of the memory of the process, in bytes.
627 * </td>
628 * </tr>
629 * <tr valign="top">
630 * <td>virtualmem</td>
631 * <td>
632 * The maximum size of the virtual memory for the process, in bytes.
633 * </td>
634 * </tr>
635 * <tr valign="top">
636 * <td>data</td>
637 * <td>
638 * The maximum size of the data segment for the process, in bytes.
639 * </td>
640 * </tr>
641 * <tr valign="top">
642 * <td>stack</td>
643 * <td>
644 * The maximum size of the process stack, in bytes.
645 * </td>
646 * </tr>
647 * <tr valign="top">
648 * <td>rss</td>
649 * <td>
650 * The maximum number of virtual pages resident in RAM
651 * </td>
652 * </tr>
653 * <tr valign="top">
654 * <td>maxproc</td>
655 * <td>
656 * The maximum number of processes that can be created for the
657 * real user ID of the calling process.
658 * </td>
659 * </tr>
660 * <tr valign="top">
661 * <td>memlock</td>
662 * <td>
663 * The maximum number of bytes of memory that may be locked into RAM.
664 * </td>
665 * </tr>
666 * <tr valign="top">
667 * <td>cpu</td>
668 * <td>
669 * The amount of time the process is allowed to use the CPU.
670 * </td>
671 * </tr>
672 * <tr valign="top">
673 * <td>filesize</td>
674 * <td>
675 * The maximum size of the data segment for the process, in bytes.
676 * </td>
677 * </tr>
678 * <tr valign="top">
679 * <td>openfiles</td>
680 * <td>
681 * One more than the maximum number of open file descriptors.
682 * </td>
683 * </tr>
684 *
685 *
686 * </table>
687 */
688 function posix_getrlimit () {}
689
690 /**
691 * Retrieve the error number set by the last posix function that failed
692 * @link http://www.php.net/manual/en/function.posix-get-last-error.php
693 * @return int the errno (error number) set by the last posix function that
694 * failed. If no errors exist, 0 is returned.
695 */
696 function posix_get_last_error () {}
697
698 /**
699 * &Alias; <function>posix_get_last_error</function>
700 * @link http://www.php.net/manual/en/function.posix-errno.php
701 */
702 function posix_errno () {}
703
704 /**
705 * Retrieve the system error message associated with the given errno
706 * @link http://www.php.net/manual/en/function.posix-strerror.php
707 * @param errno int <p>
708 * A POSIX error number, returned by
709 * posix_get_last_error. If set to 0, then the
710 * string "Success" is returned.
711 * </p>
712 * @return string the error message, as a string.
713 */
714 function posix_strerror ($errno) {}
715
716 /**
717 * Calculate the group access list
718 * @link http://www.php.net/manual/en/function.posix-initgroups.php
719 * @param name string <p>
720 * The user to calculate the list for.
721 * </p>
722 * @param base_group_id int <p>
723 * Typically the group number from the password file.
724 * </p>
725 * @return bool Returns true on success, false on failure.
726 */
727 function posix_initgroups ($name, $base_group_id) {}
728
729
730 /**
731 * Check whether the file exists.
732 * @link http://www.php.net/manual/en/posix.constants.php
733 */
734 define ('POSIX_F_OK', 0);
735
736 /**
737 * Check whether the file exists and has execute permissions.
738 * @link http://www.php.net/manual/en/posix.constants.php
739 */
740 define ('POSIX_X_OK', 1);
741
742 /**
743 * Check whether the file exists and has write permissions.
744 * @link http://www.php.net/manual/en/posix.constants.php
745 */
746 define ('POSIX_W_OK', 2);
747
748 /**
749 * Check whether the file exists and has read permissions.
750 * @link http://www.php.net/manual/en/posix.constants.php
751 */
752 define ('POSIX_R_OK', 4);
753
754 /**
755 * Normal file
756 * @link http://www.php.net/manual/en/posix.constants.php
757 */
758 define ('POSIX_S_IFREG', 32768);
759
760 /**
761 * Character special file
762 * @link http://www.php.net/manual/en/posix.constants.php
763 */
764 define ('POSIX_S_IFCHR', 8192);
765
766 /**
767 * Block special file
768 * @link http://www.php.net/manual/en/posix.constants.php
769 */
770 define ('POSIX_S_IFBLK', 24576);
771
772 /**
773 * FIFO (named pipe) special file
774 * @link http://www.php.net/manual/en/posix.constants.php
775 */
776 define ('POSIX_S_IFIFO', 4096);
777
778 /**
779 * Socket
780 * @link http://www.php.net/manual/en/posix.constants.php
781 */
782 define ('POSIX_S_IFSOCK', 49152);
783
784 // End of posix v.
785 ?>