From 167553dd4af4605b228c3b061a29c7be920db683 Mon Sep 17 00:00:00 2001 From: matz Date: Sun, 12 Jun 2005 16:56:06 +0000 Subject: * signal.c (sigexit): call rb_thread_signal_exit() instead of rb_exit(). [ruby-dev:26347] * eval.c (rb_thread_signal_exit): a new function to exit on main thread. * eval.c (rb_thread_switch): exit status should be retrieved from ruby_errinfo. * eval.c (rb_f_exit): ensure exit(0) should call exit(EXIT_SUCCESS). * missing/mkdir.c: remove. [ruby-core:05177] * hash.c (env_aset): do not treat nil as key-removing value. [ruby-list:40865] * parse.y (method_call): allow aref expression ([]) to take a block. * parse.y (block_dup_check): a function to check duplication of a block argument and an actual block. * lib/delegate.rb (SimpleDelegator::__setobj__): need check for recursive delegation. [ruby-core:04940] * lib/cgi.rb: add underscore aliases CGI::escape_html, CGI::unescape_html, CGI::escape_element, CGI::unescape_element. [ruby-core:05058] * misc/ruby-mode.el (ruby-expr-beg): fix looking point drift. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- missing/mkdir.c | 104 -------------------------------------------------------- 1 file changed, 104 deletions(-) delete mode 100644 missing/mkdir.c (limited to 'missing') diff --git a/missing/mkdir.c b/missing/mkdir.c deleted file mode 100644 index ed1476db9..000000000 --- a/missing/mkdir.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Written by Robert Rother, Mariah Corporation, August 1985. - * - * If you want it, it's yours. All I ask in return is that if you - * figure out how to do this in a Bourne Shell script you send me - * a copy. - * sdcsvax!rmr or rmr@uscd - * - * Severely hacked over by John Gilmore to make a 4.2BSD compatible - * subroutine. 11Mar86; hoptoad!gnu - * - * Modified by rmtodd@uokmax 6-28-87 -- when making an already existing dir, - * subroutine didn't return EEXIST. It does now. - */ - -#include -#include -/* - * Make a directory. - */ -int -mkdir (dpath, dmode) - char *dpath; - int dmode; -{ - int cpid, status; - struct stat statbuf; - - if (stat (dpath, &statbuf) == 0) - { - errno = EEXIST; /* Stat worked, so it already exists */ - return -1; - } - - /* If stat fails for a reason other than non-existence, return error */ - if (errno != ENOENT) - return -1; - - switch (cpid = fork ()) - { - - case -1: /* Error in fork() */ - return (-1); /* Errno is set already */ - - case 0: /* Child process */ - /* - * Cheap hack to set mode of new directory. Since this - * child process is going away anyway, we zap its umask. - * FIXME, this won't suffice to set SUID, SGID, etc. on this - * directory. Does anybody care? - */ - status = umask (0); /* Get current umask */ - status = umask (status | (0777 & ~dmode)); /* Set for mkdir */ - execl ("/bin/mkdir", "mkdir", dpath, (char *) 0); - _exit (-1); /* Can't exec /bin/mkdir */ - - default: /* Parent process */ - while (cpid != wait (&status)); /* Wait for kid to finish */ - } - - if (WIFSIGNALED (status) || WEXITSTATUS (status) != 0) - { - errno = EIO; /* We don't know why, but */ - return -1; /* /bin/mkdir failed */ - } - - return 0; -} - -int -rmdir (dpath) - char *dpath; -{ - int cpid, status; - struct stat statbuf; - - if (stat (dpath, &statbuf) != 0) - { - /* Stat just set errno. We don't have to */ - return -1; - } - - switch (cpid = fork ()) - { - - case -1: /* Error in fork() */ - return (-1); /* Errno is set already */ - - case 0: /* Child process */ - execl ("/bin/rmdir", "rmdir", dpath, (char *) 0); - _exit (-1); /* Can't exec /bin/mkdir */ - - default: /* Parent process */ - while (cpid != wait (&status)); /* Wait for kid to finish */ - } - - if (WIFSIGNALED (status) || WEXITSTATUS (status) != 0) - { - errno = EIO; /* We don't know why, but */ - return -1; /* /bin/rmdir failed */ - } - - return 0; -} -- cgit