diff options
Diffstat (limited to 'serverloop.c')
-rw-r--r-- | serverloop.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/serverloop.c b/serverloop.c index 0754fe76f..d28b8611e 100644 --- a/serverloop.c +++ b/serverloop.c | |||
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include "includes.h" | 37 | #include "includes.h" |
38 | RCSID("$OpenBSD: serverloop.c,v 1.88 2001/12/20 22:50:24 djm Exp $"); | 38 | RCSID("$OpenBSD: serverloop.c,v 1.89 2001/12/21 12:17:33 markus Exp $"); |
39 | 39 | ||
40 | #include "xmalloc.h" | 40 | #include "xmalloc.h" |
41 | #include "packet.h" | 41 | #include "packet.h" |
@@ -406,14 +406,10 @@ process_output(fd_set * writeset) | |||
406 | if (len < 0 && (errno == EINTR || errno == EAGAIN)) { | 406 | if (len < 0 && (errno == EINTR || errno == EAGAIN)) { |
407 | /* do nothing */ | 407 | /* do nothing */ |
408 | } else if (len <= 0) { | 408 | } else if (len <= 0) { |
409 | #ifdef USE_PIPES | ||
410 | close(fdin); | ||
411 | #else | ||
412 | if (fdin != fdout) | 409 | if (fdin != fdout) |
413 | close(fdin); | 410 | close(fdin); |
414 | else | 411 | else |
415 | shutdown(fdin, SHUT_WR); /* We will no longer send. */ | 412 | shutdown(fdin, SHUT_WR); /* We will no longer send. */ |
416 | #endif | ||
417 | fdin = -1; | 413 | fdin = -1; |
418 | } else { | 414 | } else { |
419 | /* Successful write. */ | 415 | /* Successful write. */ |
@@ -563,14 +559,10 @@ server_loop(pid_t pid, int fdin_arg, int fdout_arg, int fderr_arg) | |||
563 | * input data, cause a real eof by closing fdin. | 559 | * input data, cause a real eof by closing fdin. |
564 | */ | 560 | */ |
565 | if (stdin_eof && fdin != -1 && buffer_len(&stdin_buffer) == 0) { | 561 | if (stdin_eof && fdin != -1 && buffer_len(&stdin_buffer) == 0) { |
566 | #ifdef USE_PIPES | ||
567 | close(fdin); | ||
568 | #else | ||
569 | if (fdin != fdout) | 562 | if (fdin != fdout) |
570 | close(fdin); | 563 | close(fdin); |
571 | else | 564 | else |
572 | shutdown(fdin, SHUT_WR); /* We will no longer send. */ | 565 | shutdown(fdin, SHUT_WR); /* We will no longer send. */ |
573 | #endif | ||
574 | fdin = -1; | 566 | fdin = -1; |
575 | } | 567 | } |
576 | /* Make packets from buffered stderr data to send to the client. */ | 568 | /* Make packets from buffered stderr data to send to the client. */ |