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)
Thu, Mar 28, 3:08 AM
Unknown Object (File)
Mar 16 2024, 10:08 AM
Unknown Object (File)
Feb 13 2024, 11:09 PM
Unknown Object (File)
Dec 31 2023, 6:48 PM
Unknown Object (File)
Dec 20 2023, 2:53 AM
Unknown Object (File)
Dec 19 2023, 2:09 PM
Unknown Object (File)
Nov 28 2023, 4:15 AM
Unknown Object (File)
Nov 18 2023, 3:14 AM
Subscribers

Details

Summary

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

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

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 27509
Build 25739: arc lint + arc unit

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

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

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