From: Herbert Xu <herbert@gondor.apana.org.au>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: martijn@inlv.org, dash@vger.kernel.org
Subject: Re: [BUG] reading from FIFO broken
Date: Sat, 6 Jul 2024 11:46:59 +1000 [thread overview]
Message-ID: <ZoiiE00rt95pkYYj@gondor.apana.org.au> (raw)
In-Reply-To: <Zoihoen16PgPn3tx@gondor.apana.org.au>
Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> and it still worked with your test case. This is what I see through
> strace on Linux with a stubbed out tee call:
For comparison this is with a working tee call:
395566 <... fcntl resumed>) = 10
395565 <... fcntl resumed>) = 10
395566 close(1 <unfinished ...>
395565 close(0 <unfinished ...>
395566 <... close resumed>) = 0
395565 <... close resumed>) = 0
395566 dup2(3, 1 <unfinished ...>
395565 dup2(3, 0 <unfinished ...>
395566 <... dup2 resumed>) = 1
395565 <... dup2 resumed>) = 0
395566 close(3 <unfinished ...>
395565 close(3 <unfinished ...>
395566 <... close resumed>) = 0
395565 <... close resumed>) = 0
395565 ioctl(0, TCGETS <unfinished ...>
395566 write(1, "OK\n", 3 <unfinished ...>
395565 <... ioctl resumed>, 0x7ffef74e9c00) = -1 ENOTTY (Inappropriate ioctl for device)
395565 lseek(0, 0, SEEK_CUR <unfinished ...>
395566 <... write resumed>) = 3
395565 <... lseek resumed>) = -1 ESPIPE (Illegal seek)
395566 dup2(10, 1 <unfinished ...>
395565 pipe2( <unfinished ...>
395566 <... dup2 resumed>) = 1
395565 <... pipe2 resumed>[3, 4], 0) = 0
395566 close(10 <unfinished ...>
395565 fcntl(3, F_DUPFD_CLOEXEC, 10 <unfinished ...>
395566 <... close resumed>) = 0
395565 <... fcntl resumed>) = 11
395565 close(3 <unfinished ...>
395566 exit_group(0 <unfinished ...>
395565 <... close resumed>) = 0
395566 <... exit_group resumed>) = ?
395565 fcntl(4, F_DUPFD_CLOEXEC, 10) = 12
395565 close(4) = 0
395565 tee(0, 12, 8192, 0 <unfinished ...>
395566 +++ exited with 0 +++
395565 <... tee resumed>) = 3
395565 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=395566, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
395565 rt_sigreturn({mask=[]}) = 3
395565 read(11, "OK\n", 3) = 3
395565 wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG, NULL) = 395566
395565 wait4(-1, 0x7ffef74e9cec, WNOHANG, NULL) = -1 ECHILD (No child processes)
395565 read(0, "OK\n", 3) = 3
395565 dup2(10, 0) = 0
395565 close(10) = 0
395565 write(1, "2:OK\n", 5) = 5
395565 exit_group(0) = ?
395565 +++ exited with 0 +++
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
prev parent reply other threads:[~2024-07-06 1:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-22 16:53 [BUG] reading from FIFO broken Martijn Dekker
2024-07-03 10:50 ` Herbert Xu
2024-07-06 1:45 ` Herbert Xu
2024-07-06 1:46 ` Herbert Xu [this message]
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=ZoiiE00rt95pkYYj@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=dash@vger.kernel.org \
--cc=martijn@inlv.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox