Project

General

Profile

Bug #168

svcs should function even if locale is missing

Added by Rich Lowe almost 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
High
Category:
-
Start date:
2010-09-07
Due date:
% Done:

100%

Estimated time:
Difficulty:
Tags:

Description

SMF's svcs(1M) fails if the configured locale is missing.

>  LANG=cy_CY.UTF-8 svcs -xv
svcs: svcs.c:346: Unexpected libscf error: invalid argument.  Exiting.

> LANG=C svcs -xv    
svc:/application/time-slider:default (GNOME Desktop Snapshot Management Service)
 State: maintenance since Tue Sep  7 22:44:28 2010
Reason: Start method exited with $SMF_EXIT_ERR_FATAL.
   See: http://sun.com/msg/SMF-8000-KS
   See: man -M /usr/share/man -s 1M zfs
   See: /var/svc/log/application-time-slider:default.log
Impact: This service is not running.

I was seeing this initially with en_US.UTF-8, until I installed pkg:/locale/en, the same would apply to anyone else whose locale defaulted at install time to one we know longer have.

History

#1

Updated by Vineeth Pillai almost 9 years ago

  • Assignee set to Vineeth Pillai
  • % Done changed from 0 to 60

The issue here is that variable locale is NULL and libscf expects it not to be NULL. This is due to the following code in svcs

<snip from svcs.c>
3105 locale = setlocale(LC_MESSAGES, "");
<snip>

#2

Updated by Garrett D'Amore almost 9 years ago

  • Status changed from New to Resolved
  • % Done changed from 60 to 100

Vineeth integrated this change earlier today.

Also available in: Atom PDF