Merge branch 'master' into cde-next
[oweals/cde.git] / cde / programs / dtfile / MkDir.c
index 972050e833848f72f6aaa5b8cdebec2256695183..124b20ff4e2c5e862fb0c13e3ad44c842b2d8f32 100644 (file)
@@ -16,7 +16,7 @@
  * details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with these librararies and programs; if not, write
+ * License along with these libraries and programs; if not, write
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
@@ -47,6 +47,7 @@
 #include <sys/stat.h>
 #include <signal.h>
 #include <errno.h>
+#include <sys/wait.h>
 
 #include <unistd.h>
 #include <limits.h>
 
 int
 RunFileCommand(
-        register char *command_path,
-        register char *argument1,
-        register char *argument2,
-        register char *argument3)
+        char *command_path,
+        char *argument1,
+        char *argument2,
+        char *argument3)
 {
    static char *pname = "RunFileCommand";
-   register int child;           /* process id of command process */
-   register int wait_return;     /* return value from wait */
+   int child;           /* process id of command process */
+   int wait_return;     /* return value from wait */
             int exit_value;      /* command exit value */
-   register char *command_name;  /* pointer to the command name */
-   register int i;
+   char *command_name;  /* pointer to the command name */
+   int i;
    void (*oldSig)();
   
    /* prepare to catch the command termination */
 
-   oldSig = signal (SIGCLD, SIG_DFL);
+   oldSig = signal (SIGCHLD, SIG_DFL);
 
    /* fork a process to run command */
 
    if ((child = fork ()) < 0)  /* fork failed */
    {
-      (void) signal (SIGCLD, oldSig);
+      (void) signal (SIGCHLD, oldSig);
       return (-1);
    }
 
@@ -126,7 +127,7 @@ RunFileCommand(
          wait_return = wait (&exit_value);
       } while (wait_return != child);
 
-      (void) signal (SIGCLD, oldSig); /* child stopped or terminated */
+      (void) signal (SIGCHLD, oldSig); /* child stopped or terminated */
 
       return (exit_value);      /* if exit_value == 0 then success */
    }