dthelp: Change to ANSI function definitions
[oweals/cde.git] / cde / programs / dtfile / MkDir.c
index 934973e230349487c51a16df76b4f5e8be58fb98..2c9c51541c6665e9889cf91108323947a9c21ea3 100644 (file)
@@ -1,3 +1,25 @@
+/*
+ * CDE - Common Desktop Environment
+ *
+ * Copyright (c) 1993-2012, The Open Group. All rights reserved.
+ *
+ * These libraries and programs are free software; you can
+ * redistribute them and/or modify them under the terms of the GNU
+ * Lesser General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * These libraries and programs are distributed in the hope that
+ * they will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * 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
+ */
 /* $TOG: MkDir.c /main/8 1999/12/09 13:06:55 mgreess $ */
 /************************************<+>*************************************
  ****************************************************************************
@@ -25,6 +47,7 @@
 #include <sys/stat.h>
 #include <signal.h>
 #include <errno.h>
+#include <sys/wait.h>
 
 #include <unistd.h>
 #include <limits.h>
@@ -85,13 +108,13 @@ RunFileCommand(
   
    /* 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);
    }
 
@@ -104,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 */
    }