mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* process.c (rb_spawn): support for DJGPP.
* lib/mkmf.rb (VPATH): specify the implicit path separator for DJGPP. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3f56463129
commit
19f57ce144
3 changed files with 14 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
Wed Dec 8 20:13:06 2004 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||
|
||||
* process.c (rb_spawn): support for DJGPP.
|
||||
|
||||
* lib/mkmf.rb (VPATH): specify the implicit path separator for DJGPP.
|
||||
|
||||
Wed Dec 8 17:37:33 2004 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* win32/win32.c (rb_w32_pipe_exec): need to close original socket
|
||||
|
|
|
@ -733,6 +733,9 @@ def configuration(srcdir)
|
|||
if !CROSS_COMPILING && CONFIG['build_os'] == 'cygwin' && CONFIG['target_os'] != 'cygwin'
|
||||
vpath.each {|p| p.sub!(/.*/, '$(shell cygpath -u \&)')}
|
||||
end
|
||||
if !CROSS_COMPILING && CONFIG['build_os'] == 'msdosdjgpp'
|
||||
CONFIG['PATH_SEPARATOR'] = ';'
|
||||
end
|
||||
mk << %{
|
||||
SHELL = /bin/sh
|
||||
|
||||
|
|
|
@ -600,7 +600,7 @@ rb_waitpid(pid, st, flags)
|
|||
goto retry;
|
||||
}
|
||||
#else /* NO_WAITPID */
|
||||
if (pid_tbl && st_lookup(pid_tbl, pid, st)) {
|
||||
if (pid_tbl && st_lookup(pid_tbl, pid, (st_data_t *)st)) {
|
||||
last_status_set(*st, pid);
|
||||
st_delete(pid_tbl, (st_data_t*)&pid, NULL);
|
||||
return pid;
|
||||
|
@ -626,7 +626,7 @@ rb_waitpid(pid, st, flags)
|
|||
}
|
||||
if (!pid_tbl)
|
||||
pid_tbl = st_init_numtable();
|
||||
st_insert(pid_tbl, pid, st);
|
||||
st_insert(pid_tbl, pid, (st_data_t)st);
|
||||
if (!rb_thread_alone()) rb_thread_schedule();
|
||||
}
|
||||
#endif
|
||||
|
@ -1141,6 +1141,7 @@ proc_spawn_v(argv, prog)
|
|||
#endif
|
||||
before_exec();
|
||||
status = spawnv(P_WAIT, prog, argv);
|
||||
last_status_set(status == -1 ? 127 : status, 0);
|
||||
after_exec();
|
||||
return status;
|
||||
#endif
|
||||
|
@ -1181,6 +1182,7 @@ proc_spawn(str)
|
|||
char *shell = dln_find_exe("sh", 0);
|
||||
before_exec();
|
||||
status = shell?spawnl(P_WAIT,shell,"sh","-c",str,(char*)NULL):system(str);
|
||||
last_status_set(status == -1 ? 127 : status, 0);
|
||||
after_exec();
|
||||
return status;
|
||||
}
|
||||
|
@ -1597,7 +1599,7 @@ rb_spawn(argc, argv)
|
|||
if (prog && argc) argv[0] = prog;
|
||||
#else
|
||||
if (prog && argc) argv[0] = prog;
|
||||
prog = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));
|
||||
if (argc) prog = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));
|
||||
status = system(StringValuePtr(prog));
|
||||
# if defined(__human68k__) || defined(__DJGPP__)
|
||||
last_status_set(status == -1 ? 127 : status, 0);
|
||||
|
|
Loading…
Reference in a new issue