tcpdump mailing list archives
Re: Stdout flush patch
From: Guy Harris <guy () alum mit edu>
Date: Tue, 2 Sep 2003 09:52:18 -0700
On Tue, Sep 02, 2003 at 03:48:55PM +0200, Michael Welzl wrote:
tcpdump writes its output with printf and doesn't flush the stdout buffer - which seems to make no difference in a bash shell, but led to an output buffering problem (hangs for a while, then gives you a lot of output at once, then hangs, etc. ...) as soon as I tried to pipe the output.
That's what the "-l" flag is for; from the man page -l Make stdout line buffered. Useful if you want to see the data while capturing it. E.g., ``tcpdump -l | tee dat'' or ``tcpdump -l > dat & tail -f dat''. It dates back to tcpdump 3.4, and possibly earlier. - This is the TCPDUMP workers list. It is archived at http://www.tcpdump.org/lists/workers/index.html To unsubscribe use mailto:tcpdump-workers-request () tcpdump org?body=unsubscribe
Current thread:
- Stdout flush patch Michael Welzl (Sep 02)
- Re: Stdout flush patch Guy Harris (Sep 02)
- Re: Stdout flush patch Michael Welzl (Sep 03)
- Re: Stdout flush patch Guy Harris (Sep 02)