]> git.eshelyaron.com Git - emacs.git/commitdiff
(create_process): Detect failure of `pipe'.
authorKarl Heuer <kwzh@gnu.org>
Fri, 30 Jul 1999 14:39:27 +0000 (14:39 +0000)
committerKarl Heuer <kwzh@gnu.org>
Fri, 30 Jul 1999 14:39:27 +0000 (14:39 +0000)
src/process.c

index 50b8647aa38a494d6c0d937f972c1bf23b57d186..08f3f2cb4c9b65a5c23dbbfbd4d54f37940d4f6d 100644 (file)
@@ -1379,10 +1379,19 @@ create_process (process, new_argv, current_dir)
     }
 #else /* not SKTPAIR */
     {
-      pipe (sv);
+      int tem;
+      tem = pipe (sv);
+      if (tem < 0)
+       report_file_error ("Creating pipe", Qnil);
       inchannel = sv[0];
       forkout = sv[1];
-      pipe (sv);
+      tem = pipe (sv);
+      if (tem < 0)
+       {
+         close (inchannel);
+         close (forkout);
+         report_file_error ("Creating pipe", Qnil);
+       }
       outchannel = sv[1];
       forkin = sv[0];
     }