From 42109a02f02b5e55a45df4f6bf3103c88be340cd Mon Sep 17 00:00:00 2001 From: shirosaki Date: Sat, 7 Apr 2012 14:10:30 +0000 Subject: * 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 --- include/ruby/win32.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/ruby/win32.h') diff --git a/include/ruby/win32.h b/include/ruby/win32.h index d16010ceb1..302bf5e8cf 100644 --- a/include/ruby/win32.h +++ b/include/ruby/win32.h @@ -285,6 +285,7 @@ extern int gettimeofday(struct timeval *, struct timezone *); extern rb_pid_t waitpid (rb_pid_t, int *, int); extern rb_pid_t rb_w32_spawn(int, const char *, const char*); extern rb_pid_t rb_w32_aspawn(int, const char *, char *const *); +extern rb_pid_t rb_w32_aspawn_flags(int, const char *, char *const *, DWORD); extern int kill(int, int); extern int fcntl(int, int, ...); extern rb_pid_t rb_w32_getpid(void); -- cgit v1.2.3