From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: [musl] aio+fork bug test case
Date: Mon, 16 Nov 2020 00:04:32 -0500 [thread overview]
Message-ID: <20201116050432.GW534@brightrain.aerifal.cx> (raw)
[-- Attachment #1: Type: text/plain, Size: 315 bytes --]
I'm cleaning up my work spaces and found this draft test case for the
aio+fork bug fixed in 34904d830a9fd1f6fc47218f38c111698303d2fe. I'm
not sure how best to integrate it with libc-test, but posting it here
now so it's not lost. Probably should be edited to use pipe() rather
than relying on stdin blocking.
Rich
[-- Attachment #2: aio_fork.c --]
[-- Type: text/plain, Size: 292 bytes --]
#include <aio.h>
#include <unistd.h>
#include <sys/wait.h>
int main()
{
char buf[256];
int fd = dup(0);
struct aiocb cb = { .aio_fildes = fd, .aio_buf = buf, .aio_nbytes = sizeof buf };
aio_read(&cb);
pid_t pid = fork();
if (!pid) {
close(fd);
_exit(0);
}
waitpid(pid, 0, 0);
}
reply other threads:[~2020-11-16 5:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201116050432.GW534@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).