akr
53b17a769b
* internal.h (rb_exec_arg): use union to represent command invocation
...
with/without shell.
* process.c: follow the rb_exec_arg change.
* io.c (pipe_open): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-05 14:53:31 +00:00
akr
71e7935331
update async-signal-safe comments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-05 14:33:32 +00:00
akr
ad5bfed17c
* process.c (rb_exec_arg_fixup): allocate a temporary buffer for
...
run_exec_dup2 here because it should be async-signal-safe.
(run_exec_dup2): use the temporary buffer.
(run_exec_dup2_tmpbuf_size): new function.
* include/ruby/intern.h (rb_exec_arg): add dup2_tmpbuf field.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-05 12:59:40 +00:00
akr
b1ae6e473e
* process.c (strtok): declaration removed because it is not used.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-05 10:59:51 +00:00
akr
e3d685907c
* process.c (proc_spawn): don't detect simple command line here
...
because rb_exec_fillarg already did.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-05 10:35:47 +00:00
akr
e58ec33721
* process.c (rb_exec_fillarg): bail out a loop eagerly.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-05 10:21:22 +00:00
akr
5b13036fce
* process.c: add comments about async-signal-safe.
...
* io.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-05 10:16:11 +00:00
akr
993b4f3911
add comment.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-04 11:13:47 +00:00
akr
71fd73dff8
* process.c (rb_exec_fillarg): allocate one more element before
...
beginning in argv_str for try_with_sh.
* internal.h (ARGVSTR2ARGC): adjust for the above change.
(ARGVSTR2ARGV): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-04 11:01:41 +00:00
akr
41819dc447
* internal.h (ARGVSTR2ARGC): defined.
...
(ARGVSTR2ARGV): defined.
* process.c (proc_exec_v): use ARGVSTR2ARGV.
(rb_spawn_process): use ARGVSTR2ARGC and ARGVSTR2ARGV.
* io.c (pipe_open): use ARGVSTR2ARGV.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-04 10:19:32 +00:00
nobu
de8eb56e88
merge definitions
...
* process.c (proc_exec_v, rb_proc_exec_e): merge definitions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-04 05:46:24 +00:00
nobu
b89e9bf544
unused parameter
...
* process.c (proc_spawn_n): remove unused parameter.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-04 05:46:22 +00:00
nobu
a99d3a6271
unused variables
...
* io.c (pipe_open): argc and argv are not used on win32.
* process.c (rb_spawn_process): remove already useless variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-04 05:33:43 +00:00
usa
9bb642d65a
* process.c (rb_exec_err): should preserve errno.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-04 05:06:56 +00:00
usa
2493e48d40
* process.c (rb_run_exec_options_err): restore save_env() call for
...
non-fork environments.
* process.c (rb_exec_err): restore environments after the failure of
exec to fix [ruby-core:44093] [Bug #6249 ] on non-fork environments
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-04 02:36:11 +00:00
usa
859869e522
* io.c (pipe_open): follow up changes in r35889.
...
* process.c (proc_spawn_n): now uses char ** instead of VALUE *.
* process.c (rb_spawn_process): prog is now VALUE of String, not char *.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-04 01:44:27 +00:00
akr
6b348951ca
* process.c (rb_spawn_process): fix for Windows. not tested.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-03 15:45:46 +00:00
akr
93e005d177
* process.c (rb_proc_exec_e): don't use ISSPACE(). \f, \r and \v
...
are not word separator in Bourne shell.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-03 15:13:54 +00:00
akr
9ee4575ea4
* include/ruby/intern.h (rb_exec_arg): remove argc and argv fields.
...
add use_shell, argv_str and argv_buf fields.
* process.c (rb_proc_exec_e): don't split shell command line arguments
here to avoid memory allocation in a child process.
(rb_exec_fillarg): split shell command line arguments here.
(proc_exec_v): takes argv_str argument instead of argv.
(rb_proc_exec_ne): removed.
(rb_proc_exec_n): removed.
(rb_run_exec_options_err): don't initialize the removed fields.
(rb_exec_err): don't initialize the removed fields.
call proc_exec_v directly instead of rb_proc_exec_ne.
(rb_spawn_process): use use_shell field.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-03 14:53:13 +00:00
akr
cb44ffc4af
* process.c (rb_exec_getargs): remove rb_exec_arg argument.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-03 12:25:54 +00:00
akr
9977e1cbc7
* process.c (rb_check_argv): use rb_str_new_frozen instead of
...
rb_str_new4.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-03 12:18:45 +00:00
akr
033e2187c6
* process.c (rb_proc_exec_e): extended version of rb_proc_exec() to
...
call execle().
(rb_proc_exec): use rb_proc_exec_e().
(rb_exec_err): use rb_proc_exec_e().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-03 11:12:20 +00:00
akr
f4f28bf75f
* use execve() to preserve environment variables when exec method is
...
failed. [ruby-core:44093] [ruby-trunk - Bug #6249 ]
* include/ruby/intern.h (rb_exec_arg): add envp_str and envp_buf field
to store envp of execve().
* process.c (proc_exec_v): takes envp_str as an argument and use it
for execve().
(rb_proc_exec_ne): extended version of rb_proc_exec_n().
(rb_proc_exec_n): use rb_proc_exec_ne().
(rb_proc_exec): follow proc_exec_v() change.
(fill_envp_buf_i): new function.
(rb_exec_arg_fixup): set up envp_str and envp_buf.
(save_env_i): removed.
(save_env): removed.
(rb_run_exec_options_err): don't modify environment variables.
(rb_exec_err): use rb_proc_exec_ne().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-03 08:29:48 +00:00
yugui
76bc2d1ed7
Imports Ruby's port to NativeClient (a.k.a NaCl).
...
Patch by Google Inc. [ruby-core:45073].
* configure.in (RUBY_NACL): New M4 func to configure variables for
NaCl.
(RUBY_NACL_CHECK_PEPPER_TYPES): New M4 func to check the old names
of Pepper interface types.
(BTESTRUBY): New variable to specify which ruby should be run on
"make btest". NaCl can run the built binary by sel_ldr, but it need
rbconfig.rb. So this variable is distinguished from $MINIRUBY.
* thread_pthread.c: Disabled some features on NaCl.
* io.c: ditto.
* process.c: ditto.
* signal.c: ditto.
* file.c: ditto.
* missing/flock.c: ditto.
* nacl/pepper_main.c: An example implementation of Pepper application
that embeds Ruby.
* nacl/example.html: An example of web page that uses the Pepper
application.
* nacl/nacl-config.rb: Detects variants of NaCl SDK.
* nacl/GNUmakefile.in: Makefile template for NaCl specific build
process.
* nacl/package.rb: script for packaging a NaCl-Ruby embedding
application.
* nacl/reate_nmf.rb: Wrapper script of create_nmf.py
* dln.c (dln_load): Added a hack to call on NaCl.
* util.c (ruby_getcwd): Path to the current directort is not available
on NaCl.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-17 02:48:59 +00:00
drbrain
e95f7ea80d
* variable.c (trace_ev): Removed "not reached" comment as this line is
...
reached.
* variable.c (rb_obj_remove_instance_variable): Replaced "not reached"
comment with the UNREACHABLE macro.
* variable.c (rb_mod_const_missing): ditto.
* variable.c (rb_mod_remove_cvar): ditto.
* enum.c (first_i): ditto.
* string.c (rb_str_aref): ditto.
* string.c (str_byte_aref): ditto.
* string.c (rb_to_id): ditto.
* io.c (rb_io_fmode_modestr): ditto.
* io.c (rb_io_oflags_modestr): ditto.
* pack.c (num2i32): ditto.
* vm_eval.c (rb_method_missing): ditto.
* vm_eval.c (rb_f_throw): ditto.
* dir.c (dir_read): ditto.
* win32/win32.c (child_result): ditto.
* struct.c (rb_struct_getmember): ditto.
* struct.c (rb_struct_set): ditto.
* struct.c (rb_struct_aref_id): ditto.
* eval.c (rb_f_raise): ditto.
* process.c (rb_f_exit_bang): ditto.
* process.c (rb_f_exit): ditto.
* process.c (rb_f_abort): ditto.
* ext/-test-/iter/break.c (iter_break_value): ditto.
* ext/pty/pty.c (pty_check): ditto.
* ext/openssl/ossl_pkey.c (ossl_pkey_new): ditto.
* ext/readline/readline.c (rb_remove_history): ditto.
* ext/stringio/stringio.c (strio_unimpl): ditto.
* numeric.c (num_sadded): ditto.
* numeric.c (num_init_copy): ditto.
* numeric.c (rb_num2ll): ditto.
* numeric.c (rb_num2ull): ditto.
* vm_insnhelper.c (call_cfunc): ditto.
* ruby.c (opt_W_getter): ditto.
* bignum.c (rb_big_coerce): ditto.
* file.c (rb_f_test): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-14 00:36:26 +00:00
drbrain
da39d32f60
* encoding.c (rb_enc_codepoint_len): Use UNREACHABLE to avoid "control
...
reaches end of non-void function" warnings. [ruby-trunk - Bug #6066 ]
* re.c (name_to_backref_number): ditto.
* object.c (rb_Float): ditto.
* io.c (io_readpartial): ditto.
* io.c (io_read_nonblock): ditto.
* pack.c (rb_uv_to_utf8): ditto.
* proc.c (rb_method_entry_arity): ditto.
* vm_method.c (rb_f_notimplement): ditto.
* struct.c (rb_struct_aset_id): ditto.
* class.c (rb_scan_args): ditto.
* process.c (rlimit_resource_type): ditto.
* process.c (rlimit_resource_value): ditto.
* process.c (p_uid_switch): ditto.
* process.c (p_gid_switch): ditto.
* ext/digest/digest.c (rb_digest_instance_update): ditto.
* ext/digest/digest.c (rb_digest_instance_finish): ditto.
* ext/digest/digest.c (rb_digest_instance_reset): ditto.
* ext/digest/digest.c (rb_digest_instance_block_length): ditto.
* ext/bigdecimal/bigdecimal.c (BigDecimalCmp): ditto.
* ext/dl/handle.c (rb_dlhandle_close): ditto.
* ext/tk/tcltklib.c (pending_exception_check0): ditto.
* ext/tk/tcltklib.c (pending_exception_check1): ditto.
* ext/tk/tcltklib.c (ip_cancel_eval_core): ditto.
* ext/tk/tcltklib.c (lib_get_reltype_name): ditto.
* ext/tk/tcltklib.c (create_dummy_encoding_for_tk_core): ditto.
* ext/tk/tkutil/tkutil.c (tk_hash_kv): ditto.
* ext/openssl/ossl_ssl.c (ossl_ssl_session_reused): ditto.
* ext/openssl/ossl_pkey_ec.c (ossl_ec_key_dsa_verify_asn1): ditto.
* ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_at_infinit): ditto.
* ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_on_curve): ditto.
* ext/fiddle/conversions.c (generic_to_value): ditto.
* ext/socket/raddrinfo.c (rsock_io_socket_addrinfo): ditto.
* ext/socket/socket.c (sock_s_getnameinfo): ditto.
* ext/ripper/eventids2.c (ripper_token2eventid): ditto.
* cont.c (return_fiber): ditto.
* dmydln.c (dln_load): ditto.
* vm_insnhelper.c (vm_search_normal_superclass): ditto.
* bignum.c (big_fdiv): ditto.
* marshal.c (r_symlink): ditto.
* marshal.c (r_symbol): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-13 23:45:37 +00:00
shirosaki
42109a02f0
* include/ruby/win32.h (rb_w32_aspawn_flags): add the declaration of
...
new function.
* process.c (enum): add EXEC_OPTION_PGROUP and move the position
above for the usage in proc_spawn_n().
* process.c (proc_spawn_n): add an argument to pass new option
`new_pgroup`. The option specifies CREATE_NEW_PROCESS_GROUP flag to
CreateProcessW(). This flag is necessary for the usage of
Process.kill on the subprocess on Windows.
* process.c (rb_exec_arg_addopt): ditto.
* process.c (rb_spawn_process): ditto.
* process.c (documentation for rb_f_spawn): add documentation for new
option `new_pgroup` of spawn.
* test/ruby/test_process.rb (TestProcess#test_execopts_new_pgroup):
add tests for option `new_pgroup`.
* test/ruby/test_thread.rb
(TestThreadGroup#test_thread_timer_and_interrupt):
add option `new_pgroup: true` to spawn on Windows. It's needed for
Process.kill on a subprocess.
* win32/win32.c (CreateChild): add an argument to pass
dwCreationFlags of CreateProcessW().
* win32/win32.c (rb_w32_spawn): ditto.
* win32/win32.c (rb_w32_aspawn_flags): add new function to pass
dwCreationFlags.
* win32/win32.c (rb_w32_aspawn): refactor to move the content to
rb_w32_aspawn_flags().
[ruby-core:43245][Bug #6131 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-07 14:10:30 +00:00
nobu
ca512bdaa8
* process.c (setreuid, setregid): suppress warnings.
...
[ruby-core:43374][Bug #6169 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-03 09:33:40 +00:00
nobu
9bf9b3ef95
* process.c (obj2uid, obj2gid): allow strings as input user/group id.
...
[ruby-core:40923][Feature #5610 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-28 07:40:02 +00:00
nobu
b95b56cc3a
* process.c: no cuddle up else's.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-28 01:28:51 +00:00
marcandre
7316302483
* include/ruby/intern.h: Add rb_check_arity, rb_error_arity [ #6085 ]
...
* array.c: Use rb_check_arity / rb_error_arity
* class.c: ditto
* enumerator.c: ditto
* eval.c: ditto
* file.c: ditto
* hash.c: ditto
* numeric.c: ditto
* proc.c: ditto
* process.c: ditto
* random.c: ditto
* re.c: ditto
* signal.c: ditto
* string.c: ditto
* struct.c: ditto
* transcode.c: ditto
* vm_eval.c: ditto
* vm_insnhelper.c: ditto & implementation of rb_error_arity
* test/ruby/test_arity.rb: tests for above
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-14 21:10:34 +00:00
akr
61c148723d
* process.c (rb_run_exec_options_err): chdir at last to interpret
...
relative pathnames from the current directory of the parent process.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-03 13:53:53 +00:00
nobu
80429eed63
* io.c, process.c, time.c, ext: use rb_sys_fail_str instead of
...
rb_sys_fail.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-27 01:50:27 +00:00
drbrain
9d7573c41a
* process.c (proc_wait): Change typo "SystemError" to
...
"SystemCallError". [ruby-trunk - Bug #5962 ]
* process.c (proc_wait2): ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-13 21:24:01 +00:00
naruse
88b16cebc8
* gc.c (rb_objspace_free): global_List is allocated with xmalloc.
...
patched by Sokolov Yura. https://github.com/ruby/ruby/pull/78
* dln_find.c: remove useless replacement of free.
* ext/readline/readline.c (readline_attempted_completion_function):
strings for readline must allocated with malloc.
* process.c (run_exec_dup2): use free; see also r20950.
* re.c (onig_new_with_source): use malloc for oniguruma.
* vm.c (ruby_vm_destruct): use free for VMs.
* vm.c (thread_free): use free for threads.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-08 21:02:08 +00:00
ayumin
9ecd19a7f8
* process.c: Fix typo. patch from Aviv Ben-Yosef.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-03 06:53:49 +00:00
nobu
fefba781bc
* process.c (rb_exit_status_code): extract from rb_f_exit_bang and
...
rb_f_exit. assume 0 to be success in Kernel#exit! too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-11 01:34:42 +00:00
nobu
8bce84fe5d
* process.c (proc_seteuid_m): fix argument.
...
* test/ruby/test_process.rb (test_geteuid): fix typo.
* test/ruby/test_process.rb (test_getegid, test_set[eg]uid): add.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-05 10:02:02 +00:00
nobu
b526738c3b
* bignum.c (big_rshift), compile.c (validate_label,
...
iseq_build_from_ary_exception), cont.c (cont_capture), dir.c
(dir_open_dir), gc.c (objspace_each_objects), io.c (pipe_open)
(rb_io_advise), parse.y (parser_compile_string)
(rb_parser_compile_file), proc.c (binding_free), process.c
(rb_proc_exec_n, rb_seteuid_core, proc_setegid, rb_setegid_core)
(p_uid_exchange, p_gid_exchange), regparse.c (strdup_with_null),
signal.c (sig_dfl), vm.c (rb_iseq_eval, rb_iseq_eval_main),
vm_insnhelper.c (vm_expandarray): suppress
unused-but-set-variable warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-05 09:57:00 +00:00
nobu
6cedbce87d
* process.c (proc_seteuid): separate an internal wrapper function
...
from the method implementation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-11 09:42:02 +00:00
naruse
f926980902
* io.c (nogvl_io_cntl): rb_cloexec_fcntl_dupfd's 2nd argument is int.
...
* process.c (move_fds_to_avoid_crash): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-01 05:56:51 +00:00
akr
5c19f07700
* include/ruby/intern.h (rb_cloexec_fcntl_dupfd): declared.
...
* io.c (rb_cloexec_fcntl_dupfd): new function.
(nogvl_io_cntl): use rb_cloexec_fcntl_dupfd.
* process.c (move_fds_to_avoid_crash): use rb_cloexec_fcntl_dupfd.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-30 15:17:27 +00:00
akr
da74bc7552
* process.c (ruby_setsid): use rb_cloexec_open.
...
(rb_daemon): ditto.
* ruby.c (load_file_internal): ditto.
* file.c (rb_file_s_truncate): ditto.
(file_load_ok): ditto.
* random.c (fill_random_seed): ditto.
* ext/pty/pty.c (chfunc): ditto.
(get_device_once): ditto.
* ext/io/console/console.c (console_dev): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-29 04:01:54 +00:00
akr
b574a4d4a1
* include/ruby/intern.h (rb_fd_set_cloexec): declared.
...
* io.c (rb_fd_set_cloexec): new function.
(ruby_dup): call rb_fd_set_cloexec to set close-on-exec flag.
(rb_sysopen_internal): ditto.
(rb_pipe): ditto.
(io_reopen): ditto.
(io_cntl): ditto.
* process.c (rb_f_exec): change the default :close_others option to
true.
(rb_f_system): ditto.
(move_fds_to_avoid_crash): call rb_fd_set_cloexec to set
close-on-exec flag.
(ruby_setsid): ditto.
(rb_daemon): ditto.
* thread_pthread.c (rb_thread_create_timer_thread): call
rb_fd_set_cloexec to set close-on-exec flag.
* ruby.c (load_file_internal): ditto.
* file.c (rb_file_s_truncate): ditto.
(file_load_ok): ditto.
* random.c (fill_random_seed): ditto.
* ext/pty/pty.c (chfunc): ditto.
(get_device_once): ditto.
* ext/openssl/ossl_bio.c (ossl_obj2bio): ditto.
* ext/socket/init.c (rsock_socket): ditto.
(rsock_s_accept_nonblock): ditto.
(rsock_s_accept): ditto.
* ext/socket/socket.c (rsock_sock_s_socketpair): ditto.
* ext/socket/ancdata.c (discard_cmsg): ditto.
(make_io_for_unix_rights): ditto.
* ext/socket/unixsocket.c (unix_recv_io): ditto.
* ext/io/console/console.c (console_dev): ditto.
[ruby-core:38140] [Feature #5041 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-22 09:58:15 +00:00
nobu
8e6e8e6288
* use RB_TYPE_P which is optimized for constant types, instead of
...
comparison with TYPE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-29 11:07:45 +00:00
nobu
e9930a4b56
* process.c (proc_spawn_v, proc_spawn): should not wait the
...
spawned process.
* process.c (proc_spawn_v): fix missing argument, and try with
/bin/sh only if failed with ENOEXEC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-19 05:25:52 +00:00
akr
b41ccc4a9c
* include/ruby/intern.h (rb_update_max_fd): declaration moved from
...
internal.h.
* file.c: ditto.
* io.c: call rb_update_max_fd for each new fds.
* process.c: ditto.
* random.c: ditto.
* ruby.c: ditto.
* ext/io/console/console.c: ditto.
* ext/openssl/ossl_bio.c: ditto.
* ext/pty/pty.c: ditto.
* ext/socket/init.c: ditto.
* ext/socket/socket.c: ditto.
* ext/socket/ancdata.c: ditto.
* ext/socket/unixsocket.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-20 13:26:10 +00:00
kosaki
abf99e80bf
* process.c: removed signal() macro. It's no longer used.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-11 06:56:06 +00:00
kosaki
74b339e938
* thread_pthread.c (rb_thread_create_timer_thread): removed
...
rb_disable_interrupt()/rb_enable_interrupt().
* vm_core.h: ditto.
* process.c (static void before_exec): ditto.
* process.c (static void after_exec): ditto.
[Bug #4765 ] [ruby-dev:43571]
* eval_intern.h: removed rb_trap_restore_mask().
* vm_eval.c (rb_throw_obj): ditto.
* eval.c (setup_exception): ditto.
* signal.c: removed trap_last_mask.
* signal.c (trap_restore_mask): removed.
* signal.c (init_sigchld): comment clarification why signal block
is needed. and removed trap_last_mask operation.
* signal.c (trap_ensure): removed trap_last_mask operation.
* signal.c (rb_disable_interrupt, rb_enable_interrupt): made
static and removed sigdelset(SIGVTALARM) and sigdelset(SIGSEGV).
* process.c (rb_syswait): removed implicit signal handler change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10 17:04:40 +00:00
nobu
819c2418b1
* process.c (rb_exec_arg_addopt): fix preprocess condition.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10 13:59:00 +00:00