Functions

gs_kill_agent.c File Reference

#include "utility.h"
#include <stdlib.h>
#include <string.h>
#include "comm_data.h"
#include "comm_basics.h"
#include "general.h"
#include "server.h"
#include "gs_tools.h"
Include dependency graph for gs_kill_agent.c:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Detailed Description

This program will ask the agent to terminate. The usage is: GS_killagent <agent name>="">

Definition in file gs_kill_agent.c.


Function Documentation

int main ( int  argc,
char **  argv 
)

Entry point for GS_killagent.

Parameters:
argc -- arg count
argv -- array of command line args
Returns:
EXIT_SUCCESS on success, EXIT_FAILURE on error.

Definition at line 32 of file gs_kill_agent.c.

{
  int agentport;

  if(argc < 2) {
    fprintf(stderr,"Usage: GS_killagent <agent name>\n");
    exit(EXIT_FAILURE);
  }

  agentport = getenv_int("GRIDSOLVE_AGENT_PORT", GRIDSOLVE_AGENT_PORT_DEFAULT);

  gs_kill_agent(argv[1], agentport);

  exit(EXIT_SUCCESS);
}

Here is the call graph for this function: