summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2021-09-25 19:25:42 -0400
committerAndreas Kling <kling@serenityos.org>2021-09-26 12:45:19 +0200
commit93f62384f5dcd0f6d6159ed3907a9e6961355ad1 (patch)
tree19568b43d8e16351aeef38e4d141a5f8c77bf7fa
parent1803c5966df0cbec9d33ec1d55637644e50a9636 (diff)
downloadserenity-93f62384f5dcd0f6d6159ed3907a9e6961355ad1.zip
Base: Update man2/pipe.md after 5d180d1f99
-rw-r--r--Base/usr/share/man/man2/pipe.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/Base/usr/share/man/man2/pipe.md b/Base/usr/share/man/man2/pipe.md
index fcea9a9827..c569f4e81e 100644
--- a/Base/usr/share/man/man2/pipe.md
+++ b/Base/usr/share/man/man2/pipe.md
@@ -36,10 +36,10 @@ int main()
// Create the pipe.
int pipefd[2];
int rc = pipe(pipefd);
- ASSERT(rc == 0);
+ VERIFY(rc == 0);
pid_t pid = fork();
- ASSERT(pid >= 0);
+ VERIFY(pid >= 0);
if (pid == 0) {
// Close the reading end of the pipe.
@@ -47,7 +47,7 @@ int main()
// Write a message to the writing end of the pipe.
static const char greeting[] = "Hello friends!";
int nwritten = write(pipefd[1], greeting, sizeof(greeting));
- ASSERT(nwritten == sizeof(greeting));
+ VERIFY(nwritten == sizeof(greeting));
exit(0);
} else {
// Close the writing end of the pipe.
@@ -57,10 +57,10 @@ int main()
// Read the message from the reading end of the pipe.
char buffer[100];
int nread = read(pipefd[0], buffer, sizeof(buffer));
- ASSERT(nread > 0);
+ VERIFY(nread > 0);
// Try to read again. We should get an EOF this time.
nread = read(pipefd[0], buffer + nread, sizeof(buffer) - nread);
- ASSERT(nread == 0);
+ VERIFY(nread == 0);
}
}
```