comparison Python/fileutils.c @ 85584:98f82b124c7d

Close #18954: Fix some typo in fileutils.c comments Patch written by Vajrasky Kok.
author Victor Stinner <victor.stinner@gmail.com>
date Sat, 07 Sep 2013 10:36:04 +0200
parents ef889c3d5dc6
children eeec58c57964
comparison
equal deleted inserted replaced
85583:4e2a1b656c1f 85584:98f82b124c7d
20 #ifdef __APPLE__ 20 #ifdef __APPLE__
21 extern wchar_t* _Py_DecodeUTF8_surrogateescape(const char *s, Py_ssize_t size); 21 extern wchar_t* _Py_DecodeUTF8_surrogateescape(const char *s, Py_ssize_t size);
22 #endif 22 #endif
23 23
24 #ifdef O_CLOEXEC 24 #ifdef O_CLOEXEC
25 /* Does open() supports the O_CLOEXEC flag? Possible values: 25 /* Does open() support the O_CLOEXEC flag? Possible values:
26 26
27 -1: unknown 27 -1: unknown
28 0: open() ignores O_CLOEXEC flag, ex: Linux kernel older than 2.6.23 28 0: open() ignores O_CLOEXEC flag, ex: Linux kernel older than 2.6.23
29 1: open() supports O_CLOEXEC flag, close-on-exec is set 29 1: open() supports O_CLOEXEC flag, close-on-exec is set
30 30
605 return !(flags & FD_CLOEXEC); 605 return !(flags & FD_CLOEXEC);
606 #endif 606 #endif
607 } 607 }
608 608
609 /* Get the inheritable flag of the specified file descriptor. 609 /* Get the inheritable flag of the specified file descriptor.
610 Return 1 if it the file descriptor can be inherited, 0 if it cannot, 610 Return 1 if the file descriptor can be inherited, 0 if it cannot,
611 raise an exception and return -1 on error. */ 611 raise an exception and return -1 on error. */
612 int 612 int
613 _Py_get_inheritable(int fd) 613 _Py_get_inheritable(int fd)
614 { 614 {
615 return get_inheritable(fd, 1); 615 return get_inheritable(fd, 1);
704 return 0; 704 return 0;
705 #endif 705 #endif
706 } 706 }
707 707
708 /* Make the file descriptor non-inheritable. 708 /* Make the file descriptor non-inheritable.
709 Return 0 success, set errno and return -1 on error. */ 709 Return 0 on success, set errno and return -1 on error. */
710 static int 710 static int
711 make_non_inheritable(int fd) 711 make_non_inheritable(int fd)
712 { 712 {
713 return set_inheritable(fd, 0, 0, NULL); 713 return set_inheritable(fd, 0, 0, NULL);
714 } 714 }