Mt Xia: Technical Consulting Group

Business Continuity / Disaster Recovery / High Availability
Data Center Automation / Audit Response / Audit Compliance

-
Current Location
-

css
  Downloads
    C-Code

-

digg Digg this page
del.icio.us Post to del.icio.us
Slashdot Slashdot it!


Business Web Site Hosting
$3.99 / month includes Tools,
Shopping Cart, Site Builder

www.siteox.com

FREE Domain Registration
included with Web Site Hosting
Tools, Social Networking, Blog

www.siteox.com

wlmsettag.c C-Language Source Code

#include 
#include 
#include 
#include 
/* ################################################################ */
/* Program for launching and tagging an application */
main (argc,argv)
  char **argv;
  int argc;
{
  int rc,flags;

  if (argc != 3) {
    usage(argv[0]);
    exit(1);
  }

  flags= WLM_VERSION|SWLMTAGINHERITFORK|SWLMTAGINHERITEXEC;

  if(wlm_initialize(WLM_VERSION)){
    perror("wlm_initialize");
    exit(1);
  }

  if(wlm_set_tag(argv[1],&flags)){
    perror("wlm_set_tag");
    exit(2);
  }

  if (execlp(argv[2],argv[2],0)){
    perror("execlp"); printf("Problem launching app...\n");
    exit(3);
  }
  exit(0);
}
/* ################################################################ */
usage(char *cp)
{
  printf("\n %s takes 2 arguments:\n",cp);
  printf("Usage: %s tag_name program_name \n",cp);
  printf("where: tag_name is the rule tag that program_name will inherit \
  \n");
}

-
wlmsettag.c
-
 


FREE Domain Registration
included with Web Site Hosting
Tools, Social Networking, Blog

www.siteox.com

Business Web Site Hosting
$3.99 / month includes Tools,
Shopping Cart, Site Builder

www.siteox.com