patch-2.3.99-pre4 linux/net/core/datagram.c

Next file: linux/net/core/dev.c
Previous file: linux/net/bridge/br_input.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre3/linux/net/core/datagram.c linux/net/core/datagram.c
@@ -87,9 +87,8 @@
 		goto out;
 
 	/* handle signals */
-	error = -ERESTARTSYS;
 	if (signal_pending(current))
-		goto out;
+		goto interrupted;
 
 	*timeo_p = schedule_timeout(*timeo_p);
 
@@ -98,6 +97,8 @@
 	remove_wait_queue(sk->sleep, &wait);
 	return 0;
 
+interrupted:
+	error = sock_intr_errno(*timeo_p);
 out:
 	current->state = TASK_RUNNING;
 	remove_wait_queue(sk->sleep, &wait);
@@ -248,7 +249,7 @@
 	if (sock_writeable(sk))
 		mask |= POLLOUT | POLLWRNORM | POLLWRBAND;
 	else
-		sk->socket->flags |= SO_NOSPACE;
+		set_bit(SOCK_ASYNC_NOSPACE, &sk->socket->flags);
 
 	return mask;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)