mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: Mockern@yandex.ru
Cc: linux-kernel@vger.kernel.org
Subject: Re: cat reading problem
Date: Fri, 23 Feb 2007 09:24:30 +0100	[thread overview]
Message-ID: <1172219070.3265.43.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <45DEA098.000003.11666@webmail12.yandex.ru>


> result of strace cat is identical, but in tty case I can't see nothing. Why does cat write nothing at my console?
> 
> Thank you, 
> 
> ------------------------------------------------------------------------------------
> 
> root@test:/home# strace cat  < hello
> │c│c│c│c│c│c│c│c│c│c│c│c..
> munmap(0x40017000, 5664)                = 0
> getuid32()                              = 0
> getgid32()                              = 0
> setgid32(0)                             = 0
> setuid32(0)                             = 0
> read(0, "Hello World!", 8192)           = 12
> write(1, "Hello World!", 12Hello World!)            = 12

you read "Hello World!" and you write "Hello World!" to the console

> read(0, "\376\377\377f\377\330\0000", 8192) = 8
> write(1, "\376\377\377f\377\330\0000", 8│║ f0) = 8

and here you read garbage from the input, so you write garbage out,
which probably confuses the heck out of your terminal for not being
correct UTF-8



      reply	other threads:[~2007-02-23  8:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-23  8:06 Mockern
2007-02-23  8:24 ` Arjan van de Ven [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=1172219070.3265.43.camel@laptopd505.fenrus.org \
    --to=arjan@infradead.org \
    --cc=Mockern@yandex.ru \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®