PMSERVERNOTIFYSERVICEMANAGERREADY - Online Linux Manual PageSection : 3
Updated : PCP
Source : Performance Co-Pilot

NAME__pmServerNotifyServiceManagerReady, __pmServerNotifyServiceManagerStopping − notify service start and stop

C SYNOPSIS#include "pmapi.h"
#include "libpcp.h" int __pmServerNotifyServiceManagerReady(pid_t
mainpid);
int __pmServerNotifyServiceManagerStopping(pid_t
mainpid); cc ... −lpcp

CAVEATThis documentation is intended for internal Performance Co-Pilot (PCP) developer use. These interfaces are not part of the PCP APIs that are guaranteed to remain fixed across releases, and they may not work, or may provide different semantics at some point in the future.

DESCRIPTIONWithin the libraries and applications of the Performance Co-Pilot (PCP) these routines provide a convenient and portable interface to service manager APIs, such as sd_notify(3). PCP service daemons should call __pmServerNotifyServiceManagerReady immediately prior to entering their main loop, regardless of whether or not they have forked or daemonised. This will notify the service manager (if any, depending on the platform) that the daemon service has started, and that the main process to be tracked is mainpid. Similarly when shutting down, service daemons should call __pmServerNotifyServiceManagerStopping to notify the service manager (if any) that the tracked process of the service has returned from it's main loop and is about to shut down. These routines are intended to be portable and thus no conditional code should be needed for any service daemon on any platform.

DIAGNOSTICSThese functions will print diagnostics to the stderr stream if pmDebugOptions.services is set.

RETURN CODEIf successful, __pmServerNotifyServiceManagerReady returns a positive integer that depends on the platform service manager. In the case of systemd(1), the return code is from sd_notify(3). If the platform supports systemd(1) but the NOTIFY_SOCKET environment variable is not set (as may be the case if the server program is started manually rather than by systemd(1)), the return code will be PM_ERR_GENERIC which will normally be ignored but a diagnostic will be printed if pmDebugOptions.services is set. On platforms that have no service manager, the return code will be PM_ERR_NYI. For backward compatibility on these platforms, the return code should be ignored.
0
Johanes Gumabo
Data Size   :   6,275 byte
man-__pmServerNotifyServiceManagerStopping.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 164,911
Visitor ID   :     :  
Visitor IP   :   18.117.93.183   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.