From fc14013c817bee5582910d60e6f37ac97258cc95 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Fri, 30 Jul 1999 14:39:27 +0000 Subject: [PATCH] (create_process): Detect failure of `pipe'. --- src/process.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/process.c b/src/process.c index 50b8647aa38..08f3f2cb4c9 100644 --- a/src/process.c +++ b/src/process.c @@ -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]; } -- 2.39.5