Logo Search packages:      
Sourcecode: condor version File versions  Download package

proc_family_interface.h

/***************************************************************
 *
 * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
 * University of Wisconsin-Madison, WI.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you
 * may not use this file except in compliance with the License.  You may
 * obtain a copy of the License at
 * 
 *    http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 ***************************************************************/


#ifndef _PROC_FAMILY_INTERFACE_H
#define _PROC_FAMILY_INTERFACE_H

#include "../condor_procapi/procapi.h"
#include "../condor_procd/proc_family_io.h"

class ProcFamilyClient;

class ProcFamilyInterface {

public:

      static ProcFamilyInterface* create(const char* subsys);

      virtual ~ProcFamilyInterface() { }

#if !defined(WIN32)
      // on UNIX, depending on the ProcFamily implementation, we
      // may need to call register_subfamily from the child or the
      // parent. this method indicates to the caller which to use
      //
      virtual bool register_from_child() = 0;
#endif
      
      virtual bool register_subfamily(pid_t,
                                      pid_t,
                                      int) = 0;

      virtual bool track_family_via_environment(pid_t, PidEnvID&) = 0;

      virtual bool track_family_via_login(pid_t, const char*) = 0;

#if defined(LINUX)
      virtual bool track_family_via_supplementary_group(pid_t, gid_t&) = 0;
#endif

      virtual bool get_usage(pid_t, ProcFamilyUsage&, bool) = 0;

      virtual bool signal_process(pid_t, int) = 0;

      virtual bool suspend_family(pid_t) = 0;

      virtual bool continue_family(pid_t) = 0;

      virtual bool kill_family(pid_t) = 0;

      virtual bool unregister_family(pid_t) = 0;

      virtual bool use_glexec_for_family(pid_t, const char* proxy) = 0;
};

#endif

Generated by  Doxygen 1.6.0   Back to index