Skip to content

Commit cf7ed24

Browse files
committed
Merge remote-tracking branch 'upstream/6.14.fb' into Merge-6.14
2 parents 3d31986 + ed43161 commit cf7ed24

File tree

581 files changed

+41589
-12154
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

581 files changed

+41589
-12154
lines changed

.circleci/cat_ignore_eagain

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#! /bin/bash
2+
3+
# Work around issue with parallel make output causing random error, as in
4+
# make[1]: write error: stdout
5+
# Probably due to a kernel bug:
6+
# https://bugs.launchpad.net/ubuntu/+source/linux-signed/+bug/1814393
7+
# Seems to affect image ubuntu-1604:201903-01 and ubuntu-1604:202004-01
8+
9+
cd "$(dirname $0)"
10+
11+
if [ ! -x cat_ignore_eagain.out ]; then
12+
cc -x c -o cat_ignore_eagain.out - << EOF
13+
#include <unistd.h>
14+
#include <errno.h>
15+
#include <stdio.h>
16+
int main() {
17+
int n, m, p;
18+
char buf[1024];
19+
for (;;) {
20+
n = read(STDIN_FILENO, buf, 1024);
21+
if (n > 0 && n <= 1024) {
22+
for (m = 0; m < n;) {
23+
p = write(STDOUT_FILENO, buf + m, n - m);
24+
if (p < 0) {
25+
if (errno == EAGAIN) {
26+
// ignore but pause a bit
27+
usleep(100);
28+
} else {
29+
perror("write failed");
30+
return 42;
31+
}
32+
} else {
33+
m += p;
34+
}
35+
}
36+
} else if (n < 0) {
37+
if (errno == EAGAIN) {
38+
// ignore but pause a bit
39+
usleep(100);
40+
} else {
41+
// Some non-ignorable error
42+
perror("read failed");
43+
return 43;
44+
}
45+
} else {
46+
// EOF
47+
return 0;
48+
}
49+
}
50+
}
51+
EOF
52+
fi
53+
54+
exec ./cat_ignore_eagain.out

0 commit comments

Comments
 (0)