Project

General

Profile

Actions

Bug #7698

closed

SMF's bad_error() should be implemented in terms of uu_panic()

Added by Robert Mustacchi over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
smf
Start date:
2016-12-29
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

One of the annoyances of debugging 7697 is that instead of merely calling abort(), svc.startd had done an fprintf to stderr of a message that contained the errno – and then called abort. Doing this made debugging this problem unnecessarily difficult as it clobbers the error and requires us to find the output to know the error returned (which was EACCES, for whatever it's worth). And as a final ironic twist, this is only because NDEBUG wasn't set. (That is, if NDEBUG had been defined, it would have been more debuggable!) bad_error() (a define used in several places in SMF) should be defined in terms of uu_panic() – and moreover, uu_panic() should be available as an externally callable routine.

Actions #1

Updated by Electric Monk over 5 years ago

  • Status changed from New to Closed

git commit 54d02241ceb89d90c765e528622d88f84f65dab3

commit  54d02241ceb89d90c765e528622d88f84f65dab3
Author: Bryan Cantrill <bryan@joyent.com>
Date:   2017-01-05T18:06:10.000Z

    7698 SMF's bad_error() should be implemented in terms of uu_panic()
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Reviewed by: Richard Lowe <richlowe@richlowe.net>
    Approved by: Gordon Ross <gordon.w.ross@gmail.com>

Actions

Also available in: Atom PDF