Page MenuHomeFreeBSD

ping: Use setitimer(2) instead of obsoleted alarm(3)
ClosedPublic

Authored by jansucan on Oct 22 2019, 7:24 AM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 9 2024, 12:47 PM
Unknown Object (File)
Oct 28 2024, 3:41 PM
Unknown Object (File)
Oct 28 2024, 3:41 PM
Unknown Object (File)
Oct 28 2024, 3:40 PM
Unknown Object (File)
Oct 28 2024, 3:40 PM
Unknown Object (File)
Oct 28 2024, 3:25 PM
Unknown Object (File)
Oct 23 2024, 9:25 PM
Unknown Object (File)
Oct 5 2024, 11:27 AM
Subscribers

Details

Summary

Use setitimer(2) instead of obsoleted alarm(3)

Submitted by: Ján Sučan <sucanjan@gmail.com>

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

asomers requested changes to this revision.Nov 13 2019, 3:32 PM

What about ping6.c? It has a similar invocation of alarm.

sbin/ping/ping.c
511 ↗(On Diff #63529)

The other fields of itv are set to stack garbage. You should zero them.

This revision now requires changes to proceed.Nov 13 2019, 3:32 PM

Use setitimer(2) instead of obsoleted alarm(3)

Submitted by: Ján Sučan <sucanjan@gmail.com>

I did the same for ping6. I was not sure whether to do that in this diff or in a separate one.

sbin/ping/ping.c
511 ↗(On Diff #63529)

Thanks. Fixed.

LGTM. The extra braces you added in order to create scope for the itv variable are stylistically contentious. Some people would disagree with that, because it's not commonly done. But I happen to like that technique myself; no reason for itv to have more scope than necessary.

This revision is now accepted and ready to land.Nov 26 2019, 5:02 AM