Sun Cluster 3.0 U1 データサービス開発ガイド

xfnts_monitor_stop メソッドのコードリスト

このメソッドは、xfnts_probe メソッドを停止します。


例 C-4 xfnts_monitor_stop.c

/*
 * Copyright (c) 2001 by Sun Microsystems, Inc.
 * All rights reserved.
 *
 * xfnts_monitor_stop.c - Monitor Stop method for HA-XFS
 */
#pragma ident "@(#)xfnts_monitor_stop.c 1.9 01/01/18 SMI"

#include <rgm/libdsdev.h>
#include "xfnts.h"

/*
 * このメソッドは、HA-XFS リソース用の障害モニターを停止する。
 * この処理は PMF 経由で行われる。障害モニター用の 
 * PMF タグの形式は <RG-name_RS-name.mon> である。
 */

int
main(int argc, char *argv[])
{

	scds_handle_t   scds_handle;
	int 	rc;

	/* RGM から渡された引数を処理して、syslog を初期化する。*/
	if (scds_initialize(&scds_handle, argc, argv) != SCHA_ERR_NOERR)
{
		scds_syslog(LOG_ERR, "Failed to initialize the handle.");
		return (1);
	}
	rc = mon_stop(scds_handle);

	/* scds_initialize が割り当てたすべてのメモリーを解放する。*/
	scds_close(&scds_handle);

	/* monitor_stop メソッドの結果を戻す。*/
	return (rc);
}