[gridftp-commit] CVS update: MODIFIED: src ...

Joe Bester commit at globus.org
Tue Aug 23 14:58:48 CDT 2011


  User: bester  
  Date: 11/08/23 14:58:48

  Modified:    server/src globus_gridftp_server.c globus_i_gfs_config.c
  Log:
  Add -pidfile option to globus-gridftp-server. Write child pid in detached mode
  to that file.
  Handle updates in RPM specfile pre/post scriptlets
  Modify init script to handle all fedora-required actions
  
  Revision  Changes    Path
  1.55      +21 -1     gridftp/server/src/globus_gridftp_server.c
  
  http://viewcvs.globus.org/viewcvs.cgi/gridftp/server/src/globus_gridftp_server.c.diff?r1=1.54&r2=1.55
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: globus_gridftp_server.c
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/gridftp/server/src/globus_gridftp_server.c,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -b -r1.54 -r1.55
  --- globus_gridftp_server.c	11 Feb 2011 20:28:05 -0000	1.54
  +++ globus_gridftp_server.c	23 Aug 2011 19:58:48 -0000	1.55
  @@ -1336,6 +1336,26 @@
       /* if parent just end */
       else if(pid != 0)
       {
  +        char * pidfile = globus_i_gfs_config_string("pidfile");
  +
  +        if (pidfile != NULL)
  +        {
  +            globus_result_t result;
  +            char * pidfile_evaled;
  +
  +            result = globus_eval_path(pidfile, &pidfile_evaled);
  +
  +            if (result == GLOBUS_SUCCESS)
  +            {
  +                FILE * fh = fopen(pidfile_evaled, "w");
  +
  +                if (fh != NULL)
  +                {
  +                    fprintf(fh, "%ld\n", (long) pid);
  +                    fclose(fh);
  +                }
  +            }
  +        }
           exit(0);
       }
       /* if child */
  @@ -1501,7 +1521,7 @@
       {
           setenv("GLOBUS_CALLBACK_POLLING_THREADS", "1", 1); 
       }
  -    /* activte globus stuff */    
  +    /* activate globus stuff */    
       if((rc = globus_module_activate(GLOBUS_COMMON_MODULE)) != GLOBUS_SUCCESS ||
           (rc = globus_module_activate(GLOBUS_XIO_MODULE)) != GLOBUS_SUCCESS ||
           (rc = globus_module_activate(
  
  
  
  1.76      +2 -0      gridftp/server/src/globus_i_gfs_config.c
  
  http://viewcvs.globus.org/viewcvs.cgi/gridftp/server/src/globus_i_gfs_config.c.diff?r1=1.75&r2=1.76
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: globus_i_gfs_config.c
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/gridftp/server/src/globus_i_gfs_config.c,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -b -r1.75 -r1.76
  --- globus_i_gfs_config.c	19 May 2011 04:03:46 -0000	1.75
  +++ globus_i_gfs_config.c	23 Aug 2011 19:58:48 -0000	1.76
  @@ -342,6 +342,8 @@
       "and allows core dumps on bad signals instead of exiting cleanly. "
       "Not recommended for production servers.  Note that non-forked servers running "
       "as 'root' will only accept a single connection, and then exit.", NULL, NULL,GLOBUS_FALSE, NULL}, 
  + {"pidfile", "pidfile", NULL, "pidfile", NULL, GLOBUS_L_GFS_CONFIG_STRING, 0, NULL,
  +    "Write PID of the GridFTP server to this path. May contain variable references to ${localstatedir}", NULL, NULL, GLOBUS_FALSE, NULL},
   
   /* internal use */
    {"globus_location", "globus_location", "GLOBUS_LOCATION", "G", NULL, GLOBUS_L_GFS_CONFIG_STRING, 0, NULL,
  
  
  



More information about the gridftp-commit mailing list