Page MenuHomeFreeBSD

virtual_oss: Exit main loop cleanly on termination
ClosedPublic

Authored by christos on May 23 2025, 5:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 12 2025, 6:04 AM
Unknown Object (File)
Nov 12 2025, 1:44 AM
Unknown Object (File)
Nov 12 2025, 1:44 AM
Unknown Object (File)
Nov 12 2025, 1:44 AM
Unknown Object (File)
Nov 12 2025, 1:44 AM
Unknown Object (File)
Nov 11 2025, 9:19 PM
Unknown Object (File)
Nov 10 2025, 2:32 AM
Unknown Object (File)
Nov 9 2025, 12:14 AM
Subscribers
None

Details

Summary

Sponsored by: The FreeBSD Foundation

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

christos created this revision.

Rename signal handler to virtual_sig_exit().

It's quite hard to review this without context lines. Did you import virtual_oss into src, or?

virtual_main.c
1632

Better to use sig_atomic_t instead of int.

It's quite hard to review this without context lines. Did you import virtual_oss into src, or?

I didn't. I just posted the diffs here manually without choosing a repo, but I forgot you need to generate them with git diff -U999999, so I just generated them with git format-patch.

virtual_main.c
1632

I only chose int to avoid including signal.h in the header file. But I see that sig_atomic_t is defined as either int or long.

virtual_main.c
1632

What's wrong with including signal.h in an internal header file?

christos marked 2 inline comments as done.

Define voss_exit as sig_atomic_t.

This revision is now accepted and ready to land.May 27 2025, 1:01 PM
christos retitled this revision from virtual_oss: Exit main looop cleanly on termination to virtual_oss: Exit main loop cleanly on termination.May 28 2025, 3:36 PM