From: Herbert Xu <herbert@gondor.apana.org.au>
To: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>, netdev@vger.kernel.org
Subject: Re: raw PF_PACKET protocol selection
Date: Tue, 9 Oct 2007 15:56:43 +0800 [thread overview]
Message-ID: <20071009075643.GA17588@gondor.apana.org.au> (raw)
In-Reply-To: <1191914858.6682.75.camel@gentoo-jocke.transmode.se>
On Tue, Oct 09, 2007 at 09:27:38AM +0200, Joakim Tjernlund wrote:
>
> Just fond out something:
> if I redirect my prog like so:
> ./sniff > log
> and press Ctrl-C after a packet has been sent to it,
> it does NOT work. I don't get ANY output in my "log" file, not
> even the printf("---------\n") appears.
> But if I run whithout redirect it works(at least with ETH_P_BPQ)
> Anyone else see this too?
Um, this is what we call buffering.
You either need to turn buffering off with setbuf(3) or you
should install a SIGINT handler to flush the output before
exiting.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <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:[~2007-10-09 7:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-08 18:36 raw PF_PACKET protocol selection Joakim Tjernlund
2007-10-09 3:17 ` Herbert Xu
2007-10-09 6:08 ` Joakim Tjernlund
2007-10-09 7:13 ` Evgeniy Polyakov
2007-10-09 7:27 ` Joakim Tjernlund
2007-10-09 7:34 ` Evgeniy Polyakov
2007-10-09 7:51 ` Joakim Tjernlund
2007-10-09 8:17 ` Evgeniy Polyakov
2007-10-09 9:00 ` Joakim Tjernlund
2007-10-09 7:56 ` 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=20071009075643.GA17588@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=joakim.tjernlund@transmode.se \
--cc=johnpol@2ka.mipt.ru \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).