artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ecb11e
)
sched_yield() is not strong enough to overflow the recv buffer on some
author
claudio
<claudio@openbsd.org>
Tue, 30 Jul 2024 13:28:27 +0000
(13:28 +0000)
committer
claudio
<claudio@openbsd.org>
Tue, 30 Jul 2024 13:28:27 +0000
(13:28 +0000)
systems. Use a proper sleep using usleep(100) instead.
regress/lib/libc/sys/t_sendrecv.c
patch
|
blob
|
history
diff --git
a/regress/lib/libc/sys/t_sendrecv.c
b/regress/lib/libc/sys/t_sendrecv.c
index
ae6425f
..
178d933
100644
(file)
--- a/
regress/lib/libc/sys/t_sendrecv.c
+++ b/
regress/lib/libc/sys/t_sendrecv.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: t_sendrecv.c,v 1.
3 2021/12/13 16:56:48 deraadt
Exp $ */
+/* $OpenBSD: t_sendrecv.c,v 1.
4 2024/07/30 13:28:27 claudio
Exp $ */
/* $NetBSD: t_sendrecv.c,v 1.8 2021/03/28 17:30:01 christos Exp $ */
/*-
@@
-97,7
+97,7
@@
receiver(int sd)
if (p.seq != seq)
printf("%ju != %ju\n", p.seq, seq);
if (seq % 10 == 0)
-
sched_yield(
);
+
usleep(100
);
seq = p.seq + 1;
}
// printf("<<%zd %d %ju\n", n, errno, seq);