Page MenuHomeWildfire Games

Use raise() instead of kill() for debug_break()
ClosedPublic

Authored by linkmauve on Dec 18 2019, 3:19 PM.

Details

Summary

This function is thread-safe, so it should be preferred.

Test Plan

Not needed.

Event Timeline

linkmauve created this revision.Dec 18 2019, 3:19 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/784/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/lib/sysdep/os/unix/udbg.cpp
|   1| /*·Copyright·(C)·2010·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2010"
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1300/display/redirect

Stan added a subscriber: Stan.Dec 18 2019, 3:33 PM

According to http://poincare.matf.bg.ac.rs/~ivana/courses/ps/sistemi_knjige/pomocno/apue/APUE/0201433079/ch10lev1sec9.html

The call

   raise(signo);

is equivalent to the call

   kill(getpid(), signo);

That’s wrong at least on glibc, where raise() will be local to the thread.

Stan added inline comments.Dec 18 2019, 3:42 PM
source/lib/sysdep/os/unix/udbg.cpp
1

Update it to say 2019 see the bot output :)

linkmauve updated this revision to Diff 10635.Dec 18 2019, 3:44 PM

Update the copyright date.

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/786/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1302/display/redirect

vladislavbelov accepted this revision.Dec 21 2019, 1:29 AM
vladislavbelov added a subscriber: vladislavbelov.

I tested it on Ubuntu.

This revision is now accepted and ready to land.Dec 21 2019, 1:29 AM
This revision was automatically updated to reflect the committed changes.