summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-04 13:33:22 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-04 13:33:22 +0000
commitae7ea3332b07c83ee050c88cd902070689fd582f (patch)
tree2fbb8acf1956241840fa109273e1226f4bb2ea36 /process.c
parent8dd118c0db80af4ff213265a2b2b475c73bb440a (diff)
* dln.c: Ruby no longer supports MS-DOS.
* ext/sdbm/_sdbm.c: ditto. * ext/sdbm/sdbm.h: ditto. * gc.c: ditto. * hash.c: ditto. * include/ruby/defines.h: ditto. * include/ruby/util.h: ditto. * io.c: ditto. * process.c: ditto. * ruby.c: ditto. * strftime.c: ditto. * util.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/process.c b/process.c
index c2dfb61c37..8386499d5c 100644
--- a/process.c
+++ b/process.c
@@ -1001,14 +1001,9 @@ proc_exec_v(char **argv, const char *prog)
return -1;
}
-#if defined(MSDOS) || defined(__EMX__) || defined(OS2)
+#if defined(__EMX__) || defined(OS2)
{
-#if defined(__EMX__) || defined(OS2) /* OS/2 emx */
#define COMMAND "cmd.exe"
-#endif
-#if defined(MSDOS)
-#define COMMAND "command.com"
-#endif
char *extension;
if ((extension = strrchr(prog, '.')) != NULL && STRCASECMP(extension, ".bat") == 0) {
@@ -1034,7 +1029,7 @@ proc_exec_v(char **argv, const char *prog)
}
}
}
-#endif /* MSDOS or __EMX__ */
+#endif /* __EMX__ */
before_exec();
execv(prog, argv);
preserving_errno(after_exec());
@@ -1085,14 +1080,7 @@ rb_proc_exec(const char *str)
if (nl) s = nl;
}
if (*s != ' ' && !ISALPHA(*s) && strchr("*?{}[]<>()~&|\\$;'`\"\n",*s)) {
-#if defined(MSDOS)
- int status;
- before_exec();
- status = system(str);
- after_exec();
- if (status != -1)
- exit(status);
-#elif defined(__CYGWIN32__) || defined(__EMX__)
+#if defined(__CYGWIN32__) || defined(__EMX__)
char fbuf[MAXPATHLEN];
char *shell = dln_find_exe_r("sh", 0, fbuf, sizeof(fbuf));
int status = -1;
@@ -1663,10 +1651,9 @@ rb_exec_arg_fixup(struct rb_exec_arg *e)
* expansion. If +command+ is a two-element array, the first
* element is the command to be executed, and the second argument is
* used as the <code>argv[0]</code> value, which may show up in process
- * listings. In MSDOS environments, the command is executed in a
- * subshell; otherwise, one of the <code>exec(2)</code> system calls is
- * used, so the running command may inherit some of the environment of
- * the original program (including open file descriptors).
+ * listings. In order to execute the command, one of the <code>exec(2)</code>
+ * system calls is used, so the running command may inherit some of the environment
+ * of the original program (including open file descriptors).
*
* The hash arguments, env and options, are same as
* <code>system</code> and <code>spawn</code>.