* ext/fcntl/fcntl.c: update document. use "file descriptor" instead

of "file handle" because it is not used other Ruby documents and
  it is confusing with Windows file handle.
  correct F_DUPFD behavior.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2013-01-28 03:34:43 +00:00
Родитель b2ca2c58f1
Коммит 8477d3131c
2 изменённых файлов: 16 добавлений и 5 удалений

Просмотреть файл

@ -1,3 +1,10 @@
Mon Jan 28 12:32:31 2013 Tanaka Akira <akr@fsij.org>
* ext/fcntl/fcntl.c: update document. use "file descriptor" instead
of "file handle" because it is not used other Ruby documents and
it is confusing with Windows file handle.
correct F_DUPFD behavior.
Sat Jan 26 22:39:12 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> Sat Jan 26 22:39:12 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* marshal.c (w_object): dump instance variables of the result of * marshal.c (w_object): dump instance variables of the result of

Просмотреть файл

@ -68,15 +68,19 @@ Init_fcntl()
#ifdef F_DUPFD #ifdef F_DUPFD
/* Document-const: F_DUPFD /* Document-const: F_DUPFD
* *
* Duplicate a close-on-exec file handle to a non-close-on-exec file * Duplicate a file descriptor to the mimimum unused file descriptor
* handle. * greater than or equal to the argument.
*
* The close-on-exec flag of the duplicated file descriptor is set.
* (Ruby uses F_DUPFD_CLOEXEC internally if available to avoid race
* condition. F_SETFD is used if F_DUPFD_CLOEXEC is not available.)
*/ */
rb_define_const(mFcntl, "F_DUPFD", INT2NUM(F_DUPFD)); rb_define_const(mFcntl, "F_DUPFD", INT2NUM(F_DUPFD));
#endif #endif
#ifdef F_GETFD #ifdef F_GETFD
/* Document-const: F_GETFD /* Document-const: F_GETFD
* *
* Read the close-on-exec flag of a file handle. * Read the close-on-exec flag of a file descriptor.
*/ */
rb_define_const(mFcntl, "F_GETFD", INT2NUM(F_GETFD)); rb_define_const(mFcntl, "F_GETFD", INT2NUM(F_GETFD));
#endif #endif
@ -91,7 +95,7 @@ Init_fcntl()
#ifdef F_SETFD #ifdef F_SETFD
/* Document-const: F_SETFD /* Document-const: F_SETFD
* *
* Set the close-on-exec flag of a file handle. * Set the close-on-exec flag of a file descriptor.
*/ */
rb_define_const(mFcntl, "F_SETFD", INT2NUM(F_SETFD)); rb_define_const(mFcntl, "F_SETFD", INT2NUM(F_SETFD));
#endif #endif
@ -128,7 +132,7 @@ Init_fcntl()
rb_define_const(mFcntl, "F_SETLKW", INT2NUM(F_SETLKW)); rb_define_const(mFcntl, "F_SETLKW", INT2NUM(F_SETLKW));
#endif #endif
#ifdef FD_CLOEXEC #ifdef FD_CLOEXEC
/* Document-const: F_CLOEXEC /* Document-const: FD_CLOEXEC
* *
* the value of the close-on-exec flag. * the value of the close-on-exec flag.
*/ */