From f216a409197724504799ee59720f9ee19e84060c Mon Sep 17 00:00:00 2001
From: Guo Wenxue <guowenxue@gmail.com>
Date: Thu, 15 Nov 2018 13:32:48 +0800
Subject: [PATCH] Update ch3_fork a small bug, and add pthread sample code

---
 ch3_fork/socket_server.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ch3_fork/socket_server.c b/ch3_fork/socket_server.c
index 875386c..3780019 100644
--- a/ch3_fork/socket_server.c
+++ b/ch3_fork/socket_server.c
@@ -142,7 +142,7 @@
 			rv=write(clifd, MSG_STR, strlen(MSG_STR));
 		       	if(rv < 0)
 		       	{
-			       	printf("Write to client by sockfd[%d] failure: %s\n", sockfd, strerror(errno));
+			       	printf("Write to client by sockfd[%d] failure: %s\n", clifd, strerror(errno));
 			       	close(clifd);
 				exit(0);
 		       	}

--
Gitblit v1.9.1