diff options
| author | Karl Heuer | 1999-07-30 14:39:27 +0000 |
|---|---|---|
| committer | Karl Heuer | 1999-07-30 14:39:27 +0000 |
| commit | fc14013c817bee5582910d60e6f37ac97258cc95 (patch) | |
| tree | 82e70d3187612a34167287c7e58758a5e5dfd0ba /src/process.c | |
| parent | b1314e15504ca365f79942dfff08591e5ef553d3 (diff) | |
| download | emacs-fc14013c817bee5582910d60e6f37ac97258cc95.tar.gz emacs-fc14013c817bee5582910d60e6f37ac97258cc95.zip | |
(create_process): Detect failure of `pipe'.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 13 |
1 files 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) | |||
| 1379 | } | 1379 | } |
| 1380 | #else /* not SKTPAIR */ | 1380 | #else /* not SKTPAIR */ |
| 1381 | { | 1381 | { |
| 1382 | pipe (sv); | 1382 | int tem; |
| 1383 | tem = pipe (sv); | ||
| 1384 | if (tem < 0) | ||
| 1385 | report_file_error ("Creating pipe", Qnil); | ||
| 1383 | inchannel = sv[0]; | 1386 | inchannel = sv[0]; |
| 1384 | forkout = sv[1]; | 1387 | forkout = sv[1]; |
| 1385 | pipe (sv); | 1388 | tem = pipe (sv); |
| 1389 | if (tem < 0) | ||
| 1390 | { | ||
| 1391 | close (inchannel); | ||
| 1392 | close (forkout); | ||
| 1393 | report_file_error ("Creating pipe", Qnil); | ||
| 1394 | } | ||
| 1386 | outchannel = sv[1]; | 1395 | outchannel = sv[1]; |
| 1387 | forkin = sv[0]; | 1396 | forkin = sv[0]; |
| 1388 | } | 1397 | } |