> Actually, plain old printf should be OK in ping.c since buffering
> is disabled for ping -f. If you want to keep dprintf(), I think
> we can lose the setbuf() call. Whatever you decide, it would
> be nice to make ping6.c match.
No, disagree strongly.
ping is doing this inside a signal
Ah, I didn't realize that pinger() was still called via a signal
handler in ping. It looks like ping6 is better in this regard.
- todd
> Ah, I didn't realize that pinger() was still called via a signal
> handler in ping. It looks like ping6 is better in this regard.
ping and ping6 need to be merged, as happened to traceroute.
First step: make all ping6's options match ping options. Rename
ping6 options with wild abandon if
Actually, plain old printf should be OK in ping.c since buffering
is disabled for ping -f. If you want to keep dprintf(), I think
we can lose the setbuf() call. Whatever you decide, it would
be nice to make ping6.c match.
- todd
Instead of formatting to a buffer and then writing the buffer to an fd,
just use dprintf to write formatted output directly to the fd.
Note that our dprintf() has the same async-signal-safety as our snprintf()
ok?
Philip Guenther
Index: newfs/mkfs.c