summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-08 09:02:21 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-08 09:02:21 +0000
commitc0144a2fbb5f5b7b90c8ab29a79653ce0a4319af (patch)
tree96628ff46365edf03cb878f8f26d1a4c42faf00c /process.c
parent1ab8a925beec7cdce7669bcb7ee6fb16342b33fd (diff)
merge revision(s) 27983:
* io.c, eval.c, process.c: remove all condition of r26371. now, all platform use the same way. [Bug #3278][ruby-core:30167] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@28222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/process.c b/process.c
index c7be7286e1..8f6285df97 100644
--- a/process.c
+++ b/process.c
@@ -1330,13 +1330,10 @@ rb_f_fork(obj)
fflush(stderr);
#endif
-#if defined(__NetBSD__) || defined(__APPLE__) || defined(linux)
before_exec();
-#endif
pid = fork();
-#if defined(__NetBSD__) || defined(__APPLE__) || defined(linux)
after_exec();
-#endif
+
switch (pid) {
case 0:
#ifdef linux
@@ -1577,9 +1574,7 @@ rb_f_system(argc, argv)
chfunc = signal(SIGCHLD, SIG_DFL);
retry:
-#if defined(__NetBSD__) || defined(__APPLE__) || defined(linux)
before_exec();
-#endif
pid = fork();
if (pid == 0) {
/* child process */
@@ -1587,9 +1582,7 @@ rb_f_system(argc, argv)
rb_protect(proc_exec_args, (VALUE)&earg, NULL);
_exit(127);
}
-#if defined(__NetBSD__) || defined(__APPLE__) || defined(linux)
after_exec();
-#endif
if (pid < 0) {
if (errno == EAGAIN) {
rb_thread_sleep(1);