GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SG_INIT (3)

NAME

sg_init, sg_snapshot, sg_shutdown, sg_drop_privileges - initialise libstatgrab

CONTENTS

Synopsis
Description
Website

SYNOPSIS

#include <statgrab.h>

sg_error sg_init \kx (int ignore_init_errors);

sg_error sg_snapshot \kx (void);

sg_error sg_shutdown \kx (void);

sg_error sg_drop_privileges \kx (void);

DESCRIPTION

sg_init() either initialises the statgrab library and sets the initialisation counter to 1, if not already done, or increases the initialisation counter. If called for the first time (in fact: if called when the initialisation counter is 0), the constructor (initialisation routine) of each registered component is invoked, some global variables are initialised, requested mutual exclusion semaphores are initialised and so on. sg_init() is protected by the mutex named "statgrab".

sg_snapshot() is Win32 only and will probably disappear.

sg_shutdown() decrements the initialisation counter. If the counter reaches zero, components’ destructors are called, mutual exclusion semaphores (exept "statgrab") are destroyed etc. sg_shutdown() is protected by the mutex named "statgrab".

sg_drop_privileges() drops elevated privileges.

RETURN VALUES

All functions return a statgrab error code. Either SG_ERROR_NONE when everything was ok or the appropriate error code from an constructor/destructor.

SEE ALSO

statgrab(3)

WEBSITE

\(lahttp://www.i-scream.org/libstatgrab/\(ra
Search for    or go to Top of page |  Section 3 |  Main Index


i-scream SG_INIT (3) 2013-06-07

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.