[前][次][番号順一覧][スレッド一覧]

ruby-changes:32876

From: akr <ko1@a...>
Date: Sat, 15 Feb 2014 00:16:39 +0900 (JST)
Subject: [ruby-changes:32876] akr:r44955 (trunk): * include/ruby/intern.h,

akr	2014-02-15 00:16:31 +0900 (Sat, 15 Feb 2014)

  New Revision: 44955

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44955

  Log:
    * include/ruby/intern.h,
      include/ruby/io.h,
      include/ruby/ruby.h,
      include/ruby/win32.h,
      include/ruby/backward/rubysig.h,
      bignum.c,
      gc.c,
      io.c,
      process.c,
      safe.c,
      struct.c,
      thread.c,
      ext/socket/rubysocket.h,
      ext/-test-/old_thread_select: Remove deprecated definitions
      [ruby-core:60581] [Feature #9502]

  Removed directories:
    trunk/ext/-test-/old_thread_select/
    trunk/test/-ext-/old_thread_select/
  Modified files:
    trunk/ChangeLog
    trunk/bignum.c
    trunk/ext/socket/rubysocket.h
    trunk/gc.c
    trunk/include/ruby/backward/rubysig.h
    trunk/include/ruby/intern.h
    trunk/include/ruby/io.h
    trunk/include/ruby/ruby.h
    trunk/include/ruby/win32.h
    trunk/io.c
    trunk/process.c
    trunk/safe.c
    trunk/struct.c
    trunk/thread.c
Index: include/ruby/intern.h
===================================================================
--- include/ruby/intern.h	(revision 44954)
+++ include/ruby/intern.h	(revision 44955)
@@ -102,18 +102,14 @@ VALUE rb_str_to_inum(VALUE, int, int); https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L102
 VALUE rb_cstr2inum(const char*, int);
 VALUE rb_str2inum(VALUE, int);
 VALUE rb_big2str(VALUE, int);
-DEPRECATED(VALUE rb_big2str0(VALUE, int, int));
 SIGNED_VALUE rb_big2long(VALUE);
 #define rb_big2int(x) rb_big2long(x)
 VALUE rb_big2ulong(VALUE);
 #define rb_big2uint(x) rb_big2ulong(x)
-DEPRECATED(VALUE rb_big2ulong_pack(VALUE x));
 #if HAVE_LONG_LONG
 LONG_LONG rb_big2ll(VALUE);
 unsigned LONG_LONG rb_big2ull(VALUE);
 #endif  /* HAVE_LONG_LONG */
-DEPRECATED(void rb_quad_pack(char*,VALUE));
-DEPRECATED(VALUE rb_quad_unpack(const char*,int));
 void rb_big_pack(VALUE val, unsigned long *buf, long num_longs);
 VALUE rb_big_unpack(unsigned long *buf, long num_longs);
 int rb_uv_to_utf8(char[6],unsigned long);
@@ -427,7 +423,6 @@ void rb_thread_wait_fd(int); https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L423
 int rb_thread_fd_writable(int);
 void rb_thread_fd_close(int);
 int rb_thread_alone(void);
-DEPRECATED(void rb_thread_polling(void));
 void rb_thread_sleep(int);
 void rb_thread_sleep_forever(void);
 void rb_thread_sleep_deadly(void);
@@ -437,7 +432,6 @@ VALUE rb_thread_wakeup_alive(VALUE); https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L432
 VALUE rb_thread_run(VALUE);
 VALUE rb_thread_kill(VALUE);
 VALUE rb_thread_create(VALUE (*)(ANYARGS), void*);
-DEPRECATED(int rb_thread_select(int, fd_set *, fd_set *, fd_set *, struct timeval *));
 int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
 void rb_thread_wait_for(struct timeval);
 VALUE rb_thread_current(void);
@@ -482,7 +476,6 @@ void rb_gc_call_finalizer_at_exit(void); https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L476
 VALUE rb_gc_enable(void);
 VALUE rb_gc_disable(void);
 VALUE rb_gc_start(void);
-DEPRECATED(void rb_gc_set_params(void));
 VALUE rb_define_finalizer(VALUE, VALUE);
 VALUE rb_undefine_finalizer(VALUE);
 size_t rb_gc_count(void);
@@ -623,20 +616,7 @@ VALUE rb_sym_all_symbols(void); https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L616
 /* process.c */
 void rb_last_status_set(int status, rb_pid_t pid);
 VALUE rb_last_status_get(void);
-struct rb_exec_arg {
-    VALUE execarg_obj;
-};
-DEPRECATED(int rb_proc_exec_n(int, VALUE*, const char*));
 int rb_proc_exec(const char*);
-DEPRECATED(VALUE rb_exec_arg_init(int argc, VALUE *argv, int accept_shell, struct rb_exec_arg *e));
-DEPRECATED(int rb_exec_arg_addopt(struct rb_exec_arg *e, VALUE key, VALUE val));
-DEPRECATED(void rb_exec_arg_fixup(struct rb_exec_arg *e));
-DEPRECATED(int rb_run_exec_options(const struct rb_exec_arg *e, struct rb_exec_arg *s));
-DEPRECATED(int rb_run_exec_options_err(const struct rb_exec_arg *e, struct rb_exec_arg *s, char*, size_t));
-DEPRECATED(int rb_exec(const struct rb_exec_arg*));
-DEPRECATED(int rb_exec_err(const struct rb_exec_arg*, char*, size_t));
-DEPRECATED(rb_pid_t rb_fork(int*, int (*)(void*), void*, VALUE));
-DEPRECATED(rb_pid_t rb_fork_err(int*, int (*)(void*, char*, size_t), void*, VALUE, char*, size_t));
 VALUE rb_f_exec(int,VALUE*);
 rb_pid_t rb_waitpid(rb_pid_t pid, int *status, int flags);
 void rb_syswait(rb_pid_t pid);
@@ -853,7 +833,6 @@ VALUE rb_struct_initialize(VALUE, VALUE) https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L833
 VALUE rb_struct_aref(VALUE, VALUE);
 VALUE rb_struct_aset(VALUE, VALUE, VALUE);
 VALUE rb_struct_getmember(VALUE, ID);
-DEPRECATED(VALUE rb_struct_iv_get(VALUE, const char*));
 VALUE rb_struct_s_members(VALUE);
 VALUE rb_struct_members(VALUE);
 VALUE rb_struct_alloc_noinit(VALUE);
@@ -866,9 +845,6 @@ typedef VALUE rb_blocking_function_t(voi https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L845
 void rb_thread_check_ints(void);
 int rb_thread_interrupted(VALUE thval);
 
-/* Use rb_thread_call_without_gvl family instead. */
-DEPRECATED(VALUE rb_thread_blocking_region(rb_blocking_function_t *func, void *data1,
-					   rb_unblock_function_t *ubf, void *data2));
 #define RUBY_UBF_IO ((rb_unblock_function_t *)-1)
 #define RUBY_UBF_PROCESS ((rb_unblock_function_t *)-1)
 VALUE rb_mutex_new(void);
Index: include/ruby/win32.h
===================================================================
--- include/ruby/win32.h	(revision 44954)
+++ include/ruby/win32.h	(revision 44955)
@@ -782,7 +782,7 @@ int  rb_w32_unwrap_io_handle(int); https://github.com/ruby/ruby/blob/trunk/include/ruby/win32.h#L782
 == ***CAUTION***
 Since this function is very dangerous, ((*NEVER*))
 * lock any HANDLEs(i.e. Mutex, Semaphore, CriticalSection and so on) or,
-* use anything like TRAP_BEG...TRAP_END block structure,
+* use anything like rb_thread_call_without_gvl,
 in asynchronous_func_t.
 */
 typedef uintptr_t (*asynchronous_func_t)(uintptr_t self, int argc, uintptr_t* argv);
Index: include/ruby/io.h
===================================================================
--- include/ruby/io.h	(revision 44954)
+++ include/ruby/io.h	(revision 44955)
@@ -195,7 +195,6 @@ NORETURN(void rb_eof_error(void)); https://github.com/ruby/ruby/blob/trunk/include/ruby/io.h#L195
 
 void rb_io_read_check(rb_io_t*);
 int rb_io_read_pending(rb_io_t*);
-DEPRECATED(void rb_read_check(FILE*));
 
 struct stat;
 VALUE rb_stat_new(const struct stat *);
Index: include/ruby/ruby.h
===================================================================
--- include/ruby/ruby.h	(revision 44954)
+++ include/ruby/ruby.h	(revision 44955)
@@ -541,13 +541,10 @@ char *rb_string_value_cstr(volatile VALU https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L541
 #define StringValueCStr(v) rb_string_value_cstr(&(v))
 
 void rb_check_safe_obj(VALUE);
-DEPRECATED(void rb_check_safe_str(VALUE));
 #define SafeStringValue(v) do {\
     StringValue(v);\
     rb_check_safe_obj(v);\
 } while (0)
-/* obsolete macro - use SafeStringValue(v) */
-#define Check_SafeStr(v) rb_check_safe_str((VALUE)(v))
 
 VALUE rb_str_export(VALUE);
 #define ExportStringValue(v) do {\
Index: include/ruby/backward/rubysig.h
===================================================================
--- include/ruby/backward/rubysig.h	(revision 44954)
+++ include/ruby/backward/rubysig.h	(revision 44955)
@@ -29,11 +29,6 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/backward/rubysig.h#L29
 
 RUBY_SYMBOL_EXPORT_BEGIN
 
-struct rb_blocking_region_buffer;
-DEPRECATED(RUBY_EXTERN struct rb_blocking_region_buffer *rb_thread_blocking_region_begin(void));
-DEPRECATED(RUBY_EXTERN void rb_thread_blocking_region_end(struct rb_blocking_region_buffer *));
-#define TRAP_BEG do {struct rb_blocking_region_buffer *__region = rb_thread_blocking_region_begin();
-#define TRAP_END rb_thread_blocking_region_end(__region);} while (0)
 #define RUBY_CRITICAL(statements) do {statements;} while (0)
 #define DEFER_INTS (0)
 #define ENABLE_INTS (1)
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44954)
+++ ChangeLog	(revision 44955)
@@ -1,3 +1,21 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Feb 15 00:13:14 2014  Tanaka Akira  <akr@f...>
+
+	* include/ruby/intern.h,
+	  include/ruby/io.h,
+	  include/ruby/ruby.h,
+	  include/ruby/win32.h,
+	  include/ruby/backward/rubysig.h,
+	  bignum.c,
+	  gc.c,
+	  io.c,
+	  process.c,
+	  safe.c,
+	  struct.c,
+	  thread.c,
+	  ext/socket/rubysocket.h,
+	  ext/-test-/old_thread_select: Remove deprecated definitions
+	  [ruby-core:60581] [Feature #9502]
+
 Fri Feb 14 18:38:46 2014  Eric Wong  <e@8...>
 
 	* string.c (rb_str_format_m): trade volatile for RB_GC_GUARD
Index: io.c
===================================================================
--- io.c	(revision 44954)
+++ io.c	(revision 44955)
@@ -397,22 +397,6 @@ rb_cloexec_fcntl_dupfd(int fd, int minfd https://github.com/ruby/ruby/blob/trunk/io.c#L397
 #define argf_of(obj) (*(struct argf *)DATA_PTR(obj))
 #define ARGF argf_of(argf)
 
-#ifdef _STDIO_USES_IOSTREAM  /* GNU libc */
-#  ifdef _IO_fpos_t
-#    define STDIO_READ_DATA_PENDING(fp) ((fp)->_IO_read_ptr != (fp)->_IO_read_end)
-#  else
-#    define STDIO_READ_DATA_PENDING(fp) ((fp)->_gptr < (fp)->_egptr)
-#  endif
-#elif defined(FILE_COUNT)
-#  define STDIO_READ_DATA_PENDING(fp) ((fp)->FILE_COUNT > 0)
-#elif defined(FILE_READEND)
-#  define STDIO_READ_DATA_PENDING(fp) ((fp)->FILE_READPTR < (fp)->FILE_READEND)
-#elif defined(__BEOS__) || defined(__HAIKU__)
-#  define STDIO_READ_DATA_PENDING(fp) ((fp)->_state._eof == 0)
-#else
-#  define STDIO_READ_DATA_PENDING(fp) (!feof(fp))
-#endif
-
 #define GetWriteIO(io) rb_io_get_write_io(io)
 
 #define READ_DATA_PENDING(fptr) ((fptr)->rbuf.len)
@@ -866,14 +850,6 @@ rb_io_read_pending(rb_io_t *fptr) https://github.com/ruby/ruby/blob/trunk/io.c#L850
 }
 
 void
-rb_read_check(FILE *fp)
-{
-    if (!STDIO_READ_DATA_PENDING(fp)) {
-	rb_thread_wait_fd(fileno(fp));
-    }
-}
-
-void
 rb_io_read_check(rb_io_t *fptr)
 {
     if (!READ_DATA_PENDING(fptr)) {
Index: thread.c
===================================================================
--- thread.c	(revision 44954)
+++ thread.c	(revision 44955)
@@ -1099,15 +1099,6 @@ sleep_wait_for_interrupt(rb_thread_t *th https://github.com/ruby/ruby/blob/trunk/thread.c#L1099
     sleep_timeval(th, double2timeval(sleepsec), spurious_check);
 }
 
-static void
-sleep_for_polling(rb_thread_t *th)
-{
-    struct timeval time;
-    time.tv_sec = 0;
-    time.tv_usec = 100 * 1000;	/* 0.1 sec */
-    sleep_timeval(th, time, 1);
-}
-
 void
 rb_thread_wait_for(struct timeval time)
 {
@@ -1115,16 +1106,6 @@ rb_thread_wait_for(struct timeval time) https://github.com/ruby/ruby/blob/trunk/thread.c#L1106
     sleep_timeval(th, time, 1);
 }
 
-void
-rb_thread_polling(void)
-{
-    if (!rb_thread_alone()) {
-	rb_thread_t *th = GET_THREAD();
-	RUBY_VM_CHECK_INTS_BLOCKING(th);
-	sleep_for_polling(th);
-    }
-}
-
 /*
  * CAUTION: This function causes thread switching.
  *          rb_thread_check_ints() check ruby's interrupts.
@@ -1225,26 +1206,6 @@ blocking_region_end(rb_thread_t *th, str https://github.com/ruby/ruby/blob/trunk/thread.c#L1206
     }
 }
 
-struct rb_blocking_region_buffer *
-rb_thread_blocking_region_begin(void)
-{
-    rb_thread_t *th = GET_THREAD();
-    struct rb_blocking_region_buffer *region = ALLOC(struct rb_blocking_region_buffer);
-    blocking_region_begin(th, region, ubf_select, th, FALSE);
-    return region;
-}
-
-void
-rb_thread_blocking_region_end(struct rb_blocking_region_buffer *region)
-{
-    int saved_errno = errno;
-    rb_thread_t *th = ruby_thread_from_native();
-    blocking_region_end(th, region);
-    xfree(region);
-    RUBY_VM_CHECK_INTS_BLOCKING(th);
-    errno = saved_errno;
-}
-
 static void *
 call_without_gvl(void *(*func)(void *), void *data1,
 		 rb_unblock_function_t *ubf, void *data2, int fail_if_interrupted)
@@ -1406,19 +1367,10 @@ rb_thread_io_blocking_region(rb_blocking https://github.com/ruby/ruby/blob/trunk/thread.c#L1367
     return val;
 }
 
-VALUE
-rb_thread_blocking_region(
-    rb_blocking_function_t *func, void *data1,
-    rb_unblock_function_t *ubf, void *data2)
-{
-    void *(*f)(void*) = (void *(*)(void*))func;
-    return (VALUE)rb_thread_call_without_gvl(f, data1, ubf, data2);
-}
-
 /*
  * rb_thread_call_with_gvl - re-enter the Ruby world after GVL release.
  *
- * After releasing GVL using rb_thread_blocking_region() or
+ * After releasing GVL using
  * rb_thread_call_without_gvl() you can not access Ruby values or invoke
  * methods. If you need to access Ruby you must use this function
  * rb_thread_call_with_gvl().
@@ -3274,17 +3226,6 @@ rb_fd_copy(rb_fdset_t *dst, const fd_set https://github.com/ruby/ruby/blob/trunk/thread.c#L3226
     memcpy(dst->fdset, src, size);
 }
 
-static void
-rb_fd_rcopy(fd_set *dst, rb_fdset_t *src)
-{
-    size_t size = howmany(rb_fd_max(src), NFDBITS) * sizeof(fd_mask);
-
-    if (size > sizeof(fd_set)) {
-	rb_raise(rb_eArgError, "too large fdsets");
-    }
-    memcpy(dst, rb_fd_ptr(src), sizeof(fd_set));
-}
-
 void
 rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src)
 {
@@ -3348,21 +3289,6 @@ rb_fd_init_copy(rb_fdset_t *dst, rb_fdse https://github.com/ruby/ruby/blob/trunk/thread.c#L3289
     rb_fd_dup(dst, src);
 }
 
-static void
-rb_fd_rcopy(fd_set *dst, rb_fdset_t *src)
-{
-    int max = rb_fd_max(src);
-
-    /* we assume src is the result of select() with dst, so dst should be
-     * larger or equal than src. */
-    if (max > FD_SETSIZE || (UINT)max > dst->fd_count) {
-	rb_raise(rb_eArgError, "too large fdsets");
-    }
-
-    memcpy(dst->fd_array, src->fdset->fd_array, max);
-    dst->fd_count = max;
-}
-
 void
 rb_fd_term(rb_fdset_t *set)
 {
@@ -3399,8 +3325,6 @@ rb_fd_set(int fd, rb_fdset_t *set) https://github.com/ruby/ruby/blob/trunk/thread.c#L3325
 #define FD_CLR(i, f)	rb_fd_clr((i), (f))
 #define FD_ISSET(i, f)	rb_fd_isset((i), (f))
 
-#else
-#define rb_fd_rcopy(d, s) (*(d) = *(s))
 #endif
 
 static int
@@ -3514,50 +3438,6 @@ rb_thread_fd_writable(int fd) https://github.com/ruby/ruby/blob/trunk/thread.c#L3438
 }
 
 int
-rb_thread_select(int max, fd_set * read, fd_set * write, fd_set * except,
-		 struct timeval *timeout)
-{
-    rb_fdset_t fdsets[3];
-    rb_fdset_t *rfds = NULL;
-    rb_fdset_t *wfds = NULL;
-    rb_fdset_t *efds = NULL;
-    int retval;
-
-    if (read) {
-	rfds = &fdsets[0];
-	rb_fd_init(rfds);
-	rb_fd_copy(rfds, read, max);
-    }
-    if (write) {
-	wfds = &fdsets[1];
-	rb_fd_init(wfds);
-	rb_fd_copy(wfds, write, max);
-    }
-    if (except) {
-	efds = &fdsets[2];
-	rb_fd_init(efds);
-	rb_fd_copy(efds, except, max);
-    }
-
-    retval = rb_thread_fd_select(max, rfds, wfds, efds, timeout);
-
-    if (rfds) {
-	rb_fd_rcopy(read, rfds);
-	rb_fd_term(rfds);
-    }
-    if (wfds) {
-	rb_fd_rcopy(write, wfds);
-	rb_fd_term(wfds);
-    }
-    if (efds) {
-	rb_fd_rcopy(except, efds);
-	rb_fd_term(efds);
-    }
-
-    return retval;
-}
-
-int
 rb_thread_fd_select(int max, rb_fdset_t * read, rb_fdset_t * write, rb_fdset_t * except,
 		    struct timeval *timeout)
 {
Index: struct.c
===================================================================
--- struct.c	(revision 44954)
+++ struct.c	(revision 44955)
@@ -30,12 +30,6 @@ struct_ivar_get(VALUE c, ID id) https://github.com/ruby/ruby/blob/trunk/struct.c#L30
 }
 
 VALUE
-rb_struct_iv_get(VALUE c, const char *name)
-{
-    return struct_ivar_get(c, rb_intern(name));
-}
-
-VALUE
 rb_struct_s_members(VALUE klass)
 {
     VALUE members = struct_ivar_get(klass, id_members);
Index: gc.c
===================================================================
--- gc.c	(revision 44954)
+++ gc.c	(revision 44955)
@@ -5818,12 +5818,6 @@ ruby_gc_set_params(int safe_level) https://github.com/ruby/ruby/blob/trunk/gc.c#L5818
 }
 
 void
-rb_gc_set_params(void)
-{
-    ruby_gc_set_params(rb_safe_level());
-}
-
-void
 rb_objspace_reachable_objects_from(VALUE obj, void (func)(VALUE, void *), void *data)
 {
     rb_objspace_t *objspace = &rb_objspace;
Index: process.c
===================================================================
--- process.c	(revision 44954)
+++ process.c	(revision 44955)
@@ -1222,54 +1222,6 @@ proc_exec_cmd(const char *prog, VALUE ar https://github.com/ruby/ruby/blob/trunk/process.c#L1222
 #endif
 }
 
-/* deprecated */
-static int
-proc_exec_v(char **argv, const char *prog)
-{
-    char fbuf[MAXPATHLEN];
-
-    if (!prog)
-        prog = argv[0];
-    prog = dln_find_exe_r(prog, 0, fbuf, sizeof(fbuf));
-    if (!prog) {
-        errno = ENOENT;
-        return -1;
-    }
-    before_exec();
-    execv(prog, argv);
-    preserving_errno(try_with_sh(prog, argv, 0); after_exec());
-    return -1;
-}
-
-/* deprecated */
-int
-rb_proc_exec_n(int argc, VALUE *argv, const char *prog)
-{
-#define ARGV_COUNT(n) ((n)+1)
-#define ARGV_SIZE(n) (sizeof(char*) * ARGV_COUNT(n))
-#define ALLOC_ARGV(n, v) ALLOCV_N(char*, (v), ARGV_COUNT(n))
-
-    char **args;
-    int i;
-    int ret = -1;
-    VALUE v;
-
-    args = ALLOC_ARGV(argc+1, v);
-    for (i=0; i<argc; i++) {
-	args[i] = RSTRING_PTR(argv[i]);
-    }
-    args[i] = 0;
-    if (args[0]) {
-	ret = proc_exec_v(args, prog);
-    }
-    ALLOCV_END(v);
-    return ret;
-
-#undef ARGV_COUNT
-#undef ARGV_SIZE
-#undef ALLOC_ARGV
-}
-
 /* This function should be async-signal-safe.  Actually it is. */
 static int
 proc_exec_sh(const char *str, VALUE envp_str)
@@ -1796,12 +1748,6 @@ redirect: https://github.com/ruby/ruby/blob/trunk/process.c#L1748
     return ST_CONTINUE;
 }
 
-int
-rb_exec_arg_addopt(struct rb_exec_arg *e, VALUE key, VALUE val)
-{
-    return rb_execarg_addopt(e->execarg_obj, key, val);
-}
-
 static int
 check_exec_options_i(st_data_t st_key, st_data_t st_val, st_data_t arg)
 {
@@ -2252,12 +2198,6 @@ rb_execarg_init(int argc, VALUE *argv, i https://github.com/ruby/ruby/blob/trunk/process.c#L2198
     return ret;
 }
 
-VALUE
-rb_exec_arg_init(int argc, VALUE *argv, int accept_shell, struct rb_exec_arg *e)
-{
-    return rb_execarg_init(argc, argv, accept_shell, e->execarg_obj);
-}
-
 void
 rb_execarg_setenv(VALUE execarg_obj, VALUE env)
 {
@@ -2360,13 +2300,9 @@ rb_execarg_fixup(VALUE execarg_obj) https://github.com/ruby/ruby/blob/trunk/process.c#L2300
     RB_GC_GUARD(execarg_obj);
 }
 
-void
-rb_exec_arg_fixup(struct rb_exec_arg *e)
-{
-    rb_execarg_fixup(e->execarg_obj);
-}
-
+#if defined(__APPLE__) || defined(__HAIKU__)
 static int rb_exec_without_timer_thread(const struct rb_execarg *eargp, char *errmsg, size_t errmsg_buflen);
+#endif
 
 /*
  *  call-seq:
@@ -2825,8 +2761,9 @@ static int https://github.com/ruby/ruby/blob/trunk/process.c#L2761
 run_exec_pgroup(const struct rb_execarg *eargp, struct rb_execarg *sargp, char *errmsg, size_t errmsg_buflen)
 {
     /*
-     * If FD_CLOEXEC is available, rb_fork waits the child's execve.
-     * So setpgid is done in the child when rb_fork is returned in the parent.
+     * If FD_CLOEXEC is available, rb_fork_internal waits the child's execve.
+     * So setpgid is done in the child when rb_fork_internal is returned in
+     * the parent.
      * No race condition, even without setpgid from the parent.
      * (Is there an environment which has setpgid but no FD_CLOEXEC?)
      */
@@ -3050,18 +2987,6 @@ rb_execarg_run_options(const struct rb_e https://github.com/ruby/ruby/blob/trunk/process.c#L2987
     return 0;
 }
 
-int
-rb_run_exec_options_err(const struct rb_exec_arg *e, struct rb_exec_arg *s, char *errmsg, size_t errmsg_buflen)
-{
-    return rb_execarg_run_options(rb_execarg_get(e->execarg_obj), rb_execarg_get(s->execarg_obj), errmsg, errmsg_buflen);
-}
-
-int
-rb_run_exec_options(const struct rb_exec_arg *e, struct rb_exec_arg *s)
-{
-    return rb_execarg_run_options(rb_execarg_get(e->execarg_obj), rb_execarg_get(s->execarg_obj), NULL, 0);
-}
-
 /* This function should be async-signal-safe.  Hopefully it is. */
 int
 rb_exec_async_signal_safe(const struct rb_execarg *eargp, char *errmsg, size_t errmsg_buflen)
@@ -3096,6 +3021,7 @@ failure: https://github.com/ruby/ruby/blob/trunk/process.c#L3021
     return -1;
 }
 
+#if defined(__APPLE__) || defined(__HAIKU__)
 static int
 rb_exec_without_timer_thread(const struct rb_execarg *eargp, char *errmsg, size_t errmsg_buflen)
 {
@@ -3105,34 +3031,7 @@ rb_exec_without_timer_thread(const struc https://github.com/ruby/ruby/blob/trunk/process.c#L3031
     preserving_errno(after_exec_non_async_signal_safe()); /* not async-signal-safe because it calls rb_thread_start_timer_thread.  */
     return ret;
 }
-
-int
-rb_exec_err(const struct rb_exec_arg *e, char *errmsg, size_t errmsg_buflen)
-{
-    return rb_exec_without_timer_thread(rb_execarg_get(e->execarg_obj), errmsg, errmsg_buflen);
-}
-
-int
-rb_exec(const struct rb_exec_arg *e)
-{
-#if !defined FD_CLOEXEC && !defined HAVE_SPAWNV
-    char errmsg[80] = {  (... truncated)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]