* 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
@ -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>
|
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
|
* 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'
|
if !CROSS_COMPILING && CONFIG['build_os'] == 'cygwin' && CONFIG['target_os'] != 'cygwin'
|
||||||
vpath.each {|p| p.sub!(/.*/, '$(shell cygpath -u \&)')}
|
vpath.each {|p| p.sub!(/.*/, '$(shell cygpath -u \&)')}
|
||||||
end
|
end
|
||||||
|
if !CROSS_COMPILING && CONFIG['build_os'] == 'msdosdjgpp'
|
||||||
|
CONFIG['PATH_SEPARATOR'] = ';'
|
||||||
|
end
|
||||||
mk << %{
|
mk << %{
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
@ -600,7 +600,7 @@ rb_waitpid(pid, st, flags)
|
|||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
#else /* NO_WAITPID */
|
#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);
|
last_status_set(*st, pid);
|
||||||
st_delete(pid_tbl, (st_data_t*)&pid, NULL);
|
st_delete(pid_tbl, (st_data_t*)&pid, NULL);
|
||||||
return pid;
|
return pid;
|
||||||
@ -626,7 +626,7 @@ rb_waitpid(pid, st, flags)
|
|||||||
}
|
}
|
||||||
if (!pid_tbl)
|
if (!pid_tbl)
|
||||||
pid_tbl = st_init_numtable();
|
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();
|
if (!rb_thread_alone()) rb_thread_schedule();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -1141,6 +1141,7 @@ proc_spawn_v(argv, prog)
|
|||||||
#endif
|
#endif
|
||||||
before_exec();
|
before_exec();
|
||||||
status = spawnv(P_WAIT, prog, argv);
|
status = spawnv(P_WAIT, prog, argv);
|
||||||
|
last_status_set(status == -1 ? 127 : status, 0);
|
||||||
after_exec();
|
after_exec();
|
||||||
return status;
|
return status;
|
||||||
#endif
|
#endif
|
||||||
@ -1181,6 +1182,7 @@ proc_spawn(str)
|
|||||||
char *shell = dln_find_exe("sh", 0);
|
char *shell = dln_find_exe("sh", 0);
|
||||||
before_exec();
|
before_exec();
|
||||||
status = shell?spawnl(P_WAIT,shell,"sh","-c",str,(char*)NULL):system(str);
|
status = shell?spawnl(P_WAIT,shell,"sh","-c",str,(char*)NULL):system(str);
|
||||||
|
last_status_set(status == -1 ? 127 : status, 0);
|
||||||
after_exec();
|
after_exec();
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@ -1597,7 +1599,7 @@ rb_spawn(argc, argv)
|
|||||||
if (prog && argc) argv[0] = prog;
|
if (prog && argc) argv[0] = prog;
|
||||||
#else
|
#else
|
||||||
if (prog && argc) argv[0] = prog;
|
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));
|
status = system(StringValuePtr(prog));
|
||||||
# if defined(__human68k__) || defined(__DJGPP__)
|
# if defined(__human68k__) || defined(__DJGPP__)
|
||||||
last_status_set(status == -1 ? 127 : status, 0);
|
last_status_set(status == -1 ? 127 : status, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user