From 90025642ce97002910ace4654c64035bb91ad4a8 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Wed, 29 Apr 2020 23:48:37 +0800
Subject: [PATCH] update prj1_tlv source code, test socket client connect ok

---
 ch1_fileIO/redirect_stdio.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/ch1_fileIO/redirect_stdio.c b/ch1_fileIO/redirect_stdio.c
index 52270f0..a73f1ea 100644
--- a/ch1_fileIO/redirect_stdio.c
+++ b/ch1_fileIO/redirect_stdio.c
@@ -14,7 +14,7 @@
     if(fd < 0)
     {
         printf("Open file failure: %s\n", strerror(errno));
-        return ;
+        return 1;
     } 
     
     dup2(fd, STDIN_FILENO);
@@ -24,5 +24,7 @@
     printf("fd=%d\n", fd); 
     
     close(fd);
+
+    return 0;
 }
 

--
Gitblit v1.9.1