aboutsummaryrefslogtreecommitdiffstats
path: root/net/nbd-server/files/patch-nbd-server.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/nbd-server/files/patch-nbd-server.c')
-rw-r--r--net/nbd-server/files/patch-nbd-server.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/net/nbd-server/files/patch-nbd-server.c b/net/nbd-server/files/patch-nbd-server.c
index 383f8961562c..10f840e6b9fc 100644
--- a/net/nbd-server/files/patch-nbd-server.c
+++ b/net/nbd-server/files/patch-nbd-server.c
@@ -1,7 +1,7 @@
-diff -urN nbd-2.8.2.orig/nbd-server.c nbd-2.8.2/nbd-server.c
---- nbd-2.8.2.orig/nbd-server.c Wed Nov 9 22:38:44 2005
-+++ nbd-server.c Thu Dec 22 16:04:47 2005
-@@ -363,11 +363,11 @@
+diff -urN nbd-2.8.3.orig/nbd-server.c nbd-2.8.3/nbd-server.c
+--- nbd-2.8.3.orig/nbd-server.c Thu Dec 22 21:37:20 2005
++++ nbd-server.c Sun Jan 8 16:45:30 2006
+@@ -363,12 +363,12 @@
* is severely wrong)
**/
void sigchld_handler(int s) {
@@ -9,18 +9,10 @@ diff -urN nbd-2.8.2.orig/nbd-server.c nbd-2.8.2/nbd-server.c
+ int status;
int* i;
pid_t pid;
+ int done=0;
-- while((pid=wait(status)) > 0) {
-+ while ((pid = waitpid(-1, &status, WNOHANG)) > 0) {
+- while(!done && (pid=wait(status)) > 0) {
++ while(!done && (pid=wait(&status)) > 0) {
if(WIFEXITED(status)) {
msg3(LOG_INFO, "Child exited with %d", WEXITSTATUS(status));
- }
-@@ -684,7 +684,7 @@
-
- if (request.magic != htonl(NBD_REQUEST_MAGIC))
- err("Not enough magic.");
-- if (len > BUFSIZE)
-+ if (len > (BUFSIZE-sizeof(struct nbd_reply)))
- err("Request too big!");
- #ifdef DODBG
- printf("%s from %Lu (%Lu) len %d, ", request.type ? "WRITE" :
+ msg3(LOG_INFO, "pid is %d", pid);