gs_kill_agent.c

Go to the documentation of this file.
00001 
00008 /* $Id: gs_kill_agent.c,v 1.22 2008/09/25 15:47:19 seymour Exp $ */
00009 /* $UTK_Copyright: $ */
00010 
00011 #include "utility.h"
00012 
00013 #include <stdlib.h>
00014 #include <string.h>
00015 
00016 #include "comm_data.h"
00017 #include "comm_basics.h"
00018 #include "general.h"
00019 #include "server.h"
00020 #include "gs_tools.h"
00021 
00031 int
00032 main(int argc, char **argv)
00033 {
00034   int agentport;
00035 
00036   if(argc < 2) {
00037     fprintf(stderr,"Usage: GS_killagent <agent name>\n");
00038     exit(EXIT_FAILURE);
00039   }
00040 
00041   agentport = getenv_int("GRIDSOLVE_AGENT_PORT", GRIDSOLVE_AGENT_PORT_DEFAULT);
00042 
00043   gs_kill_agent(argv[1], agentport);
00044 
00045   exit(EXIT_SUCCESS);
00046 }