Sun Cluster データサービス開発ガイド (Solaris OS 版)

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

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


例 C–4 xfnts_monitor_stop.c

/*
 * Copyright (c) 1998-2006 by Sun Microsystems, Inc.
 * All rights reserved.
 *
 * xfnts_monitor_stop.c - 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);

   /* Return the result of monitor stop method */
   return (rc);
}