All of lore.kernel.org
 help / color / mirror / Atom feed
From: WANG Cong <xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Jens Axboe <jens.axboe-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: WANG Cong
	<xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Michael Kerrisk
	<mtk.manpages-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Man page bugs?
Date: Thu, 31 Jan 2008 23:11:46 +0800	[thread overview]
Message-ID: <20080131151146.GD2471@hacking> (raw)
In-Reply-To: <20080131150345.GC15220-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>

>> 
>> I think man page should mention about this usage.
>
>Hmm, but it does - you even quoted the EINVAL return documentation
>yourself. The description mentions that it dupes between the pipes
>referred to by fd_in and fd_out. Not sure how much else we can do there?


I meant it should explicitly describe how to use that example. ;)

>
>> >> Hi jens,
>> >> 
>> >> Yes, I guessed you probably should run it like that.  And it does produce
>> >> the expected output on stdout.  However, the command then blocks, and if
>> >> one types control-C, the output_file is empty.  How should this program be
>> >> terminated so that something does end up in the output_file?
>> >
>> >See ktee.c from the splice sample repo, it works correctly:
>> >
>> >axboe@carl:~/git/splice> echo hello | ./ktee outfile | cat
>> >hello
>> >axboe@carl:~/git/splice> cat outfile 
>> >hello
>> >
>> >I don't have the tee(2) man page here so can't verify, but try and
>> >compare them!
>> >
>> 
>> I have the same problem here with what Michael mentioned.
>> But my output file is *not* empty. Shown below:
>> 
>> $ echo hello | ./tee fooo.txt | cat
>> hello
>> 	<=== here blocked, type ctrl+c, exit
>> $ cat fooo.txt 
>> hello
>> 
>> My kernel version is 2.6.21-1.3194.fc7.
>
>I don't know what 'tee' is - is it the one from the man page, or the one
>from my splice tools?

My bad. The file "./tee" is just the output executable of the
given example in tee(2).

Thanks!

      parent reply	other threads:[~2008-01-31 15:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-19 13:00 Man page bugs? WANG Cong
2008-01-31 12:56 ` Michael Kerrisk
     [not found]   ` <47A1C58D.9060101-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-01-31 13:02     ` Jens Axboe
     [not found]       ` <20080131130202.GT15220-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>
2008-01-31 13:19         ` Michael Kerrisk
     [not found]           ` <47A1CAF1.9090802-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-01-31 13:28             ` Jens Axboe
     [not found]               ` <20080131132858.GZ15220-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>
2008-01-31 14:39                 ` WANG Cong
2008-01-31 15:03                   ` Jens Axboe
     [not found]                     ` <20080131150345.GC15220-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>
2008-01-31 15:11                       ` WANG Cong [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=20080131151146.GD2471@hacking \
    --to=xiyou.wangcong-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=jens.axboe-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.