[condor] more catchup, gets libdeltacloud 0.8 changes

matt matt at fedoraproject.org
Tue Jun 7 12:23:48 UTC 2011


commit 78efcc5882aa95af64370f0499bd62f0185c88e1
Author: Matthew Farrellee <matt at redhat.com>
Date:   Tue Jun 7 08:22:42 2011 -0400

    more catchup, gets libdeltacloud 0.8 changes

 7.7.0-catch-up.patch | 5279 +++++++++++++++++++++++++++++++++++++++++++++++---
 condor.spec          |    6 +-
 2 files changed, 5014 insertions(+), 271 deletions(-)
---
diff --git a/7.7.0-catch-up.patch b/7.7.0-catch-up.patch
index 367a460..731e3e5 100644
--- a/7.7.0-catch-up.patch
+++ b/7.7.0-catch-up.patch
@@ -1,5 +1,5 @@
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index e6435f5..0c9e69f 100644
+index e6435f5..b1d1601 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
 @@ -29,7 +29,7 @@ set(PACKAGE "condor")
@@ -11,6 +11,17 @@ index e6435f5..0c9e69f 100644
  
  # Set PRE_RELEASE to either a string (i.e. "PRE-RELEASE-UWCS") or OFF
  #   This shuld be "PRE-RELEASE-UWCS most of the time, and OFF when
+@@ -37,8 +37,8 @@ set(VERSION "7.6.0")
+ #   perhaps because you are working on a feature branch and need to
+ #   ship test binaries to a user, change this to identify your work.
+ #   Avoid whitespace.
+-#set(PRE_RELEASE "PRE-RELEASE-UWCS")
+-set(PRE_RELEASE OFF)
++set(PRE_RELEASE "PRE-RELEASE-UWCS")
++#set(PRE_RELEASE OFF)
+ 
+ # If set via the cmake command line, FORCE_PRE_RELEASE allows for
+ #   PRE_RELEASE to be forced into a build.
 @@ -90,15 +90,18 @@ include (CondorStaticLib)
  include (CondorPlugin)
  include (CheckCXXCompilerFlag)
@@ -32,7 +43,7 @@ index e6435f5..0c9e69f 100644
  	set_property(GLOBAL PROPERTY USE_FOLDERS ON)
  endif ( WINDOWS )
 diff --git a/build/cmake/CondorConfigure.cmake b/build/cmake/CondorConfigure.cmake
-index ad69e0c..2994924 100644
+index ad69e0c..6cd9feb 100644
 --- a/build/cmake/CondorConfigure.cmake
 +++ b/build/cmake/CondorConfigure.cmake
 @@ -128,7 +128,15 @@ if( NOT WINDOWS)
@@ -73,7 +84,20 @@ index ad69e0c..2994924 100644
  	endif()
  	check_struct_has_member("struct statfs" f_type "sys/statfs.h" HAVE_STRUCT_STATFS_F_TYPE)
  	check_struct_has_member("struct statvfs" f_basetype "sys/types.h;sys/statvfs.h" HAVE_STRUCT_STATVFS_F_BASETYPE)
-@@ -322,6 +333,10 @@ elseif(${OS_NAME} STREQUAL "HPUX")
+@@ -307,6 +318,12 @@ elseif(${OS_NAME} STREQUAL "LINUX")
+ 	set(HAS_PTHREADS ${CMAKE_USE_PTHREADS_INIT})
+ 	set(HAVE_PTHREADS ${CMAKE_USE_PTHREADS_INIT})
+ 
++	# Even if the flavor of linux we are compiling on doesn't
++	# have Pss in /proc/pid/smaps, the binaries we generate
++	# may run on some other version of linux that does, so
++	# be optimistic here.
++	set(HAVE_PSS ON)
++
+ 	#The following checks are for std:u only.
+ 	glibc_detect( GLIBC_VERSION )
+ 
+@@ -322,6 +339,10 @@ elseif(${OS_NAME} STREQUAL "HPUX")
  	set(HPUX ON)
  	set(DOES_SAVE_SIGSTATE ON)
  	set(NEEDS_64BIT_STRUCTS ON)
@@ -84,7 +108,7 @@ index ad69e0c..2994924 100644
  endif()
  
  ##################################################
-@@ -338,6 +353,7 @@ option(BUILD_TESTS "Will build internal test applications" ON)
+@@ -338,6 +359,7 @@ option(BUILD_TESTS "Will build internal test applications" ON)
  option(WANT_CONTRIB "Enable quill functionality" OFF)
  option(WANT_FULL_DEPLOYMENT "Install condors deployment scripts, libs, and includes" ON)
  option(WANT_GLEXEC "Build and install condor glexec functionality" ON)
@@ -92,16 +116,18 @@ index ad69e0c..2994924 100644
  
  if (UW_BUILD OR WINDOWS)
    option(PROPER "Try to build using native env" OFF)
-@@ -397,47 +413,40 @@ if (PROPER)
+@@ -397,47 +419,52 @@ if (PROPER)
  	find_path(HAVE_OPENSSL_SSL_H "openssl/ssl.h")
  	find_path(HAVE_PCRE_H "pcre.h")
  	find_path(HAVE_PCRE_PCRE_H "pcre/pcre.h" )
 -else(PROPER)
++	option(CACHED_EXTERNALS "enable/disable cached externals" OFF)
 +else()
  	message(STATUS "********* Configuring externals using [uw-externals] a.k.a NONPROPER *********")
 -	# temporarily disable cacheing externals on windows, primarily b/c of nmi.
 -	option(SCRATCH_EXTERNALS "Will put the externals into scratch location" OFF)
 -
++	option(CACHED_EXTERNALS "enable/disable cached externals" ON)
  endif(PROPER)
  
 -## this primarily exists for nmi cached building.. yuk!
@@ -121,37 +147,41 @@ index ad69e0c..2994924 100644
 -		COMMENT "changing ownership on externals cache because so on multiple user machines they can take advantage" )
 -	endif(WINDOWS)
 +if (WINDOWS)
-+	# the environment variable CONDOR_BLD_EXTERNAL_STAGE will be set to the
-+	# path for externals if the invoker wants shared externals. otherwise
-+	# just build externals in a sub-directory of the project directory
-+	#
-+	set (EXTERNAL_STAGE $ENV{CONDOR_BLD_EXTERNAL_STAGE})
-+	if (EXTERNAL_STAGE)
-+        # cmake doesn't like windows paths, so make sure that this path separators are unix style
-+	    string (REPLACE "\\" "/" EXTERNAL_STAGE "${EXTERNAL_STAGE}")
-+	else()
-+	   set (EXTERNAL_STAGE ${PROJECT_BINARY_DIR}/bld_external)
-+    endif(EXTERNAL_STAGE)
++
++	if (NOT EXTERNAL_STAGE)
++		# the environment variable CONDOR_BLD_EXTERNAL_STAGE will be set to the
++		# path for externals if the invoker wants shared externals. otherwise
++		# just build externals in a sub-directory of the project directory
++		#
++		set (EXTERNAL_STAGE $ENV{CONDOR_BLD_EXTERNAL_STAGE})
++		if (EXTERNAL_STAGE)
++			# cmake doesn't like windows paths, so make sure that this path separators are unix style
++			string (REPLACE "\\" "/" EXTERNAL_STAGE "${EXTERNAL_STAGE}")
++		else()
++			set (EXTERNAL_STAGE ${CMAKE_CURRENT_BINARY_DIR}/bld_external)
++		endif()
++
++	endif()
++
  else()
 -	set (EXTERNAL_STAGE ${CMAKE_CURRENT_BINARY_DIR}/externals/stage/root/${PACKAGE_NAME}_${PACKAGE_VERSION})
 -	set (EXTERNAL_DL ${CMAKE_CURRENT_BINARY_DIR}/externals/stage/download/${PACKAGE_NAME}_${PACKAGE_VERSION})
 -endif()
-+	if (PROPER)
-+		set (EXTERNAL_STAGE ${CMAKE_CURRENT_BINARY_DIR}/externals/stage/root/${PACKAGE_NAME}_${PACKAGE_VERSION})
-+	else()
++	
++	if (NOT EXTERNAL_STAGE)
 +		# temporarily disable AFS cache. 
 +		#if ( EXISTS /p/condor/workspaces/externals  )
 +		#	set (EXTERNAL_STAGE /p/condor/workspaces/externals/cmake/${OS_NAME}/${SYS_ARCH})
 +		#else()
 +			# in case someone tries something funky insert OS & ARCH in path
 +			set (EXTERNAL_STAGE /scratch/condor_externals) #${OS_NAME}/${SYS_ARCH})
-+		#endif()	
++		#endif()
 +	endif()
-+endif(WINDOWS)
  
- dprint("EXTERNAL_STAGE=${EXTERNAL_STAGE}")
+-dprint("EXTERNAL_STAGE=${EXTERNAL_STAGE}")
 -set (EXTERNAL_BUILD_PREFIX ${EXTERNAL_STAGE}/opt)
--
++endif(WINDOWS)
+ 
 -# let cmake carve out the paths for the externals
 -file (MAKE_DIRECTORY ${EXTERNAL_DL}
 -	${EXTERNAL_STAGE}/include
@@ -159,19 +189,32 @@ index ad69e0c..2994924 100644
 -	${EXTERNAL_STAGE}/lib64
 -	${EXTERNAL_STAGE}/opt
 -	${EXTERNAL_STAGE}/src )
--
++# instead of clausing above over-ride if not defined.
++if (NOT CACHED_EXTERNALS)
++	set (EXTERNAL_STAGE ${CMAKE_CURRENT_BINARY_DIR}/bld_external)
++endif()
+ 
 -include_directories( ${EXTERNAL_STAGE}/include )
 -link_directories( ${EXTERNAL_STAGE}/lib64 ${EXTERNAL_STAGE}/lib )
++dprint("EXTERNAL_STAGE=${EXTERNAL_STAGE}")
 +if (NOT EXISTS ${EXTERNAL_STAGE})
 +	file ( MAKE_DIRECTORY ${EXTERNAL_STAGE} )
 +endif()
  
  ###########################################
  add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/boost/1.39.0)
-@@ -460,12 +469,14 @@ if (NOT WINDOWS)
+@@ -454,18 +481,20 @@ add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/postgresql/8.2.3-p1)
+ add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/drmaa/1.6)
+ 
+ if (NOT WINDOWS)
+-	add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/coredumper/0.2)
++	add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/coredumper/2011.05.24-r31)
+ 	add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/unicoregahp/1.2.0)
+ 	add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/expat/2.0.1)
  	add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/libxml2/2.7.3)
  	add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/libvirt/0.6.2)
- 	add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/libdeltacloud/0.7)
+-	add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/libdeltacloud/0.7)
++	add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/libdeltacloud/0.8)
 +	add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/libcgroup/0.37)
  
  	# globus is an odd *beast* which requires a bit more config.
@@ -183,7 +226,7 @@ index ad69e0c..2994924 100644
  
  	# the following logic if for standard universe *only*
  	if (LINUX AND NOT CLIPPED AND GLIBC_VERSION AND NOT PROPER)
-@@ -528,8 +539,8 @@ add_definitions(-DHAVE_CONFIG_H)
+@@ -528,8 +557,8 @@ add_definitions(-DHAVE_CONFIG_H)
  
  ###########################################
  # include and link locations
@@ -194,7 +237,7 @@ index ad69e0c..2994924 100644
  
  if ( $ENV{JAVA_HOME} )
  	include_directories($ENV{JAVA_HOME}/include)
-@@ -669,7 +680,7 @@ else(MSVC)
+@@ -669,7 +698,7 @@ else(MSVC)
  		set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--warn-once -Wl,--warn-common")
  	endif(LINUX)
  
@@ -203,7 +246,7 @@ index ad69e0c..2994924 100644
  		set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ldl")
  	endif()
  
-@@ -678,7 +689,7 @@ else(MSVC)
+@@ -678,7 +707,7 @@ else(MSVC)
  		set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-berok -Wl,-bstatic -lstdc++ -Wl,-bdynamic -lcfg -lodm -static-libgcc")
  	endif(AIX)
  
@@ -212,7 +255,7 @@ index ad69e0c..2994924 100644
  		set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lresolv")
  		if (NOT DARWIN)
  			set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lcrypt")
-@@ -818,9 +829,15 @@ dprint ( "CONDOR_PACKAGE_NAME: ${CONDOR_PACKAGE_NAME}" )
+@@ -818,9 +847,15 @@ dprint ( "CONDOR_PACKAGE_NAME: ${CONDOR_PACKAGE_NAME}" )
  # is TRUE on all UNIX-like OS's, including Apple OS X and CygWin
  dprint ( "UNIX: ${UNIX}" )
  
@@ -721,11 +764,88 @@ index eb9217c..8d925ae 100644
  
  	else( NOT PROPER )
  
+diff --git a/externals/bundles/coredumper/2011.05.24-r31/CMakeLists.txt b/externals/bundles/coredumper/2011.05.24-r31/CMakeLists.txt
+new file mode 100644
+index 0000000..bf50c72
+--- /dev/null
++++ b/externals/bundles/coredumper/2011.05.24-r31/CMakeLists.txt
+@@ -0,0 +1,71 @@
++ ###############################################################
++ # 
++ # Copyright 2011 Red Hat, Inc. 
++ # 
++ # 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. 
++ # 
++ ############################################################### 
++
++# Q: Why are we using a checkout of the coredumper head from 05/24/2001 at r31?
++#
++# A: The latest release at the time of this check in, 1.2.1, doesn't have
++# support for building on RHEL 6. This version of the coredumper has the
++# fixes necessary for compilation on RHEL 6 and it exists before the next
++# official release of Coredumper.
++
++if (LINUX AND ${SYS_ARCH} MATCHES "I386|X86_64")
++  option(WITH_COREDUMPER "Compiling with support for COREDUMPER" ON)
++endif()
++
++if (WITH_COREDUMPER)
++
++	if ( NOT PROPER )
++
++		condor_pre_external( COREDUMPER coredumper-2011.05.24-r31 "lib;include" "done")
++
++		ExternalProject_Add(coredumper
++				    #-- Download Step ----------
++				    DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${COREDUMPER_VER}.tar.gz ${CMD_TERM}
++				    DOWNLOAD_DIR ${COREDUMPER_STAGE}/dl
++				    URL http://parrot.cs.wisc.edu/externals/${COREDUMPER_VER}.tar.gz
++				    #--Configure step ----------
++				    CONFIGURE_COMMAND cd ${COREDUMPER_VER} && ./configure --prefix=${COREDUMPER_INSTALL_LOC}
++				    #--Build Step ----------
++				    BUILD_COMMAND cd ${COREDUMPER_VER} && make
++				    BUILD_IN_SOURCE 1
++				    #--install Step ----------
++				    INSTALL_DIR ${COREDUMPER_INSTALL_LOC}
++				    INSTALL_COMMAND cd ${COREDUMPER_VER} && make install && touch ${COREDUMPER_INSTALL_LOC}/done)
++
++		# Set the target dependencies which the rest of condor depends on.
++		set(COREDUMPER_FOUND "${COREDUMPER_INSTALL_LOC}/lib/libcoredumper.a")
++
++		condor_post_external( coredumper include OFF )
++
++	else( NOT PROPER )
++
++		find_multiple( "coredumper" COREDUMPER_FOUND )
++
++	endif( NOT PROPER )
++
++	if (COREDUMPER_FOUND)
++		message (STATUS "external configured (COREDUMPER_FOUND=${COREDUMPER_FOUND})")
++		set( COREDUMPER_FOUND ${COREDUMPER_FOUND} PARENT_SCOPE )
++		set( HAVE_EXT_COREDUMPER ON PARENT_SCOPE )
++	endif(COREDUMPER_FOUND)
++
++else(WITH_COREDUMPER)
++
++	message (STATUS "external skipped (coredumper)")
++
++endif(WITH_COREDUMPER)
 diff --git a/externals/bundles/cream/1.12.1_14/CMakeLists.txt b/externals/bundles/cream/1.12.1_14/CMakeLists.txt
-index 9cc7224..cf99c78 100644
+index 9cc7224..d576ecf 100644
 --- a/externals/bundles/cream/1.12.1_14/CMakeLists.txt
 +++ b/externals/bundles/cream/1.12.1_14/CMakeLists.txt
-@@ -22,121 +22,132 @@ endif()
+@@ -22,121 +22,141 @@ endif()
    
  if ( WITH_CREAM )
  
@@ -755,6 +875,8 @@ index 9cc7224..cf99c78 100644
 +				    DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${CREAMSOAP_VER}.tar.gz ${CMD_TERM}
 +				    DOWNLOAD_DIR ${CREAMSOAP_STAGE}/dl
 +				    URL http://parrot.cs.wisc.edu/externals/${CREAMSOAP_VER}.tar.gz
++				    #--Patch step ----------
++				    PATCH_COMMAND patch -p0 -i ${CMAKE_CURRENT_SOURCE_DIR}/gsoap_cast.patch
  				    #--Configure step ----------
 -				    CONFIGURE_COMMAND cd gsoap-2.7 && ./configure --prefix=${CREAM_STAGE}
 +				    CONFIGURE_COMMAND cd gsoap-2.7 && ./configure --prefix=${CREAM_INSTALL_LOC}
@@ -823,18 +945,27 @@ index 9cc7224..cf99c78 100644
 -				    INSTALL_DIR ${CREAM_STAGE}
 +				    INSTALL_DIR ${LOG4CPP_INSTALL_LOC}
  				    INSTALL_COMMAND cd log4cpp-1.0 && make install )
-+		condor_post_external( log4cpp include OFF )
- 
+-
 -#################### cream/gss packages.
-+######################################### cream/gss packages.
- 
+-
 -		# build gridsite
 -		set (GRIDSITE_VER gridsite-1.6.0)
++		condor_post_external( log4cpp include OFF )
++
++######################################### cream/gss packages.
++
 +		condor_pre_external( GRIDSITE gridsite-1.6.0 "lib;include" "done")
++		if ( BUILDING_LIBXML2 )
++			set (GRIDSITE_DEPENDS ${LIBXML2_REF})
++			set (GRIDSITE_INCLUDE -I${LIBXML2_INSTALL_LOC}/include/libxml2)
++		else ()
++			set (GRIDSITE_DEPENDS "")
++			set (GRIDSITE_INCLUDE "")
++		endif ()
  		ExternalProject_Add(gridsite
 -					DEPENDS libxml2
 -				    PREFIX ${EXTERNAL_BUILD_PREFIX}/${GRIDSITE_VER}
-+				    DEPENDS ${LIBXML2_REF}
++				    DEPENDS ${GRIDSITE_DEPENDS}
  				    #-- Download Step ----------
  				    DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${GRIDSITE_VER}.src.tar.gz ${CMD_TERM}
 -				    DOWNLOAD_DIR ${EXTERNAL_DL}
@@ -844,7 +975,7 @@ index 9cc7224..cf99c78 100644
  				    CONFIGURE_COMMAND echo "no config"
  				    #--Build Step ----------
 -				    BUILD_COMMAND export MYCFLAGS='-I. -I../interface -I${EXTERNAL_STAGE}/include/libxml2' &&
-+				    BUILD_COMMAND export MYCFLAGS='-I. -I../interface -I${LIBXML2_INSTALL_LOC}/include/libxml2' &&
++				    BUILD_COMMAND export MYCFLAGS='-I. -I../interface ${GRIDSITE_INCLUDE}' &&
  					  export MYCFLAGS &&
  					  cd org.gridsite.core/src &&
  					  make libgridsite.a
@@ -914,7 +1045,7 @@ index 9cc7224..cf99c78 100644
  				    URL http://parrot.cs.wisc.edu/externals/org.glite.security.gsoap-plugin-2.0.1-3.tar.gz
  				    #--Configure step ----------
  				    CONFIGURE_COMMAND cd org.glite.security.gsoap-plugin/src &&
-@@ -149,40 +160,41 @@ if ( WITH_CREAM )
+@@ -149,40 +169,41 @@ if ( WITH_CREAM )
  						ranlib libglite_security_gsoap_plugin_${GLOBUS_FLAVOR}pthr.a
  				    BUILD_IN_SOURCE 1
  				    #--install Step ----------
@@ -970,7 +1101,7 @@ index 9cc7224..cf99c78 100644
  				    URL http://parrot.cs.wisc.edu/externals/org.glite.ce.cream-client-api-c-1.12.1-14.tar.gz
  					#--Patch step ----------
  					PATCH_COMMAND ${CREAM_PATCH}
-@@ -190,33 +202,25 @@ if ( WITH_CREAM )
+@@ -190,33 +211,25 @@ if ( WITH_CREAM )
  				    CONFIGURE_COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/*.m4 org.glite.ce.cream-client-api-c/project &&    
  						cd org.glite.ce.cream-client-api-c &&
  						./bootstrap &&
@@ -1035,6 +1166,24 @@ index 424536f..33608eb 100644
  	    CLASSAD_DL_LIBS="-L$with_classads_prefix/lib $CLASSAD_DL_LIBS"
      fi
  
+diff --git a/externals/bundles/cream/1.12.1_14/gsoap_cast.patch b/externals/bundles/cream/1.12.1_14/gsoap_cast.patch
+new file mode 100644
+index 0000000..584d8d6
+--- /dev/null
++++ b/externals/bundles/cream/1.12.1_14/gsoap_cast.patch
+@@ -0,0 +1,12 @@
++diff -u -r gsoap-2.7/soapcpp2/stdsoap2.cpp gsoap-2.7-patched/soapcpp2/stdsoap2.cpp
++--- gsoap-2.7/soapcpp2/stdsoap2.cpp	2005-09-01 20:21:51.000000000 -0500
+++++ gsoap-2.7-patched/soapcpp2/stdsoap2.cpp	2011-05-26 13:21:58.945680030 -0500
++@@ -9178,7 +9178,7 @@
++   {
++ #ifndef WITH_LEAN
++     if (s && (soap->mode & SOAP_XML_CANONICAL))
++-    { t = strchr(s, ':');
+++    { t = strchr((char*)s, ':');
++       if (t)
++         soap_utilize_ns(soap, s, t - s);
++     }
 diff --git a/externals/bundles/curl/7.19.6-p1/CMakeLists.txt b/externals/bundles/curl/7.19.6-p1/CMakeLists.txt
 index 572fe3d..36081e7 100644
 --- a/externals/bundles/curl/7.19.6-p1/CMakeLists.txt
@@ -1407,7 +1556,7 @@ index 86c6817..6a555dc 100644
  
  endif(NOT CLIPPED)
 diff --git a/externals/bundles/globus/5.0.1-p1/CMakeLists.txt b/externals/bundles/globus/5.0.1-p1/CMakeLists.txt
-index 9d7d775..831459e 100644
+index 9d7d775..7062d61 100644
 --- a/externals/bundles/globus/5.0.1-p1/CMakeLists.txt
 +++ b/externals/bundles/globus/5.0.1-p1/CMakeLists.txt
 @@ -16,20 +16,20 @@
@@ -1485,7 +1634,7 @@ index 9d7d775..831459e 100644
  
  		set (GLOBUS_PATCH patch -i ${CMAKE_CURRENT_SOURCE_DIR}/xio-plugins.patch -p0 &&
  						patch -i ${CMAKE_CURRENT_SOURCE_DIR}/rfc_proxy.patch -p0 &&
-@@ -82,73 +100,56 @@ if (WITH_GLOBUS)
+@@ -82,73 +100,58 @@ if (WITH_GLOBUS)
  						ln -f -s ../../../../../source-trees/xio/src/builtins/popen/globus_xio_popen_driver.c . &&
  						ln -f -s ../../../../../source-trees/xio/src/builtins/popen/globus_xio_popen_driver.h . )
  
@@ -1502,7 +1651,9 @@ index 9d7d775..831459e 100644
 -						OPENSSL_LDFLAGS=-L${EXTERNAL_STAGE}/lib && export OPENSSL_LDFLAGS  )
 +		#CFLAGS=-I${}/include && export CFLAGS &&
 +		#LDFLAGS=-L${GLOBUS_INSTALL_LOC}/lib && export LDFLAGS &&
-+		set (GLOBUS_FLAGS OPENSSL_CFLAGS=-I${OPENSSL_INSTALL_LOC}/include && export OPENSSL_CFLAGS &&
++		set (GLOBUS_FLAGS CFLAGS=-I${OPENSSL_INSTALL_LOC}/include && export CFLAGS &&
++						LDFLAGS=-L${OPENSSL_INSTALL_LOC}/lib && export LDFLAGS &&
++						OPENSSL_CFLAGS=-I${OPENSSL_INSTALL_LOC}/include && export OPENSSL_CFLAGS &&
 +						OPENSSL_LDFLAGS=-L${OPENSSL_INSTALL_LOC}/lib && export OPENSSL_LDFLAGS  )
  
 -		if( SOLARIS OR LINUX)
@@ -1528,7 +1679,7 @@ index 9d7d775..831459e 100644
 -		else ()
 -			set( GLOBUS_FLAVOR gcc32dbg )
 -		endif()
-+		set (GLOBUS_DEPENDS ${OPENSSL_REF} ${GT4_REF} ${GT42_REF} ${KRB5_REF})
++		set (GLOBUS_DEPENDS ${OPENSSL_REF} ${GT4_REF} ${GT42_REF})
  
  		# honestly the build of globus is one of the strangest things I have ever seen and it makes no sense to me.
  		ExternalProject_Add(globus
@@ -1576,7 +1727,7 @@ index 9d7d775..831459e 100644
  			
  			# primarily used by cream 
  			foreach (_glob_lib ${GLOBUS_FOUND})
-@@ -157,27 +158,20 @@ if (WITH_GLOBUS)
+@@ -157,27 +160,20 @@ if (WITH_GLOBUS)
  			endforeach(_glob_lib)
  
  			set (GLOBUS_GRID_UNIVERSE_COMMON
@@ -1611,7 +1762,7 @@ index 9d7d775..831459e 100644
  
  	else( NOT PROPER )
  
-@@ -186,7 +180,7 @@ if (WITH_GLOBUS)
+@@ -186,7 +182,7 @@ if (WITH_GLOBUS)
  		find_multiple( "globus_gass_transfer;globus_gram_client;globus_gram_protocol" GLOBUS_GRID_UNIVERSE_GT2 )
  		find_multiple( "globus_ftp_client;globus_ftp_control" GLOBUS_GRID_UNIVERSE_NORDUGRID)
  		if (GLOBUS_FOUND)
@@ -1836,7 +1987,7 @@ index 8dc10b1..40222b3 100644
  	else()
  		message (STATUS "external skipped (hadoop)")
 diff --git a/externals/bundles/krb5/1.4.3-p0/CMakeLists.txt b/externals/bundles/krb5/1.4.3-p0/CMakeLists.txt
-index 97e6d6e..517ad6b 100644
+index 97e6d6e..10a38f4 100644
 --- a/externals/bundles/krb5/1.4.3-p0/CMakeLists.txt
 +++ b/externals/bundles/krb5/1.4.3-p0/CMakeLists.txt
 @@ -25,7 +25,7 @@ if (WITH_KRB5)
@@ -1848,7 +1999,7 @@ index 97e6d6e..517ad6b 100644
  
  		if (WINDOWS)
  			# Just so it is noted this is a complete and total hack build of an arcane 
-@@ -57,25 +57,24 @@ if (WITH_KRB5)
+@@ -57,25 +57,28 @@ if (WITH_KRB5)
  			               nmake NODEBUG=1 "DEFS=-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_NON_CONFORMING_SWPRINTFS -wd4002 -wd4005 -wd4013 -wd4018 -wd4028 -wd4047 -wd4090 -wd4091 -wd4101 -wd4102 -wd4133 -wd4146 -wd4244 -wd4700 -wd4996")
  
  			# Something is wrong with the default install (make install suck-o)
@@ -1864,8 +2015,13 @@ index 97e6d6e..517ad6b 100644
  							  ${CMAKE_CURRENT_SOURCE_DIR}/manifest.bat )
  
  		else()
- 			set (KRB5_PATCH  cp ${CMAKE_CURRENT_SOURCE_DIR}/src.appl.telnet.configure src/appl/telnet/configure )
+-			set (KRB5_PATCH  cp ${CMAKE_CURRENT_SOURCE_DIR}/src.appl.telnet.configure src/appl/telnet/configure )
 -			set (KRB5_CONFIGURE src/configure --prefix=${EXTERNAL_STAGE} --without-tcl --enable-static --sysconfdir=/etc --disable-thread-support )
++			set (KRB5_PATCH  
++				cp ${CMAKE_CURRENT_SOURCE_DIR}/src.appl.telnet.configure src/appl/telnet/configure ${CMD_TERM} 
++				patch -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/eai_nodata.patch ${CMD_TERM}
++				patch -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/getline.patch )
++
 +			set (KRB5_CONFIGURE src/configure --prefix=${KRB5_INSTALL_LOC} --without-tcl --enable-static --sysconfdir=/etc --disable-thread-support )
  			set (KRB5_MAKE make )
  			set (KRB5_INSTALL make install )
@@ -1880,7 +2036,7 @@ index 97e6d6e..517ad6b 100644
  				    URL http://parrot.cs.wisc.edu/externals/${KRB5_VER}.tar.gz
  					#--Patch step ----------
  					PATCH_COMMAND cd ${KRB5_VER} ${CMD_TERM} ${KRB5_PATCH}
-@@ -85,31 +84,28 @@ if (WITH_KRB5)
+@@ -85,31 +88,28 @@ if (WITH_KRB5)
  				    BUILD_COMMAND cd ${KRB5_VER} ${CMD_TERM} ${KRB5_MAKE}
  				    BUILD_IN_SOURCE 1
  				    #--install Step ----------
@@ -1921,6 +2077,104 @@ index 97e6d6e..517ad6b 100644
  
  	else( NOT PROPER )
  
+diff --git a/externals/bundles/krb5/1.4.3-p0/eai_nodata.patch b/externals/bundles/krb5/1.4.3-p0/eai_nodata.patch
+new file mode 100644
+index 0000000..9e3a21f
+--- /dev/null
++++ b/externals/bundles/krb5/1.4.3-p0/eai_nodata.patch
+@@ -0,0 +1,21 @@
++diff -r -u krb5-1.4.3-p0.orig/src/include/fake-addrinfo.h krb5-1.4.3-p0.patched/src/include/fake-addrinfo.h
++--- krb5-1.4.3-p0.orig/src/include/fake-addrinfo.h	2005-06-01 14:24:32.000000000 -0500
+++++ krb5-1.4.3-p0.patched/src/include/fake-addrinfo.h	2011-05-26 14:34:27.635844891 -0500
++@@ -164,6 +164,17 @@
++ #define HAVE_GETNAMEINFO 1
++ #endif
++ 
+++/* Modern machines have changed how getaddrinfo is defined from RFC2553 to
+++ * RFC 3943, but often didn't provide any backwards compatibility.
+++ * So, given the knowledge from this post:
+++ * http://osdir.com/ml/encryption.kerberos.devel/2005-02/msg00025.html
+++ * I'm going to use that code. -psilord 05/26/2011
+++ *
+++ * See git track #1998 for the ticket which generated this patch.
+++*/
+++#if defined(EAI_NONAME) && !defined(EAI_NODATA)
+++#define EAI_NODATA EAI_NONAME
+++#endif
++ 
++ /* Do we actually have *any* systems we care about that don't provide
++    either getaddrinfo or one of these two flavors of
+diff --git a/externals/bundles/krb5/1.4.3-p0/getline.patch b/externals/bundles/krb5/1.4.3-p0/getline.patch
+new file mode 100644
+index 0000000..160aa51
+--- /dev/null
++++ b/externals/bundles/krb5/1.4.3-p0/getline.patch
+@@ -0,0 +1,65 @@
++diff -r -u krb5-1.4.3-p0.orig/src/appl/gssftp/ftpd/ftpcmd.y krb5-1.4.3-p0.patched/src/appl/gssftp/ftpd/ftpcmd.y
++--- krb5-1.4.3-p0.orig/src/appl/gssftp/ftpd/ftpcmd.y	2004-12-03 19:39:07.000000000 -0600
+++++ krb5-1.4.3-p0.patched/src/appl/gssftp/ftpd/ftpcmd.y	2011-05-26 16:01:01.536685466 -0500
++@@ -968,10 +968,10 @@
++ #include <arpa/telnet.h>
++ 
++ /*
++- * getline - a hacked up version of fgets to ignore TELNET escape codes.
+++ * xgetline - a hacked up version of fgets to ignore TELNET escape codes.
++  */
++ char *
++-getline(s, n, iop)
+++xgetline(s, n, iop)
++ 	char *s;
++ 	int n;
++ 	register FILE *iop;
++@@ -1213,13 +1213,13 @@
++ 		case CMD:
++ 			(void) signal(SIGALRM, toolong);
++ 			(void) alarm((unsigned) timeout);
++-			if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) {
+++			if (xgetline(cbuf, sizeof(cbuf)-1, stdin) == NULL) {
++ 				reply(221, "You could at least say goodbye.");
++ 				dologout(0);
++ 			}
++ 			(void) alarm(0);
++ 
++-			/* If getline() finds an error, the string is null */
+++			/* If xgetline() finds an error, the string is null */
++ 			if (*cbuf == '\0')
++ 				continue;
++ 
++diff -r -u krb5-1.4.3-p0.orig/src/appl/gssftp/ftpd/ftpd.c krb5-1.4.3-p0.patched/src/appl/gssftp/ftpd/ftpd.c
++--- krb5-1.4.3-p0.orig/src/appl/gssftp/ftpd/ftpd.c	2005-01-21 16:46:47.000000000 -0600
+++++ krb5-1.4.3-p0.patched/src/appl/gssftp/ftpd/ftpd.c	2011-05-26 16:00:28.959690454 -0500
++@@ -176,7 +176,7 @@
++ extern	char *home;		/* pointer to home directory for glob */
++ extern	FILE *ftpd_popen(), *fopen(), *freopen();
++ extern	int  ftpd_pclose(), fclose();
++-extern	char *getline();
+++extern	char *xgetline();
++ extern	char cbuf[];
++ extern	off_t restart_point;
++ 
++@@ -2139,7 +2139,7 @@
++ 	if (!transflag)
++ 		return;
++ 	cp = tmpline;
++-	if (getline(cp, sizeof(tmpline), stdin) == NULL) {
+++	if (xgetline(cp, sizeof(tmpline), stdin) == NULL) {
++ 		reply(221, "You could at least say goodbye.");
++ 		dologout(0);
++ 	}
++diff -r -u krb5-1.4.3-p0.orig/src/appl/gssftp/ftpd/ftpd_var.h krb5-1.4.3-p0.patched/src/appl/gssftp/ftpd/ftpd_var.h
++--- krb5-1.4.3-p0.orig/src/appl/gssftp/ftpd/ftpd_var.h	2001-10-09 22:18:22.000000000 -0500
+++++ krb5-1.4.3-p0.patched/src/appl/gssftp/ftpd/ftpd_var.h	2011-05-26 16:00:15.344695477 -0500
++@@ -89,7 +89,7 @@
++ 
++ /* ftpcmd.y */
++ void upper(char *);
++-char *getline(char *, int, FILE *);
+++char *xgetline(char *, int, FILE *);
++ #endif /* FTPD_VAR_H__ */
++ 
++ /* popen.c */
 diff --git a/externals/bundles/libcgroup/0.37/CMakeLists.txt b/externals/bundles/libcgroup/0.37/CMakeLists.txt
 new file mode 100644
 index 0000000..0b3a072
@@ -1992,103 +2246,224 @@ index 0000000..0b3a072
 +	message (STATUS "external skipped (libcgroup)")
 +endif()
 diff --git a/externals/bundles/libdeltacloud/0.7/CMakeLists.txt b/externals/bundles/libdeltacloud/0.7/CMakeLists.txt
-index 08113bb..e73c1fc 100644
+deleted file mode 100644
+index 08113bb..0000000
 --- a/externals/bundles/libdeltacloud/0.7/CMakeLists.txt
-+++ b/externals/bundles/libdeltacloud/0.7/CMakeLists.txt
-@@ -24,27 +24,27 @@ if (WITH_LIBDELTACLOUD)
- 
- 	if ( NOT PROPER )
- 
++++ /dev/null
+@@ -1,65 +0,0 @@
+- ###############################################################
+- # 
+- # Copyright 2011 Red Hat, Inc. 
+- # 
+- # 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. 
+- # 
+- ############################################################### 
+-
+-if ( LINUX )
+-	option(WITH_LIBDELTACLOUD "Compiling with support for Deltacloud" ON)
+-endif( LINUX )
+-
+-if (WITH_LIBDELTACLOUD)
+-
+-	if ( NOT PROPER )
+-
 -		set(LIBDELTACLOUD_VER libdeltacloud-0.7)
-+		condor_pre_external( LIBDELTACLOUD libdeltacloud-0.7 "lib;include" "lib/libdeltacloud.a")
- 
- 		ExternalProject_Add(libdeltacloud
+-
+-		ExternalProject_Add(libdeltacloud
 -				DEPENDS curl libxml2
 -				PREFIX ${EXTERNAL_BUILD_PREFIX}/${LIBDELTACLOUD_VER}
-+				DEPENDS ${CURL_REF} ${LIBXML2_REF}
- 				#-- Download Step ----------
- 				DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${LIBDELTACLOUD_VER}.tar.gz ${CMD_TERM}
+-				#-- Download Step ----------
+-				DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${LIBDELTACLOUD_VER}.tar.gz ${CMD_TERM}
 -				DOWNLOAD_DIR ${EXTERNAL_DL}
-+				DOWNLOAD_DIR ${LIBDELTACLOUD_STAGE}/dl
- 				URL http://parrot.cs.wisc.edu/externals/${LIBDELTACLOUD_VER}.tar.gz
- 				#--Configure step ----------
+-				URL http://parrot.cs.wisc.edu/externals/${LIBDELTACLOUD_VER}.tar.gz
+-				#--Configure step ----------
 -			    	CONFIGURE_COMMAND cd ${LIBDELTACLOUD_VER} && ./configure --prefix=${EXTERNAL_STAGE} --with-libxml=${EXTERNAL_STAGE} --with-libcurl=${EXTERNAL_STAGE} --disable-shared
-+				CONFIGURE_COMMAND cd ${LIBDELTACLOUD_VER} && ./configure --prefix=${LIBDELTACLOUD_INSTALL_LOC} --with-libxml=${LIBXML2_INSTALL_LOC} --with-libcurl=${CURL_INSTALL_LOC} --disable-shared
- 				#--Build Step ----------
- 				BUILD_COMMAND cd ${LIBDELTACLOUD_VER} && make
- 				BUILD_IN_SOURCE 1
- 				#--install Step ----------
+-				#--Build Step ----------
+-				BUILD_COMMAND cd ${LIBDELTACLOUD_VER} && make
+-				BUILD_IN_SOURCE 1
+-				#--install Step ----------
 -				INSTALL_DIR ${EXTERNAL_STAGE}
-+				INSTALL_DIR ${LIBDELTACLOUD_INSTALL_LOC}
- 				INSTALL_COMMAND cd ${LIBDELTACLOUD_VER} && make install )
- 
- 		# Set the target dependencies which the rest of condor depends on.
+-				INSTALL_COMMAND cd ${LIBDELTACLOUD_VER} && make install )
+-
+-		# Set the target dependencies which the rest of condor depends on.
 -		set(LIBDELTACLOUD_FOUND "${EXTERNAL_STAGE}/lib/libdeltacloud.a")
 -		append_var( CONDOR_EXTERNALS libdeltacloud )
+-
+-	else( NOT PROPER )
+-
+-		find_multiple( "deltacloud" LIBDELTACLOUD_FOUND )
+-
+-	endif( NOT PROPER )
+-
+-	if (LIBDELTACLOUD_FOUND)
+-		message (STATUS "external configured (LIBDELTACLOUD_FOUND=${LIBDELTACLOUD_FOUND})")
+-		set( LIBDELTACLOUD_FOUND ${LIBDELTACLOUD_FOUND} PARENT_SCOPE )
+-		set( HAVE_EXT_LIBDELTACLOUD ON PARENT_SCOPE )
+-	endif(LIBDELTACLOUD_FOUND)
+-
+-else(WITH_LIBDELTACLOUD)
+-
+-	message (STATUS "external skipped (libdeltacloud)")
+-
+-endif(WITH_LIBDELTACLOUD)
+diff --git a/externals/bundles/libdeltacloud/0.8/CMakeLists.txt b/externals/bundles/libdeltacloud/0.8/CMakeLists.txt
+new file mode 100644
+index 0000000..152b9e0
+--- /dev/null
++++ b/externals/bundles/libdeltacloud/0.8/CMakeLists.txt
+@@ -0,0 +1,72 @@
++ ###############################################################
++ # 
++ # Copyright 2011 Red Hat, Inc. 
++ # 
++ # 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. 
++ # 
++ ############################################################### 
++
++if ( LINUX )
++	option(WITH_LIBDELTACLOUD "Compiling with support for Deltacloud" ON)
++endif( LINUX )
++
++if (WITH_LIBDELTACLOUD)
++
++	if ( NOT PROPER )
++
++		condor_pre_external( LIBDELTACLOUD libdeltacloud-0.8 "lib;include" "lib/libdeltacloud.a")
++
++		if ( BUILDING_LIBXML2 )
++			set (LIBDELTACLOUD_DEPENDS ${CURL_REF} ${LIBXML2_REF})
++			set (LIBDELTACLOUD_CONFIGURE --with-libxml=${LIBXML2_INSTALL_LOC})
++		else ()
++			set (LIBDELTACLOUD_DEPENDS ${CURL_REF})
++			set (LIBDELTACLOUD_CONFIGURE "")
++		endif ()
++		ExternalProject_Add(libdeltacloud
++				DEPENDS ${LIBDELTACLOUD_DEPENDS}
++				#-- Download Step ----------
++				DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${LIBDELTACLOUD_VER}.tar.gz ${CMD_TERM}
++				DOWNLOAD_DIR ${LIBDELTACLOUD_STAGE}/dl
++				URL http://parrot.cs.wisc.edu/externals/${LIBDELTACLOUD_VER}.tar.gz
++				#--Configure step ----------
++				CONFIGURE_COMMAND cd ${LIBDELTACLOUD_VER} && ./configure --prefix=${LIBDELTACLOUD_INSTALL_LOC} --with-libcurl=${CURL_INSTALL_LOC} --disable-shared ${LIBDELTACLOUD_CONFIGURE}
++				#--Build Step ----------
++				BUILD_COMMAND cd ${LIBDELTACLOUD_VER} && make
++				BUILD_IN_SOURCE 1
++				#--install Step ----------
++				INSTALL_DIR ${LIBDELTACLOUD_INSTALL_LOC}
++				INSTALL_COMMAND cd ${LIBDELTACLOUD_VER} && make install )
++
++		# Set the target dependencies which the rest of condor depends on.
 +		set(LIBDELTACLOUD_FOUND "${LIBDELTACLOUD_INSTALL_LOC}/lib/libdeltacloud.a")
 +
 +		condor_post_external( libdeltacloud include OFF )
- 
- 	else( NOT PROPER )
- 
++
++	else( NOT PROPER )
++
++		find_multiple( "deltacloud" LIBDELTACLOUD_FOUND )
++
++	endif( NOT PROPER )
++
++	if (LIBDELTACLOUD_FOUND)
++		message (STATUS "external configured (LIBDELTACLOUD_FOUND=${LIBDELTACLOUD_FOUND})")
++		set( LIBDELTACLOUD_FOUND ${LIBDELTACLOUD_FOUND} PARENT_SCOPE )
++		set( HAVE_EXT_LIBDELTACLOUD ON PARENT_SCOPE )
++	endif(LIBDELTACLOUD_FOUND)
++
++else(WITH_LIBDELTACLOUD)
++
++	message (STATUS "external skipped (libdeltacloud)")
++
++endif(WITH_LIBDELTACLOUD)
 diff --git a/externals/bundles/libvirt/0.6.2/CMakeLists.txt b/externals/bundles/libvirt/0.6.2/CMakeLists.txt
-index ef0f877..0e8fbfb 100644
+index ef0f877..1e94237 100644
 --- a/externals/bundles/libvirt/0.6.2/CMakeLists.txt
 +++ b/externals/bundles/libvirt/0.6.2/CMakeLists.txt
-@@ -26,28 +26,29 @@ if (WITH_LIBVIRT)
+@@ -26,28 +26,38 @@ if (WITH_LIBVIRT)
  
  	if ( NOT PROPER AND NOT LIBVIRT_FOUND )
  
 -		set (LIBVERT_VER libvirt-0.6.2)
-+		condor_pre_external( LIBVIRT libvirt-0.6.2 "lib;include" "lib/libvirt.a" )
++		set (LIBVIRT_REAL_VERSION libvirt-0.6.2)
  
++		condor_pre_external( LIBVIRT ${LIBVIRT_REAL_VERSION}-p1 "lib;include" "lib/libvirt.a" )
++
++		if ( BUILDING_LIBXML2 )
++			set (LIBVIRT_DEPENDS ${LIBXML2_REF})
++			set (LIBVIRT_CONFIGURE --with-libxml=${LIBXML2_INSTALL_LOC})
++		else ()
++			set (LIBVIRT_DEPENDS "")
++			set (LIBVIRT_CONFIGURE "")
++		endif ()
  		ExternalProject_Add(libvirt
 -					DEPENDS libxml2
 -				    PREFIX ${EXTERNAL_BUILD_PREFIX}/${LIBVERT_VER}
-+					DEPENDS ${LIBXML2_REF}
++					DEPENDS ${LIBVIRT_DEPENDS}
  				    #-- Download Step ----------
 -					DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${LIBVERT_VER}.tar.gz ${CMD_TERM}
 -				    DOWNLOAD_DIR ${EXTERNAL_DL}
 -				    URL http://parrot.cs.wisc.edu/externals/${LIBVERT_VER}.tar.gz
 -					PATCH_COMMAND cd ${LIBVERT_VER} && patch -p0 -i ${CMAKE_CURRENT_SOURCE_DIR}/no_gnutls.patch
-+					DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${LIBVIRT_VER}.tar.gz ${CMD_TERM}
++					DOWNLOAD_COMMAND wget -N http://parrot.cs.wisc.edu/externals/${LIBVIRT_REAL_VERSION}.tar.gz ${CMD_TERM}
 +				    DOWNLOAD_DIR ${LIBVIRT_STAGE}/dl
-+				    URL http://parrot.cs.wisc.edu/externals/${LIBVIRT_VER}.tar.gz
-+				    PATCH_COMMAND cd ${LIBVIRT_VER} && patch -p0 -i ${CMAKE_CURRENT_SOURCE_DIR}/no_gnutls.patch
++				    URL http://parrot.cs.wisc.edu/externals/${LIBVIRT_REAL_VERSION}.tar.gz
++				    PATCH_COMMAND cd ${LIBVIRT_REAL_VERSION} && patch -p0 -i ${CMAKE_CURRENT_SOURCE_DIR}/no_gnutls.patch
  					#--Configure step ----------
 -				    CONFIGURE_COMMAND cd ${LIBVERT_VER} && ./configure --prefix=${EXTERNAL_STAGE} --disable-shared --without-python --without-xen --without-libvirtd --without-remote --without-test --without-uml --without-openvz --without-avahi --without-selinux --without-sasl --with-libxml=${EXTERNAL_STAGE}
-+				    CONFIGURE_COMMAND cd ${LIBVIRT_VER} &&
-+				    ./configure --prefix=${LIBVIRT_INSTALL_LOC} --disable-shared --without-python --without-xen --without-libvirtd --without-remote --without-test --without-uml --without-openvz --without-avahi --without-selinux --without-sasl --with-libxml=${LIBXML2_INSTALL_LOC}
++				    CONFIGURE_COMMAND cd ${LIBVIRT_REAL_VERSION} &&
++				    ./configure --prefix=${LIBVIRT_INSTALL_LOC} --without-python --without-xen --without-libvirtd --without-remote --without-test --without-uml --without-openvz --without-avahi --without-selinux --without-sasl ${LIBVIRT_CONFIGURE}
  				    #--Build Step ----------
 -				    BUILD_COMMAND cd ${LIBVERT_VER} && make
-+				    BUILD_COMMAND cd ${LIBVIRT_VER} && make
++				    BUILD_COMMAND cd ${LIBVIRT_REAL_VERSION} && make
  				    BUILD_IN_SOURCE 1
  				    #--install Step ----------
 -				    INSTALL_DIR ${EXTERNAL_STAGE}
 -				    INSTALL_COMMAND cd ${LIBVERT_VER} && make install )
 +				    INSTALL_DIR ${LIBVIRT_INSTALL_LOC}
-+				    INSTALL_COMMAND cd ${LIBVIRT_VER} && make install )
++				    INSTALL_COMMAND cd ${LIBVIRT_REAL_VERSION} && make install )
  
  		# Set the target dependencies which the rest of condor depends on.
 -		set(LIBVIRT_FOUND "${EXTERNAL_STAGE}/lib/libvirt.a")
 -		append_var(CONDOR_EXTERNALS libvirt)
-+		set(LIBVIRT_FOUND "${LIBVIRT_INSTALL_LOC}/lib/libvirt.a")
++		set(LIBVIRT_FOUND "${LIBVIRT_INSTALL_LOC}/lib/libvirt.so")
 +		
 +		condor_post_external( libvirt include OFF )
  
  	endif( NOT PROPER AND NOT LIBVIRT_FOUND )
  
 diff --git a/externals/bundles/libxml2/2.7.3/CMakeLists.txt b/externals/bundles/libxml2/2.7.3/CMakeLists.txt
-index 271f9dc..94cca3c 100644
+index 271f9dc..28168cf 100644
 --- a/externals/bundles/libxml2/2.7.3/CMakeLists.txt
 +++ b/externals/bundles/libxml2/2.7.3/CMakeLists.txt
-@@ -24,29 +24,31 @@ if (WITH_LIBXML2)
+@@ -22,33 +22,36 @@ endif()
  
- 	if ( NOT PROPER )
+ if (WITH_LIBXML2)
  
--		set (LIBXML2_VER libxml2-2.7.3 )
-+		condor_pre_external( LIBXML2 libxml2-2.7.3 "lib;include" "lib/libxml2")
+-	if ( NOT PROPER )
++	if ( NOT PROPER AND "${RPM_SYSTEM_NAME}" MATCHES "rhel3" )
 +
++		condor_pre_external( LIBXML2 libxml2-2.7.3 "lib;include" "lib/libxml2")
+ 
+-		set (LIBXML2_VER libxml2-2.7.3 )
  		ExternalProject_Add( libxml2
 -					DEPENDS zlib
 -				    PREFIX ${EXTERNAL_BUILD_PREFIX}/${LIBXML2_VER}
@@ -2100,7 +2475,7 @@ index 271f9dc..94cca3c 100644
  				    URL http://parrot.cs.wisc.edu/externals/${LIBXML2_VER}.tar.gz
  				    #--Configure step ----------
 -				    CONFIGURE_COMMAND cd ${LIBXML2_VER} && ./configure --prefix=${EXTERNAL_STAGE} --disable-shared --with-zlib=${EXTERNAL_STAGE}
-+				    CONFIGURE_COMMAND cd ${LIBXML2_VER} && ./configure --prefix=${LIBXML2_INSTALL_LOC} --disable-shared --with-zlib=${ZLIB_INSTALL_LOC}
++				    CONFIGURE_COMMAND cd ${LIBXML2_VER} && ./configure --prefix=${LIBXML2_INSTALL_LOC}
  				    #--Build Step ----------
  				    BUILD_COMMAND cd ${LIBXML2_VER} && make
  				    BUILD_IN_SOURCE 1
@@ -2113,6 +2488,7 @@ index 271f9dc..94cca3c 100644
 -		set(LIBXML2_FOUND "${EXTERNAL_STAGE}/lib/libxml2.a")
 -		append_var(CONDOR_EXTERNALS libxml2)
 +		set(LIBXML2_FOUND "${LIBXML2_INSTALL_LOC}/lib/libxml2.a")
++		set(BUILDING_LIBXML2 ON PARENT_SCOPE)
 +
 +		condor_post_external( libxml2 OFF OFF )
 +
@@ -2121,7 +2497,10 @@ index 271f9dc..94cca3c 100644
 -    		find_multiple( "xml2" LIBXML2_FOUND )
 +    	find_multiple( "xml2" LIBXML2_FOUND )
  
- 	endif( NOT PROPER )
+-	endif( NOT PROPER )
++	endif( NOT PROPER AND "${RPM_SYSTEM_NAME}" MATCHES "rhel3" )
+ 
+ endif(WITH_LIBXML2)
  
 diff --git a/externals/bundles/openssl/0.9.8h-p2/CMakeLists.txt b/externals/bundles/openssl/0.9.8h-p2/CMakeLists.txt
 index 7430df0..3d62b75 100644
@@ -2680,14 +3059,14 @@ index 0cd3871..9df2e1b 100644
  else()
  	message (STATUS "external skipped (unicoregahp)")
 diff --git a/externals/bundles/voms/1.9.10_4/CMakeLists.txt b/externals/bundles/voms/1.9.10_4/CMakeLists.txt
-index 99bbef6..c78c3f0 100644
+index 99bbef6..81f54d7 100644
 --- a/externals/bundles/voms/1.9.10_4/CMakeLists.txt
 +++ b/externals/bundles/voms/1.9.10_4/CMakeLists.txt
 @@ -24,15 +24,20 @@ endif(LINUX OR DARWIN)
  if ( WITH_VOMS )
  
  	if (NOT PROPER)
-+		if(${SYS_ARCH} MATCHES "X86_64")
++		if(${SYS_ARCH} MATCHES "X86_64" AND LINUX)
 +			set(VOMS_LIB lib64)
 +		else()
 +			set(VOMS_LIB lib)
@@ -4390,10 +4769,10 @@ index 12fbf01..38efe78 100755
      $execstr = get_cmake_args();
 diff --git a/nmi_tools/glue/test/TestGlue.pm b/nmi_tools/glue/test/TestGlue.pm
 new file mode 100644
-index 0000000..8bd3837
+index 0000000..0a96bc9
 --- /dev/null
 +++ b/nmi_tools/glue/test/TestGlue.pm
-@@ -0,0 +1,142 @@
+@@ -0,0 +1,143 @@
 +#!/usr/bin/env perl
 +##**************************************************************
 +##
@@ -4426,6 +4805,7 @@ index 0000000..8bd3837
 +    my $cwd = Cwd::getcwd();
 +    
 +    print "----------- Debug Header ----------------\n";
++    print "Current time: " . scalar(localtime) . "\n";
 +    print "Current host: " . `/bin/hostname -f`;
 +    print "CWD: $cwd\n";
 +    print "Perl path: $^X\n";
@@ -4609,7 +4989,7 @@ index ff3eca5..af8b88e 100755
  
  exit(0);
 diff --git a/nmi_tools/glue/test/platform_pre b/nmi_tools/glue/test/platform_pre
-index 79ce555..0c66261 100755
+index 79ce555..acdf286 100755
 --- a/nmi_tools/glue/test/platform_pre
 +++ b/nmi_tools/glue/test/platform_pre
 @@ -1,7 +1,7 @@
@@ -4621,7 +5001,7 @@ index 79ce555..0c66261 100755
  ## University of Wisconsin-Madison, WI.
  ## 
  ## Licensed under the Apache License, Version 2.0 (the "License"); you
-@@ -34,111 +34,114 @@
+@@ -34,112 +34,118 @@
  # done them prior. This way we can remove things like results.tar.gz
  # once we have extracted what we care about etc...
  ######################################################################
@@ -4751,6 +5131,7 @@ index 79ce555..0c66261 100755
 +    	die "Could not extract tarball or test dir from $results: $!\n";
 +    }
 +    
++    print "Time: " . scalar(localtime) . "\n\n";
 +    my $saved_tarball = glob($pattern);
 +    print "Tarball extracted: '$saved_tarball'\n";
 +    my $tar_name = basename($saved_tarball);
@@ -4761,6 +5142,7 @@ index 79ce555..0c66261 100755
 +    #    move it to this parent directory.
 +    ######################################################################
 +    
++    print "\n";
 +    print "Moving $tar_name to $BaseDir\n";
 +    if(not rename($saved_tarball, "$BaseDir/$tar_name")) {
 +    	die "Could not move $saved_tarball to $BaseDir: $!";
@@ -4804,6 +5186,8 @@ index 79ce555..0c66261 100755
  }
  
  print "All steps completed successfully\n";
++print "End time: " . scalar(localtime) . "\n";
+ exit 0;
 diff --git a/nmi_tools/glue/test/post_all b/nmi_tools/glue/test/post_all
 index 91099f5..a6fd2bf 100755
 --- a/nmi_tools/glue/test/post_all
@@ -27336,6 +27720,46 @@ index f62a65c..660558b 100644
  #endif // WIN32
  
  
+diff --git a/src/classad/classad/exprTree.h b/src/classad/classad/exprTree.h
+index aa0c1d6..36fe0e7 100644
+--- a/src/classad/classad/exprTree.h
++++ b/src/classad/classad/exprTree.h
+@@ -47,6 +47,7 @@ class EvalState {
+ 		const ClassAd *curAd;
+ 
+ 		bool		flattenAndInline;	// NAC
++		bool		debug;
+ 
+ 		// Cache_to_free are the things in the cache that must be
+ 		// freed when this gets deleted. The problem is that we put
+@@ -66,6 +67,7 @@ class EvalState {
+ class ExprTree 
+ {
+   	public:
++		static void *debug_print(const char *message);
+ 			/// The kinds of nodes in expression trees
+ 		enum NodeKind {
+ 	    	/// Literal node (string, integer, real, boolean, undefined, error)
+@@ -136,6 +138,7 @@ class ExprTree
+         virtual bool SameAs(const ExprTree *tree) const = 0;
+ 
+   	protected:
++		void debug_format_value(Value &value) const;
+ 		ExprTree ();
+ 
+         /** Fill in this ExprTree with the contents of the other ExprTree.
+diff --git a/src/classad/classad/fnCall.h b/src/classad/classad/fnCall.h
+index 52a4574..e72a41c 100644
+--- a/src/classad/classad/fnCall.h
++++ b/src/classad/classad/fnCall.h
+@@ -203,6 +203,7 @@ class FunctionCall : public ExprTree
+ 
+ 	static bool eval( const char* name,const ArgumentList &argList,EvalState &state,Value &result );
+ 
++	static bool debug( const char* name,const ArgumentList &argList,EvalState &state,Value &result );
+  	//static bool doReal(const char*,const ArgumentList&,EvalState&,Value&);
+ };
+ 
 diff --git a/src/classad/classad_functional_tester.cpp b/src/classad/classad_functional_tester.cpp
 index 12305cf..84d7cb6 100644
 --- a/src/classad/classad_functional_tester.cpp
@@ -27360,8 +27784,137 @@ index 197ec6b..531c7dd 100755
  DISTRIBUTION_DIR=classads-${DIST_VERSION}
  
  EXCLUDE_LIST="do_packaging CMakeLists.txt README.packaging TAGS TODO man_cache_test.cpp test_classads.cpp"
+diff --git a/src/classad/exprTree.cpp b/src/classad/exprTree.cpp
+index b359842..74efabc 100644
+--- a/src/classad/exprTree.cpp
++++ b/src/classad/exprTree.cpp
+@@ -30,6 +30,84 @@ extern int exprHash( const ExprTree* const&, int );
+ 
+ static const int MAX_CLASSAD_RECURSION = 1000;
+ 
++void *ExprTree::debug_print(const char *message) {
++/* need to call the callback here instead
++	FILE *file = fopen("debug.out", "a");
++	if(file) {
++		fprintf(file, "%s\n", message);
++		fclose(file);
++	}
++*/
++	return NULL;
++}
++
++void ExprTree::debug_format_value(Value &value) const {
++		bool boolValue = false;
++		int intValue = 0;
++		double doubleValue = 0;
++		string stringValue = "";
++
++		PrettyPrint	unp;
++		string		buffer;
++		unp.Unparse( buffer, this );
++
++		std::string result("Classad debug: ");
++		result += buffer;
++		result += " --> ";
++
++		switch(value.GetType()) {
++			case Value::NULL_VALUE:
++				result += "NULL\n";
++				break;
++			case Value::ERROR_VALUE:
++				result += "ERROR\n";
++				break;
++			case Value::UNDEFINED_VALUE:
++				result += "UNDEFINED\n";
++				break;
++			case Value::BOOLEAN_VALUE:
++				if(value.IsBooleanValue(boolValue))
++					result += boolValue ? "TRUE\n" : "FALSE\n";
++				break;
++			case Value::INTEGER_VALUE:
++				if(value.IsIntegerValue(intValue)) {
++					char buf[12];
++					sprintf(buf, "%d", intValue);
++					result += buf;
++					result += "\n";
++				}
++				break;
++					
++			case Value::REAL_VALUE:
++				if(value.IsRealValue(doubleValue)) {
++					char buf[24];
++					sprintf(buf, "%g", doubleValue);
++					result += buf;
++					result += "\n";
++				}
++				break;
++			case Value::RELATIVE_TIME_VALUE:
++				result += "RELATIVE TIME\n";
++				break;
++			case Value::ABSOLUTE_TIME_VALUE:
++				result += "ABSOLUTE TIME\n";
++				break;
++			case Value::STRING_VALUE:
++				if(value.IsStringValue(stringValue)) {
++					result += stringValue;	
++					result += "\n";
++				}
++				break;
++			case Value::CLASSAD_VALUE:
++				result += "CLASSAD\n";
++				break;
++			case Value::LIST_VALUE:
++				result += "LIST\n";
++				break;
++		}
++		debug_print(result.c_str());
++}
++
+ ExprTree::
+ ExprTree ()
+ {
+@@ -55,13 +133,29 @@ CopyFrom(const ExprTree &tree)
+ bool ExprTree::
+ Evaluate (EvalState &state, Value &val) const
+ {
+-	return( _Evaluate( state, val ) );
++	bool eval = _Evaluate( state, val );
++
++	if(state.debug && GetKind() != ExprTree::LITERAL_NODE &&
++			GetKind() != ExprTree::OP_NODE)
++	{
++		debug_format_value(val);
++	}
++
++	return eval;
+ }
+ 
+ bool ExprTree::
+ Evaluate( EvalState &state, Value &val, ExprTree *&sig ) const
+ {
+-	return( _Evaluate( state, val, sig ) );
++	bool eval = _Evaluate( state, val, sig );
++
++	if(state.debug && GetKind() != ExprTree::LITERAL_NODE &&
++			GetKind() != ExprTree::OP_NODE)
++	{
++		debug_format_value(val);
++	}
++
++	return eval;
+ }
+ 
+ 
+@@ -146,6 +240,7 @@ EvalState( )
+ 
+ 	depth_remaining = MAX_CLASSAD_RECURSION;
+ 	flattenAndInline = false;	// NAC
++	debug = false;
+ }
+ 
+ EvalState::
 diff --git a/src/classad/fnCall.cpp b/src/classad/fnCall.cpp
-index 9de6be5..a87b933 100644
+index 9de6be5..5029505 100644
 --- a/src/classad/fnCall.cpp
 +++ b/src/classad/fnCall.cpp
 @@ -61,6 +61,8 @@ static void relTimeToClassAd(
@@ -27373,7 +27926,7 @@ index 9de6be5..a87b933 100644
  
  // start up with an argument list of size 4
  FunctionCall::
-@@ -163,6 +165,11 @@ FunctionCall( )
+@@ -163,6 +165,12 @@ FunctionCall( )
  		functionTable["interval" ] = (void*)interval;
  		functionTable["eval"] = (void*)eval;
  
@@ -27381,11 +27934,44 @@ index 9de6be5..a87b933 100644
 +			// Note that many other string list functions are defined
 +			// externally in the Condor classad compatibility layer.
 +		functionTable["stringListsIntersect" ] = (void*)stringListsIntersect;
++        functionTable["debug"      ] = (void*)debug;
 +
  		initialized = true;
  	}
  }
-@@ -2856,4 +2863,130 @@ make_formatted_time(const struct tm &time_components, string &format,
+@@ -2312,6 +2320,31 @@ interval( const char* /* name */,const ArgumentList &argList,EvalState &state,
+     return true;
+ }
+ 
++bool FunctionCall::
++debug( const char* name,const ArgumentList &argList,EvalState &state,
++	Value &result )
++{
++	Value	arg;
++
++	// takes exactly one argument
++	if( argList.size() != 1 ) {
++		result.SetErrorValue( );
++		return( true );
++	}
++
++	state.debug = true;
++
++	if( !argList[0]->Evaluate( state, arg ) ) {
++		result.SetErrorValue( );
++		return( false );
++	}
++	state.debug = false;
++	result = arg;
++	argList[0]->debug_format_value(result);
++	debug_print("\n");
++	return true;
++}
++
+ #if defined USE_POSIX_REGEX || defined USE_PCRE
+ static bool regexp_helper(const char *pattern, const char *target,
+                           const char *replace,
+@@ -2856,4 +2889,130 @@ make_formatted_time(const struct tm &time_components, string &format,
      return;
  }
  
@@ -27614,6 +28200,50 @@ index e08ecb4..fc4332b 100644
  	if( kind != classad::ExprTree::OP_NODE ) {
  		cerr << "error: no operator/attribute found" << endl;
  			// error: no operator/attribute  found;
+diff --git a/src/condor_amazon/amazongahp_common.cpp b/src/condor_amazon/amazongahp_common.cpp
+index 81fc903..3b10220 100644
+--- a/src/condor_amazon/amazongahp_common.cpp
++++ b/src/condor_amazon/amazongahp_common.cpp
+@@ -34,14 +34,12 @@ static SimpleList<AmazonGahpCommand*> amazon_gahp_commands;
+ 
+ static FILE *gahp_log_file = stderr;
+ 
+-// This variable is defined in dprintf.c
+-extern FILE *DebugFP;
+ 
+ bool set_gahp_log_file(const char* logfile)
+ {
++	
+ 	static bool done_init = false;
+ 
+-	DebugFP = stderr;
+ 	Termlog = 1;
+ 
+ 	if( !done_init ) {
+@@ -69,9 +67,9 @@ bool set_gahp_log_file(const char* logfile)
+ 	}
+ 
+ 	gahp_log_file = fp;
+-	DebugFP = fp;
+ 
+ 	//DebugLock = ;
++	
+ 	return true;
+ }
+ 
+diff --git a/src/condor_amazon/io_loop_pthread.cpp b/src/condor_amazon/io_loop_pthread.cpp
+index e5eb01f..35c179a 100644
+--- a/src/condor_amazon/io_loop_pthread.cpp
++++ b/src/condor_amazon/io_loop_pthread.cpp
+@@ -77,7 +77,7 @@ static void io_process_exit(int exit_num)
+ void
+ usage()
+ {
+-	dprintf( D_ALWAYS, "Usage: amazon_gahp -f logfile -d debuglevel -w min_worker_nums -m max_worker_nums\n");
++	dprintf( D_ALWAYS, "Usage: amazon_gahp -d debuglevel -w min_worker_nums -m max_worker_nums\n");
+ 	exit(1);
+ }
+ 
 diff --git a/src/condor_birdwatcher/CMakeLists.txt b/src/condor_birdwatcher/CMakeLists.txt
 index 1c3a59e..362622a 100644
 --- a/src/condor_birdwatcher/CMakeLists.txt
@@ -82957,7 +83587,7 @@ index 0000000..d8cae4c
 +
 diff --git a/src/condor_contrib/aviary/src/AviaryQueryServiceSkeleton.cpp b/src/condor_contrib/aviary/src/AviaryQueryServiceSkeleton.cpp
 new file mode 100644
-index 0000000..ecbbf41
+index 0000000..52ec7e0
 --- /dev/null
 +++ b/src/condor_contrib/aviary/src/AviaryQueryServiceSkeleton.cpp
 @@ -0,0 +1,479 @@
@@ -83399,8 +84029,8 @@ index 0000000..ecbbf41
 +	JobServerObject* jso = JobServerObject::getInstance();
 +
 +	const char* job = _getJobData->getData()->getId()->getJob().c_str();
-+	AviaryCommon::JobDataType* jdt = _getJobData->getData()->getType();
-+	ADBJobDataTypeEnum file_type = jdt->getJobDataTypeEnum();
++    ADBJobDataTypeEnum file_type = _getJobData->getData()->getType()->getJobDataTypeEnum();
++    JobDataType* jdt = new JobDataType(_getJobData->getData()->getType()->getJobDataType());
 +	AviaryStatus status;
 +	status.type = AviaryStatus::FAIL;
 +	string fname, content;
@@ -92212,8 +92842,24 @@ index 989d7ac..8850a0c 100644
 +extern OwnerlessSubmissionType g_ownerless_submissions;
  
  #endif /* _GLOBALS_H */
+diff --git a/src/condor_contrib/mgmt/qmf/daemons/HistoryFile.cpp b/src/condor_contrib/mgmt/qmf/daemons/HistoryFile.cpp
+index 81cc624..13f6d0b 100644
+--- a/src/condor_contrib/mgmt/qmf/daemons/HistoryFile.cpp
++++ b/src/condor_contrib/mgmt/qmf/daemons/HistoryFile.cpp
+@@ -299,6 +299,11 @@ HistoryFile::poll(CondorError &/*errstack*/)
+ 		if (hold_reason) entry.hold_reason = hold_reason;
+ 
+ 		m_entries.push_back(entry);
++
++        free(global_id);free(cmd);free(args1); free(args2);
++        free(release_reason); free(hold_reason);
++        free(submission);
++        free(owner);
+ 	}
+ 
+ 		// Return iterators for newly read records
 diff --git a/src/condor_contrib/mgmt/qmf/daemons/Job.cpp b/src/condor_contrib/mgmt/qmf/daemons/Job.cpp
-index 22ea98a..a7daf44 100644
+index 22ea98a..1959405 100644
 --- a/src/condor_contrib/mgmt/qmf/daemons/Job.cpp
 +++ b/src/condor_contrib/mgmt/qmf/daemons/Job.cpp
 @@ -20,7 +20,7 @@
@@ -92225,7 +92871,57 @@ index 22ea98a..a7daf44 100644
  #include "proc.h"
  
  #include "stringSpace.h"
-@@ -247,7 +247,8 @@ LiveJobImpl::Set ( const char *_name, const char *_value )
+@@ -163,7 +163,8 @@ LiveJobImpl::Get ( const char *_name, const Attribute *&_attribute ) const
+             {
+                 return false;
+             }
+-            _attribute = new Attribute ( Attribute::INTEGER_TYPE, to_string<int> ( i,std::dec ).c_str() );
++            const char* int_str = to_string<int> ( i,dec ).c_str();
++            _attribute = new Attribute ( Attribute::INTEGER_TYPE, int_str );
+             return true;
+         }
+         case classad::Value::REAL_VALUE:
+@@ -173,7 +174,8 @@ LiveJobImpl::Get ( const char *_name, const Attribute *&_attribute ) const
+             {
+                 return false;
+             }
+-            _attribute = new Attribute ( Attribute::FLOAT_TYPE, to_string<float> ( f,std::dec ).c_str() );
++            const char* float_str = to_string<float> ( f,dec ).c_str();
++            _attribute = new Attribute ( Attribute::FLOAT_TYPE, float_str );
+             return true;
+         }
+         case classad::Value::STRING_VALUE:
+@@ -183,7 +185,7 @@ LiveJobImpl::Get ( const char *_name, const Attribute *&_attribute ) const
+             {
+                 return false;
+             }
+-            _attribute = new Attribute ( Attribute::STRING_TYPE, str.StrDup() );
++            _attribute = new Attribute ( Attribute::STRING_TYPE, str.Value() );
+             return true;
+         }
+         default:
+@@ -205,7 +207,7 @@ LiveJobImpl::Get ( const char *_name, const Attribute *&_attribute ) const
+ 
+ int LiveJobImpl::GetStatus() const
+ {
+-    const Attribute* attr;
++    const Attribute* attr = NULL;
+ 
+     if ( !this->Get ( ATTR_JOB_STATUS, attr ) )
+     {
+@@ -213,7 +215,10 @@ int LiveJobImpl::GetStatus() const
+ 	return JOB_STATUS_MIN;
+     }
+ 
+-    return strtol ( attr->GetValue(), ( char ** ) NULL, 10 );
++    int _status = strtol ( attr->GetValue(), ( char ** ) NULL, 10 );
++    delete attr;
++
++    return _status;
+ }
+ 
+ void
+@@ -247,7 +252,8 @@ LiveJobImpl::Set ( const char *_name, const char *_value )
  	// if we are in here, we don't have m_submission
  	PROC_ID id = getProcByString(m_job->GetKey());
  	std::string val = TrimQuotes( _value );
@@ -92235,7 +92931,52 @@ index 22ea98a..a7daf44 100644
      }
  
      // parse the type
-@@ -372,7 +373,7 @@ HistoryJobImpl::HistoryJobImpl ( const HistoryEntry& _he):
+@@ -303,36 +309,34 @@ LiveJobImpl::Remove ( const char *_name )
+ 	m_full_ad->ChainToAd(cp);
+ }
+ 
+-const ClassAd* LiveJobImpl::GetSummary () const
++const ClassAd* LiveJobImpl::GetSummary ()
+ {
+-	ClassAd* _summary_ad = NULL;
+ 	if (!m_summary_ad) {
+-		_summary_ad = new ClassAd();
+-		_summary_ad->ResetExpr();
++		m_summary_ad = new ClassAd();
++		m_summary_ad->ResetExpr();
+ 		int i = 0;
+ 		while (NULL != ATTRS[i]) {
+ 			const Attribute* attr = NULL;
+ 			if (this->Get(ATTRS[i],attr)) {
+ 				switch (attr->GetType()) {
+ 					case Attribute::FLOAT_TYPE:
+-						_summary_ad->Assign(ATTRS[i], atof(attr->GetValue()));
++						m_summary_ad->Assign(ATTRS[i], atof(attr->GetValue()));
+ 						break;
+ 					case Attribute::INTEGER_TYPE:
+-						_summary_ad->Assign(ATTRS[i], atol(attr->GetValue()));
++						m_summary_ad->Assign(ATTRS[i], atol(attr->GetValue()));
+ 						break;
+ 					case Attribute::EXPR_TYPE:
+ 					case Attribute::STRING_TYPE:
+ 					default:
+-						_summary_ad->Assign(ATTRS[i], strdup(attr->GetValue()));
++						m_summary_ad->Assign(ATTRS[i], attr->GetValue());
+ 				}
+ 			}
++		delete attr;
+ 		i++;
+ 		}
+-	} else {
+-		_summary_ad = m_summary_ad;
+ 	}
+ 
+-	return _summary_ad;
++	return m_summary_ad;
+ }
+ 
+ const ClassAd* LiveJobImpl::GetFullAd () const
+@@ -372,7 +376,7 @@ HistoryJobImpl::HistoryJobImpl ( const HistoryEntry& _he):
  	m_he(_he)
  {
      m_job = NULL;
@@ -92244,7 +92985,16 @@ index 22ea98a..a7daf44 100644
      dprintf ( D_FULLDEBUG, "HistoryJobImpl created for '%d.%d'\n", _he.cluster, _he.proc );
  }
  
-@@ -585,18 +586,26 @@ void Job::DecrementSubmission() {
+@@ -507,7 +511,7 @@ Job::~Job() {
+ 	delete m_live_job;
+ 	delete m_history_job;
+ 
+-	delete m_key;
++	delete [] m_key;
+ 	// submissions are shared and can't be deleted here
+ }
+ 
+@@ -585,18 +589,26 @@ void Job::DecrementSubmission() {
  }
  
  void
@@ -92277,7 +93027,7 @@ index 22ea98a..a7daf44 100644
  	}
  
  	SubmissionCollectionType::const_iterator element = g_submissions.find ( _subName );
-@@ -617,7 +626,11 @@ Job::SetSubmission ( const char* _subName, int cluster )
+@@ -617,7 +629,11 @@ Job::SetSubmission ( const char* _subName, int cluster )
  	if (owner) {
  		// ensure that the submission has an owner
  		m_submission->SetOwner ( owner );
@@ -92290,10 +93040,28 @@ index 22ea98a..a7daf44 100644
  	}
  
  }
+@@ -682,7 +698,7 @@ void Job::GetSummary ( ClassAd& _ad) const
+ {
+ 	//same thing as full ad
+ 	if (m_live_job) {
+-		_ad = *(m_live_job->GetSummary());
++		_ad.CopyFrom(*m_live_job->GetSummary());
+ 	}
+ 	else {
+ 		m_history_job->GetSummary(_ad);
 diff --git a/src/condor_contrib/mgmt/qmf/daemons/Job.h b/src/condor_contrib/mgmt/qmf/daemons/Job.h
-index 2a640f5..147b10b 100644
+index 2a640f5..55a861f 100644
 --- a/src/condor_contrib/mgmt/qmf/daemons/Job.h
 +++ b/src/condor_contrib/mgmt/qmf/daemons/Job.h
+@@ -83,7 +83,7 @@ class LiveJobImpl: public JobImpl
+         LiveJobImpl ( const char*, ClusterJobImpl* );
+         virtual ~LiveJobImpl();
+         int GetStatus () const;
+-        const ClassAd* GetSummary () const;
++        const ClassAd* GetSummary ();
+         const ClassAd* GetFullAd () const;
+         void Set ( const char* , const char* );
+         bool Get ( const char * , const Attribute *& ) const;
 @@ -149,6 +149,7 @@ class Job
          void Remove ( const char* );
  
@@ -92693,7 +93461,7 @@ index 75406e5..5801fea 100644
     qmf::ConsoleEvent evt;
     while (qmf2Session.nextEvent(evt, qpid::messaging::Duration::IMMEDIATE));
 diff --git a/src/condor_contrib/triggerd/src/Triggerd.cpp b/src/condor_contrib/triggerd/src/Triggerd.cpp
-index 85e65f9..21fa50d 100644
+index 85e65f9..40e1197 100644
 --- a/src/condor_contrib/triggerd/src/Triggerd.cpp
 +++ b/src/condor_contrib/triggerd/src/Triggerd.cpp
 @@ -221,22 +221,13 @@ Triggerd::init()
@@ -92771,6 +93539,14 @@ index 85e65f9..21fa50d 100644
  
     // Create a socket to handle management method calls
     sock = new ReliSock;
+@@ -991,6 +990,7 @@ Triggerd::RemoveWS(const char* text)
+    if (NULL != text)
+    {
+       // Remove preceeding whitespace first
++      result = strdup(text);
+       while (result[0] && isspace(result[0]))
+       {
+          ++result;
 diff --git a/src/condor_contrib/triggerd/src/condor_trigger_config.py b/src/condor_contrib/triggerd/src/condor_trigger_config.py
 index 6b09ab7..8ac5e93 100644
 --- a/src/condor_contrib/triggerd/src/condor_trigger_config.py
@@ -92822,6 +93598,19 @@ index 6e75d2e..c353358 100644
  		// We never want to try sending an update to port 0.  If we're
  		// about to try that, and we're trying to talk to a local
  		// collector, we should try re-reading the address file and
+diff --git a/src/condor_daemon_client/dc_schedd.cpp b/src/condor_daemon_client/dc_schedd.cpp
+index d2e14d3..7a056ef 100644
+--- a/src/condor_daemon_client/dc_schedd.cpp
++++ b/src/condor_daemon_client/dc_schedd.cpp
+@@ -933,7 +933,7 @@ DCSchedd::spoolJobFiles(int JobAdsArrayLen, ClassAd* JobAdsArray[], CondorError
+ 		// Now send all the files via the file transfer object
+ 	for (i=0; i<JobAdsArrayLen; i++) {
+ 		FileTransfer ftrans;
+-		if ( !ftrans.SimpleInit(JobAdsArray[i], false, false, &rsock) ) {
++		if ( !ftrans.SimpleInit(JobAdsArray[i], false, false, &rsock, PRIV_UNKNOWN, false, true) ) {
+ 			if( errstack ) {
+ 				int cluster = -1, proc = -1;
+ 				if(JobAdsArray[i]) {
 diff --git a/src/condor_daemon_core.V6/condor_daemon_core.h b/src/condor_daemon_core.V6/condor_daemon_core.h
 index 2801cd0..a4cf41a 100644
 --- a/src/condor_daemon_core.V6/condor_daemon_core.h
@@ -92851,7 +93640,7 @@ index 2801cd0..a4cf41a 100644
  
  	void CheckForTimeSkip(time_t time_before, time_t okay_delta);
 diff --git a/src/condor_daemon_core.V6/daemon_core.cpp b/src/condor_daemon_core.V6/daemon_core.cpp
-index 6db88ee..f93eedf 100644
+index 6db88ee..0001e8b 100644
 --- a/src/condor_daemon_core.V6/daemon_core.cpp
 +++ b/src/condor_daemon_core.V6/daemon_core.cpp
 @@ -2633,9 +2633,9 @@ DaemonCore::reconfig(void) {
@@ -92904,7 +93693,31 @@ index 6db88ee..f93eedf 100644
  				                            m_family_info->glexec_proxy);
  			if (!ok) {
  				errno = DaemonCore::ERRNO_REGISTRATION_FAILED;
-@@ -7908,6 +7925,7 @@ int DaemonCore::Create_Process(
+@@ -7541,16 +7558,20 @@ int DaemonCore::Create_Process(
+ 	// Check if it's a 16-bit application
+ 	bIs16Bit = false;
+ 	LOADED_IMAGE loaded;
++	BOOL map_and_load_result;
+ 	// NOTE (not in MSDN docs): Even when this function fails it still
+ 	// may have "failed" with LastError = "operation completed successfully"
+ 	// and still filled in our structure.  It also might really have
+ 	// failed.  So we init the part of the structure we care about and just
+-	// ignore the return value.
++	// ignore the return value for purposes of setting bIs16Bit - we still
++	// must honor the return value for purposes of calling UnMapAndLoad() or
++	// else risk an access violation upon unmapping.
+ 	loaded.fDOSImage = FALSE;
+-	MapAndLoad((char *)executable, NULL, &loaded, FALSE, TRUE);
++	map_and_load_result = MapAndLoad((char *)executable, NULL, &loaded, FALSE, TRUE);
+ 	if (loaded.fDOSImage == TRUE)
+ 		bIs16Bit = true;
+-	UnMapAndLoad(&loaded);
++	if (map_and_load_result)
++		UnMapAndLoad(&loaded);
+ 
+ 	// Define a some short-hand variables for use bellow
+ 	namelen				= strlen(executable);
+@@ -7908,6 +7929,7 @@ int DaemonCore::Create_Process(
  		                          NULL,
  		                          family_info->login,
  		                          NULL,
@@ -92912,7 +93725,7 @@ index 6db88ee..f93eedf 100644
  		                          family_info->glexec_proxy);
  		if (!ok) {
  			EXCEPT("error registering process family with procd");
-@@ -8355,6 +8373,7 @@ int DaemonCore::Create_Process(
+@@ -8355,6 +8377,7 @@ int DaemonCore::Create_Process(
  		                &pidtmp->penvid,
  		                family_info->login,
  		                NULL,
@@ -92920,10 +93733,39 @@ index 6db88ee..f93eedf 100644
  		                family_info->glexec_proxy);
  	}
  #endif
+@@ -9921,6 +9944,19 @@ int DaemonCore::SendAliveToParent()
+ 		return FALSE;
+ 	}
+ 
++		/* Don't have the CGAHP and/or DAGMAN, which are launched as the user,
++		   attempt to send keep alives to daemon. Permissions are not likely to
++		   allow user proccesses to send signals to Condor daemons. 
++		   Note that we shouldn't have to check for DAGMan here as no
++		   daemon core info should have been inherited down to DAGMan, 
++		   but it doesn't hurt to be sure here since we already need
++		   to check for the CGAHP. */
++	if (get_mySubSystem()->isType(SUBSYSTEM_TYPE_GAHP) ||
++	  	get_mySubSystem()->isType(SUBSYSTEM_TYPE_DAGMAN))
++	{
++		return FALSE;
++	}
++
+ 		/* Before we possibly block trying to send this alive message to our 
+ 		   parent, lets see if this parent pid (ppid) exists on this system.
+ 		   This protects, for instance, against us acting a bogus CONDOR_INHERIT
 diff --git a/src/condor_daemon_core.V6/soap_core.cpp b/src/condor_daemon_core.V6/soap_core.cpp
-index 0cf3a64..178dce7 100644
+index 0cf3a64..c18cc9d 100644
 --- a/src/condor_daemon_core.V6/soap_core.cpp
 +++ b/src/condor_daemon_core.V6/soap_core.cpp
+@@ -51,7 +51,7 @@ int get_handler(struct soap *soap);
+ struct soap *
+ dc_soap_accept(Sock *socket, const struct soap *soap)
+ {
+-	struct soap *cursoap = soap_copy(soap);
++	struct soap *cursoap = soap_copy(const_cast<struct soap*>(soap));
+ 	ASSERT(cursoap);
+ 
+ 		// Mimic a gsoap soap_accept as follows:
 @@ -518,6 +518,10 @@ int serve_file(struct soap *soap, const char *name, const char *type) {
      web_root_realpath = strdup(buf);
    }
@@ -92935,6 +93777,92 @@ index 0cf3a64..178dce7 100644
    
    char * full_name = dircat(web_root_realpath,name);
    char * full_name_realpath = NULL;
+diff --git a/src/condor_dagman/debug.cpp b/src/condor_dagman/debug.cpp
+index bba6772..fdfb4fc 100644
+--- a/src/condor_dagman/debug.cpp
++++ b/src/condor_dagman/debug.cpp
+@@ -44,7 +44,6 @@ static int cache_size = 0;
+ //extern "C" {
+ extern int DebugFlags;
+ extern int DebugUseTimestamps;
+-extern FILE *DebugFP;
+ //}
+ 
+ static void debug_cache_insert(int flags, const char *fmt, va_list args);
+@@ -194,7 +193,11 @@ debug_cache_insert(int flags, const char *fmt, va_list args)
+ 		}
+ 
+ 		if ((DebugFlags|flags) & D_FDS) {
+-			fds.sprintf("(fd:%d) ", fileno(DebugFP) );
++				// Because of Z's dprintf changes, we no longer have
++				// access to the dprintf FP.  For now we're just going
++				// to skip figuring out the FD *while caching*.
++				// wenger 2011-05-18
++			fds.sprintf("(fd:?) " );
+ 		}
+ 
+ 		if ((DebugFlags|flags) & D_PID) {
+diff --git a/src/condor_dagman/parse.cpp b/src/condor_dagman/parse.cpp
+index 49ea2b9..6851a89 100644
+--- a/src/condor_dagman/parse.cpp
++++ b/src/condor_dagman/parse.cpp
+@@ -41,6 +41,7 @@
+ #include "extArray.h"
+ #include "condor_string.h"  /* for strnewp() */
+ #include "dagman_recursive_submit.h"
++#include "condor_getcwd.h"
+ 
+ static const char   COMMENT    = '#';
+ static const char * DELIMITERS = " \t";
+@@ -161,9 +162,11 @@ bool parse (Dag *dag, const char *filename, bool useDagDir) {
+ 
+ 	FILE *fp = safe_fopen_wrapper(tmpFilename, "r");
+ 	if(fp == NULL) {
+-		if(DEBUG_LEVEL(DEBUG_QUIET)) {
+-			debug_printf( DEBUG_QUIET, "Could not open file %s for input\n", filename);
+-		}
++		MyString cwd;
++		condor_getcwd( cwd );
++		debug_printf( DEBUG_QUIET, "Could not open file %s for input "
++					"(cwd %s) (errno %d, %s)\n", tmpFilename,
++					cwd.Value(), errno, strerror(errno));
+ 		return false;
+    	}
+ 
+@@ -188,6 +191,8 @@ bool parse (Dag *dag, const char *filename, bool useDagDir) {
+ 		if (line[0] == 0)       continue;  // Ignore blank lines
+ 		if (line[0] == COMMENT) continue;  // Ignore comments
+ 
++		debug_printf( DEBUG_DEBUG_3, "Parsing line <%s>\n", line );
++
+ 			// Note: strtok() could be replaced by MyString::Tokenize(),
+ 			// which is much safer, but I don't want to deal with that
+ 			// right now.  wenger 2005-02-02.
+@@ -398,11 +403,24 @@ parse_node( Dag *dag, Job::job_type_t nodeType,
+ 
+ 		// first token is the node name
+ 	const char *nodeName = strtok( NULL, DELIMITERS );
++	if ( !nodeName ) {
++		debug_printf( DEBUG_QUIET, "ERROR: %s (line %d): no node name "
++					"specified\n", dagFile, lineNum );
++		debug_printf( DEBUG_QUIET, "%s\n", expectedSyntax.Value() );
++		return false;
++	}
++
+ 	MyString tmpNodeName = munge_job_name(nodeName);
+ 	nodeName = tmpNodeName.Value();
+ 
+ 		// next token is the submit file name
+ 	const char *submitFile = strtok( NULL, DELIMITERS );
++	if ( !submitFile ) {
++		debug_printf( DEBUG_QUIET, "ERROR: %s (line %d): no submit file "
++					"specified\n", dagFile, lineNum );
++		debug_printf( DEBUG_QUIET, "%s\n", expectedSyntax.Value() );
++		return false;
++	}
+ 
+ 		// next token (if any) is "DIR" "NOOP", or "DONE" (in that order)
+ 	const char* nextTok = strtok( NULL, DELIMITERS );
 diff --git a/src/condor_examples/condor.boot.rpm b/src/condor_examples/condor.boot.rpm
 index c96d3b3..498e7da 100755
 --- a/src/condor_examples/condor.boot.rpm
@@ -93197,6 +94125,21 @@ index e82339d..3680ed4 100644
  
  	daemonCore->Cancel_Timer( delegationTimerId );
  	if ( gahp != NULL ) {
+diff --git a/src/condor_gridmanager/dcloudjob.cpp b/src/condor_gridmanager/dcloudjob.cpp
+index 266d561..73a4ac4 100644
+--- a/src/condor_gridmanager/dcloudjob.cpp
++++ b/src/condor_gridmanager/dcloudjob.cpp
+@@ -511,9 +511,9 @@ void DCloudJob::doEvaluateState()
+ 
+ 					if ( rc == 0 ) {
+ 
++						WriteGridSubmitEventToUserLog(jobAd);
+ 						ProcessInstanceAttrs( instance_attrs );
+ 						ASSERT( m_instanceId );
+-						WriteGridSubmitEventToUserLog(jobAd);
+ 
+ 						if ( remoteJobState == DCLOUD_VM_STATE_STOPPED ) {
+ 							gmState = GM_START_VM;
 diff --git a/src/condor_gridmanager/ec2job.cpp b/src/condor_gridmanager/ec2job.cpp
 new file mode 100644
 index 0000000..6f1dd34
@@ -98878,7 +99821,7 @@ index 34cdea9..0000000
 -
 -#endif /* _ASTBASE_H_ */
 diff --git a/src/condor_includes/condor_attributes.h b/src/condor_includes/condor_attributes.h
-index a03d626..44cb635 100644
+index a03d626..84494ca 100644
 --- a/src/condor_includes/condor_attributes.h
 +++ b/src/condor_includes/condor_attributes.h
 @@ -152,6 +152,8 @@ extern const char * const  ATTR_FILE_READ_COUNT;
@@ -98898,7 +99841,15 @@ index a03d626..44cb635 100644
  extern const char * const  ATTR_X509_USER_PROXY_VONAME;
  extern const char * const  ATTR_X509_USER_PROXY_FIRST_FQAN;
  extern const char * const  ATTR_X509_USER_PROXY_FQAN;
-@@ -240,6 +243,7 @@ extern const char * const  ATTR_JOB_ACTION;
+@@ -222,6 +225,7 @@ extern const char * const  ATTR_HOOK_KEYWORD;
+ extern const char * const  ATTR_IDLE_JOBS;
+ extern const char * const  ATTR_IMAGE_SIZE;
+ extern const char * const  ATTR_RESIDENT_SET_SIZE;
++extern const char * const  ATTR_PROPORTIONAL_SET_SIZE;
+ extern const char * const  ATTR_INTERACTIVE;
+ extern const char * const  ATTR_IS_DAEMON_CORE;
+ extern const char * const  ATTR_IS_OWNER;
+@@ -240,6 +244,7 @@ extern const char * const  ATTR_JOB_ACTION;
  extern const char * const  ATTR_JOB_ARGUMENTS1;
  extern const char * const  ATTR_JOB_ARGUMENTS2;
  extern const char * const  ATTR_JOB_CMD;
@@ -98906,7 +99857,7 @@ index a03d626..44cb635 100644
  extern const char * const  ATTR_JOB_CMD_HASH;
  extern const char * const  ATTR_JOB_CMD_MD5;
  extern const char * const  ATTR_ORIG_JOB_CMD;
-@@ -286,6 +290,10 @@ extern const char * const  ATTR_JOB_OUTPUT;
+@@ -286,6 +291,10 @@ extern const char * const  ATTR_JOB_OUTPUT;
  extern const char * const  ATTR_JOB_OUTPUT_ORIG;
  extern const char * const  ATTR_JOB_OUTPUT_SIZE;
  extern const char * const  ATTR_JOB_PID;
@@ -98917,7 +99868,7 @@ index a03d626..44cb635 100644
  extern const char * const  ATTR_JOB_PRIO;
  extern const char * const  ATTR_JOB_COMMITTED_TIME;
  extern const char * const  ATTR_JOB_LANGUAGE;
-@@ -362,6 +370,8 @@ extern const char * const  ATTR_MAX_HOSTS;
+@@ -362,6 +371,8 @@ extern const char * const  ATTR_MAX_HOSTS;
  extern const char * const  ATTR_MAX_JOB_RETIREMENT_TIME;
  extern const char * const  ATTR_MAX_JOBS_RUNNING;
  extern const char * const  ATTR_MEMORY;
@@ -98926,7 +99877,7 @@ index a03d626..44cb635 100644
  extern const char * const  ATTR_MIN_HOSTS;
  extern const char * const  ATTR_MIPS;
  extern const char * const  ATTR_MPI_IS_MASTER;
-@@ -530,6 +540,27 @@ extern const char * const  ATTR_TOTAL_LOCAL_RUNNING_JOBS;
+@@ -530,6 +541,27 @@ extern const char * const  ATTR_TOTAL_LOCAL_RUNNING_JOBS;
  extern const char * const  ATTR_TOTAL_LOCAL_IDLE_JOBS;
  extern const char * const  ATTR_TOTAL_SCHEDULER_RUNNING_JOBS;
  extern const char * const  ATTR_TOTAL_SCHEDULER_IDLE_JOBS;
@@ -98954,7 +99905,7 @@ index a03d626..44cb635 100644
  extern const char * const  ATTR_TOTAL_SLOTS;
  extern const char * const  ATTR_TOTAL_TIME_IN_CYCLE;
  extern const char * const  ATTR_TOTAL_TIME_BACKFILL_BUSY;
-@@ -545,6 +576,8 @@ extern const char * const  ATTR_TOTAL_TIME_PREEMPTING_KILLING;
+@@ -545,6 +577,8 @@ extern const char * const  ATTR_TOTAL_TIME_PREEMPTING_KILLING;
  extern const char * const  ATTR_TOTAL_TIME_PREEMPTING_VACATING;
  extern const char * const  ATTR_TOTAL_TIME_UNCLAIMED_BENCHMARKING;
  extern const char * const  ATTR_TOTAL_TIME_UNCLAIMED_IDLE;
@@ -98963,7 +99914,7 @@ index a03d626..44cb635 100644
  // Deprecated (cruft) -- use: ATTR_TOTAL_SLOTS;
  extern const char * const  ATTR_TOTAL_VIRTUAL_MACHINES;
  extern const char * const  ATTR_TOTAL_VIRTUAL_MEMORY;
-@@ -758,6 +791,20 @@ extern const char * const ATTR_AMAZON_REMOTE_VM_NAME;
+@@ -758,6 +792,20 @@ extern const char * const ATTR_AMAZON_REMOTE_VM_NAME;
  extern const char * const ATTR_AMAZON_INSTANCE_TYPE;
  //************* End of changes for Amamzon Jobs *****************//
  
@@ -98984,7 +99935,7 @@ index a03d626..44cb635 100644
  
  extern const char * const ATTR_REQUEST_CPUS;
  extern const char * const ATTR_REQUEST_MEMORY;
-@@ -834,6 +881,8 @@ extern const char * const ATTR_HASH_NAME;
+@@ -834,6 +882,8 @@ extern const char * const ATTR_HASH_NAME;
  extern const char * const ATTR_AUTHENTICATED_IDENTITY;
  extern const char * const ATTR_DELEGATE_JOB_GSI_CREDENTIALS_LIFETIME;
  
@@ -99712,7 +100663,7 @@ index 7aa259b..5006571 100644
  /*
  *** Daemon Core Commands and Signals
 diff --git a/src/condor_includes/condor_config.h b/src/condor_includes/condor_config.h
-index eea5cac..4f9aae6 100644
+index eea5cac..b446126 100644
 --- a/src/condor_includes/condor_config.h
 +++ b/src/condor_includes/condor_config.h
 @@ -248,10 +248,37 @@ extern "C" {
@@ -99766,8 +100717,32 @@ index eea5cac..4f9aae6 100644
  	int  param_boolean_int( const char *name, int default_value );
  	int  param_boolean_int_with_default( const char* name );
  	int  param_boolean_int_without_default( const char* name, int default_value );
+@@ -294,7 +321,7 @@ BEGIN_C_DECLS
+ 	int write_config_file( const char* pathname );
+ 	// Helper function, of form to iterate over the hash table of parameter
+ 	// information.  Returns 0 to continue, -1 to stop (i.e. on an error).
+-	int write_config_variable(param_info_t* value, void* file_desc);
++	int write_config_variable(const param_info_t* value, void* file_desc);
+ 
+ /* This function initialize GSI (maybe other) authentication related
+    stuff Daemons that should use the condor daemon credentials should
+diff --git a/src/condor_includes/condor_cron_job.h b/src/condor_includes/condor_cron_job.h
+index 98ea37f..e42eddd 100644
+--- a/src/condor_includes/condor_cron_job.h
++++ b/src/condor_includes/condor_cron_job.h
+@@ -174,8 +174,9 @@ class CronJob : public Service
+ 	int				 m_killTimer;		// Make sure it dies
+ 	int				 m_num_outputs;		// # output blocks have we processed?
+ 	int				 m_num_runs;		// # of times the job has run
++	int				 m_num_fails;		// # of times we failed to exec it
+ 	unsigned		 m_last_start_time;	// Last run time
+-	unsigned		 m_last_exit_time;	// Last run time
++	unsigned		 m_last_exit_time;	// Last exit time
+ 	double			 m_run_load;		// Run load of the job
+ 	bool			 m_marked;			// Is this one marked?
+ 	unsigned		 m_old_period;		// Period before reconfig
 diff --git a/src/condor_includes/condor_debug.h b/src/condor_includes/condor_debug.h
-index 742ed59..48be699 100644
+index 742ed59..567f53f 100644
 --- a/src/condor_includes/condor_debug.h
 +++ b/src/condor_includes/condor_debug.h
 @@ -76,6 +76,12 @@
@@ -99792,7 +100767,16 @@ index 742ed59..48be699 100644
  void Suicide(void);
  void set_debug_flags( const char *strflags );
  void _condor_fd_panic( int line, const char *file );
-@@ -156,7 +162,7 @@ extern int	_EXCEPT_Line;			/* Line number of the exception    */
+@@ -132,6 +138,8 @@ double dprintf_get_lock_delay(void);
+  */
+ int fclose_wrapper( FILE *stream, int maxRetries );
+ 
++int debug_open_fds(int *open_fds);
++
+ /*
+ **	Definition of exception macro
+ */
+@@ -156,7 +164,7 @@ extern int	_EXCEPT_Line;			/* Line number of the exception    */
  extern const char	*_EXCEPT_File;		/* File name of the exception      */
  extern int	_EXCEPT_Errno;			/* errno from most recent system call */
  extern int (*_EXCEPT_Cleanup)(int,int,const char*);	/* Function to call to clean up (or NULL) */
@@ -100131,7 +101115,7 @@ index 676793b..ed77f9d 100644
  
  // If no inttypes, try to define our own
 diff --git a/src/condor_includes/condor_system.h b/src/condor_includes/condor_system.h
-index d08d6dd..e8be2c1 100644
+index d08d6dd..79731db 100644
 --- a/src/condor_includes/condor_system.h
 +++ b/src/condor_includes/condor_system.h
 @@ -1,6 +1,6 @@
@@ -100142,7 +101126,24 @@ index d08d6dd..e8be2c1 100644
   * University of Wisconsin-Madison, WI.
   *
   * Licensed under the Apache License, Version 2.0 (the "License"); you
-@@ -159,7 +159,6 @@
+@@ -28,8 +28,6 @@
+ # include "condor_sys_nt.h"
+ #endif
+ 
+-
+-
+ /******************************
+ ** Unix specifics
+ ******************************/
+@@ -45,7 +43,6 @@
+ # define UNIX
+ #endif
+ 
+-
+ /**********************************************************************
+ ** These system-specific files will "fix" anything that needs fixing,
+ ** define platform-specific functionality flags we want to use, etc. 
+@@ -159,7 +156,6 @@
  #include <netinet/in.h>
  #include <netinet/tcp.h>
  #include <arpa/inet.h>
@@ -100150,14 +101151,15 @@ index d08d6dd..e8be2c1 100644
  #include <sys/resource.h>
  #include <limits.h>
  #include <ctype.h>
-@@ -169,15 +168,11 @@
+@@ -169,15 +165,9 @@
  #include <time.h>
  #include <sys/time.h>
  #include <sys/times.h>
 -#include <rpc/types.h>
- #if !defined(Darwin) && !defined(CONDOR_FREEBSD)
- #include <values.h>
- #endif
+-#if !defined(Darwin) && !defined(CONDOR_FREEBSD)
+-#include <values.h>
+-#endif
++#include <float.h>
  #include <math.h>
  #include <utime.h>
 -#if !defined(Darwin)
@@ -100167,7 +101169,7 @@ index d08d6dd..e8be2c1 100644
  /* select() on all our platforms takes an fd_set pointer, so we can
     just define this here for everyone.  We don't really need it
 diff --git a/src/condor_includes/config.h.cmake b/src/condor_includes/config.h.cmake
-index 28d802f..2cf68d1 100644
+index 28d802f..4f7f29a 100644
 --- a/src/condor_includes/config.h.cmake
 +++ b/src/condor_includes/config.h.cmake
 @@ -25,14 +25,6 @@
@@ -100234,6 +101236,14 @@ index 28d802f..2cf68d1 100644
  /* Define to 1 if you have the 'gettimeofday' function. (USED)*/
  #cmakedefine HAVE_GETTIMEOFDAY 1
  
+@@ -556,4 +570,7 @@
+ /* Define to 1 if the system has getifaddrs().*/
+ #cmakedefine HAVE_GETIFADDRS 1
+ 
++/* Define to 1 if the system has proportional set size (PSS).*/
++#cmakedefine HAVE_PSS 1
++
+ #endif
 diff --git a/src/condor_includes/globus_utils.h b/src/condor_includes/globus_utils.h
 index 9f44709..739ed92 100644
 --- a/src/condor_includes/globus_utils.h
@@ -100248,9 +101258,18 @@ index 9f44709..739ed92 100644
  
  char* x509_proxy_identity_name( const char *proxy_file);
 diff --git a/src/condor_includes/stream.h b/src/condor_includes/stream.h
-index fac5f1f..5d22cc2 100644
+index fac5f1f..a541628 100644
 --- a/src/condor_includes/stream.h
 +++ b/src/condor_includes/stream.h
+@@ -50,7 +50,7 @@ const condor_mode_t NULL_FILE_PERMISSIONS = (condor_mode_t)0;
+     We need to define a special code() method for certain integer arguments.
+     To take advantage of overloading, we need make these arguments have a
+     new type.  Since typedef doesn't actually create a new type in C++, we
+-    use enum.  Note that we explicitly define MAXINT as an allowable value
++    use enum.  Note that we explicitly define INT_MAX as an allowable value
+     for the enum to make sure sizeof(enum) == sizeof(int).
+ */
+ 
 @@ -292,7 +292,6 @@ public:
      ///
  	int code_array(gid_t *&array, int &len);
@@ -100701,8 +101720,22 @@ index be3f10d..3b6df9d 100644
  	if( !startd.sendCommand(X_EVENT_NOTIFICATION, &ssock, 3) ) {
  		dprintf( D_ALWAYS, "Can't send X_EVENT_NOTIFICATION command "
  				 "to startd at: %s, aborting\n", startd.addr() );
+diff --git a/src/condor_master.V6/masterDaemon.cpp b/src/condor_master.V6/masterDaemon.cpp
+index 2fb77f3..8f326f6 100644
+--- a/src/condor_master.V6/masterDaemon.cpp
++++ b/src/condor_master.V6/masterDaemon.cpp
+@@ -2331,8 +2331,7 @@ Daemons::StopDaemonsBeforeMasterStops()
+ 	std::map<std::string, class daemon*>::iterator iter;
+ 
+ 	for( iter = daemon_ptr.begin(); iter != daemon_ptr.end(); iter++ ) {
+-		if( ( iter->second->pid || iter->second->IsHA() )
+-			&& iter->second->runs_here )
++		if( iter->second->pid && iter->second->runs_here )
+ 		{
+ 			iter->second->Stop();
+ 			running++;
 diff --git a/src/condor_negotiator.V6/matchmaker.cpp b/src/condor_negotiator.V6/matchmaker.cpp
-index e4d3a89..bf28766 100644
+index e4d3a89..025914d 100644
 --- a/src/condor_negotiator.V6/matchmaker.cpp
 +++ b/src/condor_negotiator.V6/matchmaker.cpp
 @@ -26,7 +26,7 @@
@@ -100714,7 +101747,92 @@ index e4d3a89..bf28766 100644
  #include "condor_query.h"
  #include "daemon.h"
  #include "dc_startd.h"
-@@ -1272,7 +1272,7 @@ negotiationTime ()
+@@ -321,6 +321,8 @@ initialize ()
+ #endif
+ }
+ 
++static bool delayReinit;
++
+ int Matchmaker::
+ reinitialize ()
+ {
+@@ -328,6 +330,16 @@ reinitialize ()
+ 	static bool first_time = true;
+ 	ExprTree *tmp_expr;
+ 
++	// If we got reconfig'ed in the middle of the negotiation cycle,
++	// don't reconfig now.  This code isn't safe wrt CommandSocket re-entrancy
++
++	if (daemonCore->InServiceCommandSocket()) {
++		delayReinit = true;
++		return true;
++	} else {
++		delayReinit = false;
++	}
++
+     // (re)build the HGQ group tree from configuration
+     // need to do this prior to initializing the accountant
+     hgq_construct_tree();
+@@ -950,6 +962,25 @@ void round_for_precision(double& x) {
+ }
+ 
+ 
++double starvation_ratio(double usage, double allocated) {
++    return (allocated > 0) ? (usage / allocated) : DBL_MAX;
++}
++
++struct starvation_order {
++    bool operator()(const GroupEntry* a, const GroupEntry* b) const {
++        // "starvation order" is ordering by the ratio usage/allocated, so that
++        // most-starved groups are allowed to negotiate first, to minimize group
++        // starvation over time.
++        double sa = starvation_ratio(a->usage, a->allocated);
++        double sb = starvation_ratio(b->usage, b->allocated);
++        if (sa < sb) return true;
++        if (sa > sb) return false;
++        // If ratios are the same, sub-order by group priority.
++        // Most likely to be relevant when comparing groups with zero usage.
++        return (a->priority < b->priority);
++    }
++};
++
+ 
+ void Matchmaker::
+ negotiationTime ()
+@@ -1109,6 +1140,7 @@ negotiationTime ()
+             group->submitterAds->Close();
+ 
+             group->usage = accountant.GetWeightedResourcesUsed(group->name.c_str());
++            group->priority = accountant.GetPriority(group->name.c_str());
+         }
+ 
+ 
+@@ -1234,6 +1266,10 @@ negotiationTime ()
+                 ninc = param_double("HFS_ROUND_ROBIN_RATE", DBL_MAX, 1.0, DBL_MAX);
+             }
+ 
++            // present accounting groups for negotiation in "starvation order":
++            vector<GroupEntry*> negotiating_groups(hgq_groups);
++            std::sort(negotiating_groups.begin(), negotiating_groups.end(), starvation_order());
++
+             // This loop implements "weighted round-robin" behavior to gracefully handle case of multiple groups competing
+             // for same subset of available slots.  It gives greatest weight to groups with the greatest difference 
+             // between allocated and their current usage
+@@ -1245,9 +1281,12 @@ negotiationTime ()
+                 dprintf(D_FULLDEBUG, "group quotas: entering RR iteration n= %g\n", n);
+ 
+                 // Do the negotiations
+-                for (vector<GroupEntry*>::iterator j(hgq_groups.begin());  j != hgq_groups.end();  ++j) {
++                for (vector<GroupEntry*>::iterator j(negotiating_groups.begin());  j != negotiating_groups.end();  ++j) {
+                     GroupEntry* group = *j;
+ 
++                    dprintf(D_FULLDEBUG, "Group %s - starvation= %g (%g/%g)  prio= %g\n", 
++                            group->name.c_str(), starvation_ratio(group->usage, group->allocated), group->usage, group->allocated, group->priority);
++
+                     if (group->allocated <= 0) {
+                         dprintf(D_ALWAYS, "Group %s - skipping, zero slots allocated\n", group->name.c_str());
+                         continue;
+@@ -1272,7 +1311,7 @@ negotiationTime ()
  
                      negotiateWithGroup(untrimmed_num_startds, untrimmedSlotWeightTotal, minSlotWeight,
                                         startdAds, claimIds, *(group->submitterAds), 
@@ -100723,7 +101841,18 @@ index e4d3a89..bf28766 100644
                  }
  
                  // Halt when we have negotiated with full deltas
-@@ -1967,7 +1967,7 @@ negotiateWithGroup ( int untrimmed_num_startds,
+@@ -1334,6 +1373,10 @@ negotiationTime ()
+ 
+     negotiation_cycle_stats[0]->duration = completedLastCycleTime - negotiation_cycle_stats[0]->start_time;
+ 
++	if (delayReinit) {
++		this->reinitialize();
++	}
++
+ 	if (param_boolean("NEGOTIATOR_UPDATE_AFTER_CYCLE", false)) {
+ 		updateCollector();
+ 	}
+@@ -1967,7 +2010,7 @@ negotiateWithGroup ( int untrimmed_num_startds,
  					 ClassAdListDoesNotDeleteAds& startdAds,
  					 ClaimIdHash& claimIds, 
  					 ClassAdListDoesNotDeleteAds& scheddAds, 
@@ -100732,7 +101861,15 @@ index e4d3a89..bf28766 100644
  {
      time_t start_time_phase3 = time(NULL);
  	ClassAd		*schedd;
-@@ -2006,6 +2006,18 @@ negotiateWithGroup ( int untrimmed_num_startds,
+@@ -1988,7 +2031,6 @@ negotiateWithGroup ( int untrimmed_num_startds,
+ 	double 		pieLeftOrig;
+ 	int         scheddAdsCountOrig;
+ 	int			totalTime;
+-	bool ignore_schedd_limit;
+ 	int			num_idle_jobs;
+ 	time_t		startTime;
+ 	
+@@ -2006,6 +2048,18 @@ negotiateWithGroup ( int untrimmed_num_startds,
  	do {
  		spin_pie++;
  
@@ -100751,7 +101888,7 @@ index e4d3a89..bf28766 100644
  			// invalidate the MatchList cache, because even if it is valid
  			// for the next user+auto_cluster being considered, we might
  			// have thrown out matches due to SlotWeight being too high
-@@ -2028,7 +2040,7 @@ negotiateWithGroup ( int untrimmed_num_startds,
+@@ -2028,7 +2082,7 @@ negotiateWithGroup ( int untrimmed_num_startds,
  
  		calculatePieLeft(
  			scheddAds,
@@ -100760,7 +101897,7 @@ index e4d3a89..bf28766 100644
  			groupQuota,
  			groupusage,
  			maxPrioValue,
-@@ -2056,6 +2068,11 @@ negotiateWithGroup ( int untrimmed_num_startds,
+@@ -2056,6 +2110,11 @@ negotiateWithGroup ( int untrimmed_num_startds,
          // "schedd" seems to be used interchangeably with "submitter" here
  		while( (schedd = scheddAds.Next()) )
  		{
@@ -100772,7 +101909,7 @@ index e4d3a89..bf28766 100644
  			// get the name of the submitter and address of the schedd-daemon it came from
  			if( !schedd->LookupString( ATTR_NAME, scheddName ) ||
  				!schedd->LookupString( ATTR_SCHEDD_IP_ADDR, scheddAddr ) )
-@@ -2100,7 +2117,7 @@ negotiateWithGroup ( int untrimmed_num_startds,
+@@ -2100,7 +2159,7 @@ negotiateWithGroup ( int untrimmed_num_startds,
  
  			calculateSubmitterLimit(
  				scheddName.Value(),
@@ -100781,7 +101918,7 @@ index e4d3a89..bf28766 100644
  				groupQuota,
  				groupusage,
  				maxPrioValue,
-@@ -2184,11 +2201,6 @@ negotiateWithGroup ( int untrimmed_num_startds,
+@@ -2184,11 +2243,6 @@ negotiateWithGroup ( int untrimmed_num_startds,
  				if ( (submitterLimit <= 0 || pieLeft < minSlotWeight) && spin_pie > 1 ) {
  					result = MM_RESUME;
  				} else {
@@ -100793,7 +101930,16 @@ index e4d3a89..bf28766 100644
  					int numMatched = 0;
  					startTime = time(NULL);
  					double limitUsed = 0.0;
-@@ -2247,7 +2259,6 @@ negotiateWithGroup ( int untrimmed_num_startds,
+@@ -2200,7 +2254,7 @@ negotiateWithGroup ( int untrimmed_num_startds,
+ 					result=negotiate( scheddName.Value(),schedd,submitterPrio,
+ 								  submitterAbsShare, submitterLimit,
+ 								  startdAds, claimIds, 
+-								  scheddVersion, ignore_schedd_limit,
++								  scheddVersion, ignore_submitter_limit,
+ 								  startTime, numMatched, limitUsed, pieLeft);
+ 					updateNegCycleEndTime(startTime, schedd);
+ 				}
+@@ -2247,7 +2301,6 @@ negotiateWithGroup ( int untrimmed_num_startds,
  		scheddAds.Close();
  		dprintf( D_FULLDEBUG, " resources used scheddUsed= %f\n",scheddUsed);
  
@@ -100801,7 +101947,7 @@ index e4d3a89..bf28766 100644
  	} while ( ( pieLeft < pieLeftOrig || scheddAds.MyLength() < scheddAdsCountOrig )
  			  && (scheddAds.MyLength() > 0)
  			  && (startdAds.MyLength() > 0) );
-@@ -2570,6 +2581,25 @@ obtainAdsFromCollector (
+@@ -2570,6 +2623,25 @@ obtainAdsFromCollector (
  				// CRUFT: Before 7.3.2, submitter ads had a MyType of
  				//   "Scheduler". The only way to tell the difference
  				//   was that submitter ads didn't have ATTR_NUM_USERS.
@@ -100827,7 +101973,7 @@ index e4d3a89..bf28766 100644
      		ad->Assign(ATTR_TOTAL_TIME_IN_CYCLE, 0);
  			scheddAds.Insert(ad);
  		}
-@@ -2600,7 +2630,6 @@ obtainAdsFromCollector (
+@@ -2600,7 +2672,6 @@ obtainAdsFromCollector (
  void
  Matchmaker::OptimizeMachineAdForMatchmaking(ClassAd *ad)
  {
@@ -100835,7 +101981,7 @@ index e4d3a89..bf28766 100644
  		// The machine ad will be passed as the RIGHT ad during
  		// matchmaking (i.e. in the call to IsAMatch()), so
  		// optimize it accordingly.
-@@ -2613,13 +2642,11 @@ Matchmaker::OptimizeMachineAdForMatchmaking(ClassAd *ad)
+@@ -2613,13 +2684,11 @@ Matchmaker::OptimizeMachineAdForMatchmaking(ClassAd *ad)
  			name.Value(),
  				error_msg.c_str());
  	}
@@ -100849,7 +101995,7 @@ index e4d3a89..bf28766 100644
  		// The job ad will be passed as the LEFT ad during
  		// matchmaking (i.e. in the call to IsAMatch()), so
  		// optimize it accordingly.
-@@ -2634,7 +2661,6 @@ Matchmaker::OptimizeJobAdForMatchmaking(ClassAd *ad)
+@@ -2634,7 +2703,6 @@ Matchmaker::OptimizeJobAdForMatchmaking(ClassAd *ad)
  				proc_id,
  				error_msg.c_str());
  	}
@@ -100857,7 +102003,15 @@ index e4d3a89..bf28766 100644
  }
  
  void
-@@ -2921,7 +2947,7 @@ negotiate( char const *scheddName, const ClassAd *scheddAd, double priority, dou
+@@ -2808,6 +2876,7 @@ negotiate( char const *scheddName, const ClassAd *scheddAd, double priority, dou
+ 		// It also performs the important function of draining out
+ 		// any reschedule requests queued up on our command socket, so
+ 		// we do not negotiate over & over unnecesarily.
++
+ 		daemonCore->ServiceCommandSocket();
+ 
+ 		currentTime = time(NULL);
+@@ -2921,7 +2990,7 @@ negotiate( char const *scheddName, const ClassAd *scheddAd, double priority, dou
  		request.Assign(ATTR_SUBMITTER_USER_PRIO , (float)priority );  
  		// next insert the submitter user usage attributes into the request
  		request.Assign(ATTR_SUBMITTER_USER_RESOURCES_IN_USE, 
@@ -100866,7 +102020,7 @@ index e4d3a89..bf28766 100644
  		float temp_groupQuota, temp_groupUsage;
  		bool is_group = false;
  		if (getGroupInfoFromUserId(scheddName,temp_groupQuota,temp_groupUsage))
-@@ -3759,9 +3785,7 @@ matchmakingProtocol (ClassAd &request, ClassAd *offer,
+@@ -3759,9 +3828,7 @@ matchmakingProtocol (ClassAd &request, ClassAd *offer,
  		claim_id = "null";
  	}
  
@@ -100876,7 +102030,7 @@ index e4d3a89..bf28766 100644
  
  	savedRequirements = NULL;
  	length = strlen("Saved") + strlen(ATTR_REQUIREMENTS) + 2;
-@@ -4090,7 +4114,7 @@ addRemoteUserPrios( ClassAd	*ad )
+@@ -4090,7 +4157,7 @@ addRemoteUserPrios( ClassAd	*ad )
  		prio = (float) accountant.GetPriority( remoteUser.Value() );
  		ad->Assign(ATTR_REMOTE_USER_PRIO, prio);
  		ad->Assign(ATTR_REMOTE_USER_RESOURCES_IN_USE,
@@ -100885,7 +102039,7 @@ index e4d3a89..bf28766 100644
  		if (getGroupInfoFromUserId(remoteUser.Value(),
  									temp_groupQuota,temp_groupUsage))
  		{
-@@ -4142,7 +4166,7 @@ addRemoteUserPrios( ClassAd	*ad )
+@@ -4142,7 +4209,7 @@ addRemoteUserPrios( ClassAd	*ad )
  			buffer.sprintf("%s%s", slot_prefix.Value(), 
  					ATTR_REMOTE_USER_RESOURCES_IN_USE);
  			ad->Assign(buffer.Value(),
@@ -100895,10 +102049,18 @@ index e4d3a89..bf28766 100644
  										temp_groupQuota,temp_groupUsage))
  			{
 diff --git a/src/condor_negotiator.V6/matchmaker.h b/src/condor_negotiator.V6/matchmaker.h
-index e0d647b..2b01ff5 100644
+index e0d647b..95a0193 100644
 --- a/src/condor_negotiator.V6/matchmaker.h
 +++ b/src/condor_negotiator.V6/matchmaker.h
-@@ -175,7 +175,7 @@ class Matchmaker : public Service
+@@ -63,6 +63,7 @@ struct GroupEntry {
+     // current usage information coming into this negotiation cycle
+     double usage;
+     ClassAdList* submitterAds;
++    double priority;
+ 
+     // slot quota as computed by HGQ
+     double quota;
+@@ -175,7 +176,7 @@ class Matchmaker : public Service
  								 double minSlotWeight,
  			ClassAdListDoesNotDeleteAds& startdAds, 
  			ClaimIdHash& claimIds, ClassAdListDoesNotDeleteAds& scheddAds, 
@@ -100907,11 +102069,212 @@ index e0d647b..2b01ff5 100644
  
  		
  		ClassAd *matchmakingAlgorithm(const char*,const char*,ClassAd&,ClassAdListDoesNotDeleteAds&,
+diff --git a/src/condor_power/CMakeLists.txt b/src/condor_power/CMakeLists.txt
+index cbe2175..22b2bda 100644
+--- a/src/condor_power/CMakeLists.txt
++++ b/src/condor_power/CMakeLists.txt
+@@ -20,7 +20,7 @@ if(NOT WIN_EXEC_NODE_ONLY)
+ 
+ 	condor_exe( condor_power "power.cpp" ${C_BIN} "${CONDOR_TOOL_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${CLASSADS_FOUND};${COREDUMPER_FOUND}" OFF )
+ 
+-	condor_exe( power_state "power_state.cpp" ${C_LIBEXEC} "${CONDOR_TOOL_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${CLASSADS_FOUND};${COREDUMPER_FOUND}" OFF )
++	condor_exe( condor_power_state "power_state.cpp" ${C_LIBEXEC} "${CONDOR_TOOL_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${CLASSADS_FOUND};${COREDUMPER_FOUND}" OFF )
+ 
+ 	condor_selective_glob( "rooster*" ROOSTER )
+ 
+diff --git a/src/condor_privsep/switchboard.unix.cpp b/src/condor_privsep/switchboard.unix.cpp
+index 863ee71..83c90ac 100644
+--- a/src/condor_privsep/switchboard.unix.cpp
++++ b/src/condor_privsep/switchboard.unix.cpp
+@@ -820,11 +820,6 @@ static void do_mkdir(configuration *c)
+ 
+     dir_name = do_common_dir_cmd_tasks(c, &dir_cmd_conf, 0, 0);
+ 
+-    r = mkdir(dir_name, 0755);
+-    if (r == -1) {
+-        fatal_error_exit(1, "error creating directory %s", dir_name);
+-    }
+-
+     uid = dir_cmd_conf.user_uid;
+     r = safe_switch_effective_to_uid(uid,
+                                      &c->valid_target_uids,
+@@ -846,6 +841,11 @@ static void do_mkdir(configuration *c)
+         fatal_error_exit(1, "error switching user to root");
+     }
+ 
++    r = mkdir(dir_name, 0755);
++    if (r == -1) {
++        fatal_error_exit(1, "error creating directory %s", dir_name);
++    }
++
+     r = chown(dir_name, uid, gid);
+     if (r == -1) {
+         fatal_error_exit(1, "error chown'ing dir (%s) to uid=%lu gid=%lu",
 diff --git a/src/condor_procapi/procapi.cpp b/src/condor_procapi/procapi.cpp
-index fcb28fa..bee8e36 100644
+index fcb28fa..5003ada 100644
 --- a/src/condor_procapi/procapi.cpp
 +++ b/src/condor_procapi/procapi.cpp
-@@ -492,12 +492,6 @@ ProcAPI::getProcInfoRaw( pid_t pid, procInfoRaw& procRaw, int &status )
+@@ -163,6 +163,10 @@ ProcAPI::getProcInfo( pid_t pid, piPTR& pi, int &status )
+ 	pi->birthday    = procRaw.creation_time;
+ 	pi->imgsize	= procRaw.imgsize;    // already in k!
+ 	pi->rssize	= procRaw.rssize;  // already in k!
++#if HAVE_PSS
++	pi->pssize = procRaw.pssize;
++	pi->pssize_available = procRaw.pssize_available;
++#endif
+ 	pi->user_time= procRaw.user_time_1;
+ 	pi->sys_time = procRaw.sys_time_1;
+ 	
+@@ -177,6 +181,7 @@ ProcAPI::getProcInfo( pid_t pid, piPTR& pi, int &status )
+ /* Fills ProcInfoRaw with the following units:
+    imgsize		: KB
+    rssize		: KB
++   pssize		: KB
+    minfault		: total minor faults
+    majfault		: total major faults
+    user_time_1	: seconds
+@@ -251,6 +256,9 @@ ProcAPI::getProcInfoRaw( pid_t pid, procInfoRaw& procRaw, int &status )
+ 	// grab the information out of what the kernel told us. 
+ 	procRaw.imgsize	= psinfo.pr_size;
+ 	procRaw.rssize	= psinfo.pr_rssize;
++#if HAVE_PSS
++#error PSS not implemented on this platform
++#endif
+ 	procRaw.pid		= psinfo.pr_pid;
+ 	procRaw.ppid	= psinfo.pr_ppid;
+ 	procRaw.creation_time = psinfo.pr_start.tv_sec;
+@@ -377,8 +385,16 @@ ProcAPI::getProcInfo( pid_t pid, piPTR& pi, int &status )
+ 		*/
+ 	pi->imgsize = procRaw.imgsize / 1024;  //bytes to k
+ 	pi->rssize = procRaw.rssize * pagesize;  // pages to k
++#if HAVE_PSS
++	pi->pssize = procRaw.pssize; // k
++	pi->pssize_available = procRaw.pssize_available;
++#endif
+ 	if ((procRaw.proc_flags & 64) && procRaw.ppid != 1) { //64 == PF_FORKNOEXEC
+ 		//zero out memory usage
++		// But do not zero out pssize, because it correctly deals with
++		// sharing between processes.  Also, if the linux version is
++		// modern enough to support PSS, there should be no need to
++		// ignore threads that look like processes.
+ 		pi->imgsize = 0;
+ 		pi->rssize = 0;
+ 	}
+@@ -459,9 +475,113 @@ ProcAPI::getProcInfo( pid_t pid, piPTR& pi, int &status )
+ 	return PROCAPI_SUCCESS;
+ }
+ 
++#if HAVE_PSS
++int
++ProcAPI::getPSSInfo( pid_t pid, procInfoRaw& procRaw, int &status ) 
++{
++	char path[64];
++	FILE *fp;
++	int number_of_attempts;
++	const int max_attempts = 5;
++
++		// Note that HAVE_PSS may be true at compile-time, but that
++		// does not mean /proc/pid/smaps will actually contain
++		// Pss info at run-time.  Therefore, we do not treat missing
++		// Pss info as an error in this function.
++
++	sprintf( path, "/proc/%d/smaps", pid );
++	number_of_attempts = 0;
++	while (number_of_attempts < max_attempts) {
++
++		number_of_attempts++;
++
++		// in case I must restart, assume that everything is ok again...
++		status = PROCAPI_OK;
++		procRaw.pssize = 0;
++		procRaw.pssize_available = false;
++
++		if( (fp = safe_fopen_wrapper(path, "r")) == NULL ) {
++			if( errno == ENOENT ) {
++				// /proc/pid doesn't exist
++				// This system may simply not support smaps, so
++				// don't treat this as an error.  We just won't
++				// set pssize_available = true.
++				status = PROCAPI_OK;
++				dprintf( D_FULLDEBUG, 
++					"ProcAPI::getProcInfo() %s does not exist.\n", path );
++				break;
++			} else if ( errno == EACCES ) {
++				status = PROCAPI_PERM;
++				dprintf( D_FULLDEBUG, 
++					"ProcAPI::getProcInfo() No permission to open %s.\n", 
++					 path );
++				break;
++			} else { 
++				status = PROCAPI_UNSPECIFIED;
++				dprintf( D_ALWAYS, 
++					"ProcAPI::getProcInfo() Error opening %s, errno: %d.\n", 
++					 path, errno );
++			}
++
++			// immediate failure, try again.
++			continue;
++		}
++
++		char buf[512];
++		while( fgets(buf,sizeof(buf)-1,fp) ) {
++			buf[sizeof(buf)-2] = '\0'; // ensure null termination
++
++			if( strncmp(buf,"Pss:",4)==0 ) {
++				char const *s = buf+4;
++				while( isspace(*s) ) {
++					s++;
++				}
++				char *endptr = NULL;
++				unsigned long pssize = (unsigned long)strtol(s,&endptr,10);
++				if( !endptr || endptr == s ) {
++					dprintf(D_FULLDEBUG,"Unexpted Pss value in %s: %s",path,buf);
++					break;
++				}
++				while( isspace(*endptr) ) {
++					endptr++;
++				}
++				if( strncmp(endptr,"kB",2)!=0 ) {
++					dprintf(D_FULLDEBUG,"Unexpted Pss units in %s: %s",path,buf);
++					break;
++				}
++
++				procRaw.pssize += pssize;
++				procRaw.pssize_available = true;
++			}
++		}
++
++		if( !ferror(fp) ) {
++			break;
++		}
++
++			// we encountered a read error
++		status = PROCAPI_UNSPECIFIED;
++		dprintf( D_ALWAYS, 
++				 "ProcAPI: Unexpected error on %s, errno: %d.\n", 
++				 path, errno );
++
++			// don't leak for the next attempt;
++		fclose( fp );
++		fp = NULL;
++
++	} 	// end of while number_of_attempts < 0
++
++	if (fp != NULL) {
++		fclose( fp );
++		fp = NULL;
++	}
++}
++#endif
++
+ /* Fills in procInfoRaw with the following units:
+    imgsize		: bytes
+    rssize		: pages
++   pssize       : k
+    minfault		: total minor faults
+    majfault		: total major faults
+    user_time_1	: jiffies (1/100 of a second)
+@@ -492,12 +612,6 @@ ProcAPI::getProcInfoRaw( pid_t pid, procInfoRaw& procRaw, int &status )
  		// assume success
  	status = PROCAPI_OK;
  
@@ -100924,7 +102287,7 @@ index fcb28fa..bee8e36 100644
  	// read the entry a certain number of times since it appears that linux
  	// often simply does something stupid while reading.
  	sprintf( path, "/proc/%d/stat", pid );
-@@ -508,7 +502,10 @@ ProcAPI::getProcInfoRaw( pid_t pid, procInfoRaw& procRaw, int &status )
+@@ -508,7 +622,10 @@ ProcAPI::getProcInfoRaw( pid_t pid, procInfoRaw& procRaw, int &status )
  
  		// in case I must restart, assume that everything is ok again...
  		status = PROCAPI_OK;
@@ -100935,6 +102298,182 @@ index fcb28fa..bee8e36 100644
  
  		if( (fp = safe_fopen_wrapper(path, "r")) == NULL ) {
  			if( errno == ENOENT ) {
+@@ -601,6 +718,13 @@ ProcAPI::getProcInfoRaw( pid_t pid, procInfoRaw& procRaw, int &status )
+ 		// close the file
+ 	fclose( fp );
+ 
++#if HAVE_PSS
++	getPSSInfo(pid,procRaw,status);
++	if( status != PROCAPI_OK ) {
++		return PROCAPI_FAILURE;
++	}
++#endif
++
+ 		// only one value for times
+ 	procRaw.user_time_2 = 0;
+ 	procRaw.sys_time_2 = 0;
+diff --git a/src/condor_procapi/procapi.h b/src/condor_procapi/procapi.h
+index 0713a82..7936e65 100644
+--- a/src/condor_procapi/procapi.h
++++ b/src/condor_procapi/procapi.h
+@@ -208,6 +208,14 @@ struct procInfo {
+   /// the resident set size, in k.  on WinNT, it is peak working set size.
+   unsigned long rssize;       
+ 
++  /** The proportional set size (PSS) is the image size in k divided
++      by number of processes sharing each page.  If pssize information
++      is not available, pssize_available is false; o.w. true. */
++#if HAVE_PSS
++  unsigned long pssize;
++  bool pssize_available;
++#endif
++
+   /** The number of minor page faults generated per second.  
+       The definition of "minor" is "those which have not required 
+       loading a memory page from disk"  Therefore, the page was
+@@ -296,6 +304,11 @@ typedef struct procInfoRaw{
+ 	__int64 rssize;
+ #endif
+ 
++#if HAVE_PSS
++	unsigned long pssize;
++	bool pssize_available;
++#endif
++
+ 	long minfault;
+ 	long majfault;
+ 	pid_t pid;
+@@ -570,6 +583,10 @@ class ProcAPI {
+   static void initProcInfoRaw(procInfoRaw& procRaw);
+ 
+   
++#if HAVE_PSS
++  static int getPSSInfo( pid_t pid, procInfoRaw& procRaw, int &status );
++#endif
++
+ 	  /**
+ 		 Generates a control time by which a process birthday can be
+ 		 shifted in case of time shifting due to ntpd or the admin.
+diff --git a/src/condor_procapi/procapi_faminfo_t.cpp b/src/condor_procapi/procapi_faminfo_t.cpp
+index 7acac26..5c8cbb0 100644
+--- a/src/condor_procapi/procapi_faminfo_t.cpp
++++ b/src/condor_procapi/procapi_faminfo_t.cpp
+@@ -101,7 +101,15 @@ int getFamilyInfo_test(bool verbose) {
+       printf("imgsize %d as returned by getFamilyInfo is less than rssize %d\n", pi->imgsize, pi->rssize);
+       success = -1;
+     }
+-    
++
++#if HAVE_PSS
++		// the proportional set size should be <= the image size
++	if( pi->pssize_available && pi->pssize > pi->imgsize ) {
++      printf("Error process %d:\n", pid);
++      printf("imgsize %d as returned by getFamilyInfo is less than pssize %d\n", pi->imgsize, pi->pssize);
++      success = -1;
++	}
++#endif
+ 
+     // now get the parents info and do some more checks
+     if(ProcAPI::getFamilyInfo(ppid, ppi, &penvid, status) == PROCAPI_FAILURE) {
+@@ -120,6 +128,13 @@ int getFamilyInfo_test(bool verbose) {
+       printf("Error process %d:\n", pid);
+       printf("parent family imgsize %d is smaller than childs %d\n", ppi->imgsize, pi->imgsize); 
+     }
++#if HAVE_PSS
++    //same for pssize
++    if(pi->pssize_available && ppi->pssize_available && pi->pssize > ppi->pssize){
++      printf("Error process %d:\n", pid);
++      printf("parent family pssize %d is smaller than childs %d\n", ppi->pssize, pi->pssize); 
++    }
++#endif
+     //and age
+     if(pi->age > ppi->age){
+       printf("Error process %d:\n", pid);
+diff --git a/src/condor_procapi/procapi_getproc_t.cpp b/src/condor_procapi/procapi_getproc_t.cpp
+index 047463d..d2ae191 100644
+--- a/src/condor_procapi/procapi_getproc_t.cpp
++++ b/src/condor_procapi/procapi_getproc_t.cpp
+@@ -98,6 +98,15 @@ int getProcInfo_test(bool verbose) {
+       success = -1;
+     }
+ 
++#if HAVE_PSS
++    // the image size should be >= the proportional set size
++    if(pi->pssize > pi->imgsize){
++      printf("Error process %d:\n", pid);
++      printf("imgsize %lu as returned by getProcInfo is less than pssize %lu\n", pi->imgsize, pi->pssize);
++      success = -1;
++    }
++#endif
++
+     // time in user mode + system mode should not be greater then age
+     if((pi->user_time + pi->sys_time) > pi->age){
+       printf("Error process %d:\n", pid);
+diff --git a/src/condor_procapi/procapi_killfamily.cpp b/src/condor_procapi/procapi_killfamily.cpp
+index f6b475a..f8a8d44 100644
+--- a/src/condor_procapi/procapi_killfamily.cpp
++++ b/src/condor_procapi/procapi_killfamily.cpp
+@@ -764,6 +764,9 @@ ProcAPI::multiInfo( pid_t *pidlist, int numpids, piPTR &pi ) {
+ 				/ 1024;
+ 			pi->rssize   += (long) (*((long*)(ctrblk + offsets->rssize  ))) 
+ 				/ 1024;
++#if HAVE_PSS
++#error pssize not handled for this platform
++#endif
+ 			pi->user_time+= (long) (LI_to_double( ut ) / objectFrequency);
+ 			pi->sys_time += (long) (LI_to_double( st ) / objectFrequency);
+ 			/* we put the actual ag in here for do_usage_sampling
+@@ -866,6 +869,12 @@ ProcAPI::getProcSetInfo( pid_t *pids, int numpids, piPTR& pi, int &status )
+ 
+ 				pi->imgsize   += temp->imgsize;
+ 				pi->rssize    += temp->rssize;
++#if HAVE_PSS
++				if( temp->pssize_available ) {
++					pi->pssize_available = true;
++					pi->pssize    += temp->pssize;
++				}
++#endif
+ 				pi->minfault  += temp->minfault;
+ 				pi->majfault  += temp->majfault;
+ 				pi->user_time += temp->user_time;
+diff --git a/src/condor_procapi/procapi_set_t.cpp b/src/condor_procapi/procapi_set_t.cpp
+index 9b5342c..bf6e73c 100644
+--- a/src/condor_procapi/procapi_set_t.cpp
++++ b/src/condor_procapi/procapi_set_t.cpp
+@@ -103,6 +103,16 @@ int getProcSetInfo_test(bool verbose) {
+     success = -1;
+   }
+ 
++#if HAVE_PSS
++  temp = pi_f->rssize;
++  if(pi_s->pssize < temp - temp * SET_INFO_RSS_MARGIN||
++     pi_s->pssize > temp + temp * SET_INFO_RSS_MARGIN){
++    printf("Error:\n");
++    printf("set info pss %d does not equal family info pss %d\n", pi_s->pssize, pi_f->pssize);
++    success = -1;
++  }
++#endif
++
+   temp = pi_f->imgsize;
+   if(pi_s->imgsize < temp - temp * SET_INFO_IMG_MARGIN||
+      pi_s->imgsize > temp + temp * SET_INFO_IMG_MARGIN){
+diff --git a/src/condor_procapi/procinterface.cpp b/src/condor_procapi/procinterface.cpp
+index 496ce98..8ef6969 100644
+--- a/src/condor_procapi/procinterface.cpp
++++ b/src/condor_procapi/procinterface.cpp
+@@ -100,6 +100,12 @@ ClassAd * ProcAd::dumpToAd( piPTR pi ) {
+   ad->Insert(line);
+   sprintf ( line, "RESIDENT_SET_SIZE = %ld", (long)pi->rssize );
+   ad->Insert(line);
++#if HAVE_PSS
++  if( pi->pssize_available ) {
++	  sprintf ( line, "PROPORTIONAL_SET_SIZE = %ld", (long)pi->pssize );
++	  ad->Insert(line);
++  }
++#endif
+   sprintf ( line, "MAJOR_PAGE_FAULTS = %ld", (long)pi->majfault );
+   ad->Insert(line);
+   sprintf ( line, "MINOR_PAGE_FAULTS = %ld", (long)pi->minfault );
 diff --git a/src/condor_procd/CMakeLists.txt b/src/condor_procd/CMakeLists.txt
 index df2d726..c2e0972 100644
 --- a/src/condor_procd/CMakeLists.txt
@@ -101179,7 +102718,7 @@ index 9c0a14d..f46f4ed 100644
  {
  }
 diff --git a/src/condor_procd/proc_family.cpp b/src/condor_procd/proc_family.cpp
-index b4d59e5..90c4c08 100644
+index b4d59e5..684e9171 100644
 --- a/src/condor_procd/proc_family.cpp
 +++ b/src/condor_procd/proc_family.cpp
 @@ -27,6 +27,27 @@
@@ -101222,7 +102761,7 @@ index b4d59e5..90c4c08 100644
  }
  
  ProcFamily::~ProcFamily()
-@@ -70,8 +96,654 @@ ProcFamily::~ProcFamily()
+@@ -70,8 +96,658 @@ ProcFamily::~ProcFamily()
  		free(m_proxy);
  	}
  #endif
@@ -101264,8 +102803,8 @@ index b4d59e5..90c4c08 100644
 +			cg_string, m_root_pid);
 +	}
 +	cgroup_free(&dcg);
- }
- 
++}
++
 +int
 +ProcFamily::migrate_to_cgroup(pid_t pid)
 +{
@@ -101386,34 +102925,38 @@ index b4d59e5..90c4c08 100644
 +	// Initialize library and data structures
 +	if (m_cgroup_initialized == false) {
 +		dprintf(D_PROCFAMILY, "Initializing cgroup library.\n");
-+		m_cgroup_freezer_mounted = true;
-+		m_cgroup_memory_mounted = true;
-+		m_cgroup_cpuacct_mounted = true;
-+		m_cgroup_block_mounted = true;
 +		cgroup_init();
 +		void *handle;
 +		controller_data info;
 +		int ret = cgroup_get_all_controller_begin(&handle, &info);
 +		while (ret == 0) {
-+			if ((strcmp(info.name, MEMORY_CONTROLLER) == 0) && (info.hierarchy == 0)) {
-+				dprintf(D_ALWAYS, "Cgroup controller for memory accounting is not mounted; memory accounting will be inaccurate.\n");
-+				m_cgroup_memory_mounted = false;
-+			} else if ((strcmp(info.name, CPUACCT_CONTROLLER) == 0) && (info.hierarchy == 0)) {
-+				dprintf(D_ALWAYS, "Cgroup controller for CPU accounting is not mounted; cpu accounting will be inaccurate.\n");
-+				m_cgroup_cpuacct_mounted = false;
-+			} else if ((strcmp(info.name, FREEZE_CONTROLLER) == 0) && (info.hierarchy == 0)) {
-+				dprintf(D_ALWAYS, "Cgroup controller for process management is not mounted; process termination will be inaccurate.\n");
-+				m_cgroup_freezer_mounted = false;
-+			} else if ((strcmp(info.name, BLOCK_CONTROLLER) == 0) && (info.hierarchy == 0)) {
-+				dprintf(D_ALWAYS, "Cgroup controller for I/O statistics is not mounted; accounting will be inaccurate.\n");
-+				m_cgroup_block_mounted = false;
++			if (strcmp(info.name, MEMORY_CONTROLLER) == 0) {
++				m_cgroup_memory_mounted = (info.hierarchy != 0);
++			} else if (strcmp(info.name, CPUACCT_CONTROLLER) == 0) {
++				m_cgroup_cpuacct_mounted = (info.hierarchy != 0);
++			} else if (strcmp(info.name, FREEZE_CONTROLLER) == 0) {
++				m_cgroup_freezer_mounted = (info.hierarchy != 0);
++			} else if (strcmp(info.name, BLOCK_CONTROLLER) == 0) {
++				m_cgroup_block_mounted = (info.hierarchy != 0);
 +			}
 +			ret = cgroup_get_all_controller_next(&handle, &info);
 +		}
++		cgroup_get_all_controller_end(&handle);
++		if (!m_cgroup_block_mounted) {
++			dprintf(D_ALWAYS, "Cgroup controller for I/O statistics is not mounted; accounting will be inaccurate.\n");
++		}
++		if (!m_cgroup_freezer_mounted) {
++			dprintf(D_ALWAYS, "Cgroup controller for process management is not mounted; process termination will be inaccurate.\n");
++		}
++		if (!m_cgroup_cpuacct_mounted) {
++			dprintf(D_ALWAYS, "Cgroup controller for CPU accounting is not mounted; cpu accounting will be inaccurate.\n");
++		}
++		if (!m_cgroup_memory_mounted) {
++			dprintf(D_ALWAYS, "Cgroup controller for memory accounting is not mounted; memory accounting will be inaccurate.\n");
++		}
 +		if (ret != ECGEOF) {
 +			dprintf(D_ALWAYS, "Error iterating through cgroups mount information: %s\n", cgroup_strerror(ret));
 +		}
-+		cgroup_get_all_controller_end(&handle);
 +
 +	}
 +
@@ -101524,8 +103067,8 @@ index b4d59e5..90c4c08 100644
 +	}
 +
 +	return 0;
-+}
-+
+ }
+ 
 +int
 +ProcFamily::freezer_cgroup(const char * state)
 +{
@@ -101877,7 +103420,20 @@ index b4d59e5..90c4c08 100644
  unsigned long
  ProcFamily::update_max_image_size(unsigned long children_imgsize)
  {
-@@ -140,6 +812,13 @@ ProcFamily::aggregate_usage(ProcFamilyUsage* usage)
+@@ -128,6 +804,12 @@ ProcFamily::aggregate_usage(ProcFamilyUsage* usage)
+ 		//
+ 		usage->total_image_size += member->m_proc_info->imgsize;
+ 		usage->total_resident_set_size += member->m_proc_info->rssize;
++#if HAVE_PSS
++		if( member->m_proc_info->pssize_available ) {
++			usage->total_proportional_set_size_available = true;
++			usage->total_proportional_set_size += member->m_proc_info->pssize;
++		}
++#endif
+ 
+ 		// number of alive processes
+ 		//
+@@ -140,6 +822,13 @@ ProcFamily::aggregate_usage(ProcFamilyUsage* usage)
  	//
  	usage->user_cpu_time += m_exited_user_cpu_time;
  	usage->sys_cpu_time += m_exited_sys_cpu_time;
@@ -101891,7 +103447,7 @@ index b4d59e5..90c4c08 100644
  }
  
  void
-@@ -157,6 +836,12 @@ ProcFamily::signal_root(int sig)
+@@ -157,6 +846,12 @@ ProcFamily::signal_root(int sig)
  void
  ProcFamily::spree(int sig)
  {
@@ -101904,7 +103460,7 @@ index b4d59e5..90c4c08 100644
  	ProcFamilyMember* member;
  	for (member = m_member_list; member != NULL; member = member->m_next) {
  #if !defined(WIN32)
-@@ -188,6 +873,13 @@ ProcFamily::add_member(procInfo* pi)
+@@ -188,6 +883,13 @@ ProcFamily::add_member(procInfo* pi)
  	}
  	m_member_list = member;
  
@@ -102075,7 +103631,7 @@ index 5377978..29208f0 100644
  
  // helper for looking up error strings
 diff --git a/src/condor_procd/proc_family_io.h b/src/condor_procd/proc_family_io.h
-index 511af61..75b0b77 100644
+index 511af61..405e22e 100644
 --- a/src/condor_procd/proc_family_io.h
 +++ b/src/condor_procd/proc_family_io.h
 @@ -43,7 +43,8 @@ enum proc_family_command_t {
@@ -102096,12 +103652,16 @@ index 511af61..75b0b77 100644
  	PROC_FAMILY_ERROR_MAX
  };
  
-@@ -83,8 +85,11 @@ struct ProcFamilyUsage {
+@@ -83,8 +85,15 @@ struct ProcFamilyUsage {
  	double        percent_cpu;
  	unsigned long max_image_size;
  	unsigned long total_image_size;
 -    unsigned long total_resident_set_size;
 +	unsigned long total_resident_set_size;
++#if HAVE_PSS
++    unsigned long total_proportional_set_size;
++    bool total_proportional_set_size_available;
++#endif
  	int           num_procs;
 +	// These are signed so a negative number indicates uninitialized
 +	long          block_read_bytes;
@@ -102110,7 +103670,7 @@ index 511af61..75b0b77 100644
  
  // structures for retrieving a state dump from the ProcD
 diff --git a/src/condor_procd/proc_family_monitor.cpp b/src/condor_procd/proc_family_monitor.cpp
-index fc342cb..c643472 100644
+index fc342cb..ac1535b 100644
 --- a/src/condor_procd/proc_family_monitor.cpp
 +++ b/src/condor_procd/proc_family_monitor.cpp
 @@ -33,6 +33,10 @@
@@ -102205,19 +103765,23 @@ index fc342cb..c643472 100644
  	// initialized
  	//
  	if (!glexec_kill_check()) {
-@@ -466,7 +514,10 @@ ProcFamilyMonitor::get_family_usage(pid_t pid, ProcFamilyUsage* usage)
+@@ -466,7 +514,14 @@ ProcFamilyMonitor::get_family_usage(pid_t pid, ProcFamilyUsage* usage)
  	usage->sys_cpu_time = 0;
  	usage->percent_cpu = 0.0;
  	usage->total_image_size = 0;
 -    usage->total_resident_set_size = 0;
 +	usage->total_resident_set_size = 0;
++#if HAVE_PSS
++    usage->total_proportional_set_size = 0;
++    usage->total_proportional_set_size_available = false;
++#endif
 +	// We initialize these to -1 to distinguish the "cannot record" and "no I/O" cases.
 +	usage->block_read_bytes = -1;
 +	usage->block_write_bytes = -1;
  	usage->num_procs = 0;
  	get_family_usage(tree, usage);
  
-@@ -572,6 +623,11 @@ ProcFamilyMonitor::snapshot()
+@@ -572,6 +627,11 @@ ProcFamilyMonitor::snapshot()
  		m_group_tracker->find_processes(pi_list);
  	}
  #endif
@@ -102229,7 +103793,7 @@ index fc342cb..c643472 100644
  	m_login_tracker->find_processes(pi_list);
  	m_environment_tracker->find_processes(pi_list);
  	m_parent_tracker->find_processes(pi_list);
-@@ -865,6 +921,11 @@ ProcFamilyMonitor::unregister_subfamily(Tree<ProcFamily*>* tree)
+@@ -865,6 +925,11 @@ ProcFamilyMonitor::unregister_subfamily(Tree<ProcFamily*>* tree)
  		m_group_tracker->remove_mapping(tree->get_data());
  	}
  #endif
@@ -102527,7 +104091,7 @@ index 7c1372e..79e0634 100644
  	//
  	ProcFamilyServer server(monitor, local_server_address);
 diff --git a/src/condor_q.V6/queue.cpp b/src/condor_q.V6/queue.cpp
-index 201305c..8316beb 100644
+index 201305c..fc4c51c 100644
 --- a/src/condor_q.V6/queue.cpp
 +++ b/src/condor_q.V6/queue.cpp
 @@ -22,7 +22,6 @@
@@ -102566,7 +104130,27 @@ index 201305c..8316beb 100644
  			sqfp = show_queue;
  		} else {
  			sqfp = show_queue_buffered;
-@@ -1295,6 +1297,10 @@ processCommandLineArguments (int argc, char *argv[])
+@@ -707,7 +709,8 @@ int main (int argc, char **argv)
+ #ifdef HAVE_EXT_POSTGRESQL
+ 			case DIRECT_RDBMS:
+ 				if (useDB) {
+-					if (sqfp(quillName, dbIpAddr, dbName, queryPassword, TRUE ))
++					if ( (retval = sqfp(quillName, dbIpAddr, dbName, 
++										queryPassword, TRUE) ) )
+ 					{
+ 						/* processed correctly, so do the next ad */
+ 						continue;
+@@ -753,7 +756,8 @@ int main (int argc, char **argv)
+ 						didn't have a quill ad by that name. */
+ 
+ 					if((result2 == Q_OK) && quillAddr &&
+-			   			sqfp(quillAddr, quillName, quillMachine, NULL, FALSE))
++			   			(retval = sqfp(quillAddr, quillName, quillMachine, 
++									   NULL, FALSE) ) )
+ 					{
+ 						/* processed correctly, so do the next ad */
+ 						continue;
+@@ -1295,6 +1299,10 @@ processCommandLineArguments (int argc, char *argv[])
  			printf( "%s\n%s\n", CondorVersion(), CondorPlatform() );
  			exit(0);
          }
@@ -102577,7 +104161,7 @@ index 201305c..8316beb 100644
  		else {
  			fprintf( stderr, "Error: unrecognized argument -%s\n", arg );
  			usage(argv[0]);
-@@ -1861,6 +1867,7 @@ usage (const char *myName)
+@@ -1861,6 +1869,7 @@ usage (const char *myName)
  #else
  		"\t\t-direct <schedd>\tPerform a direct query to the schedd\n"
  #endif
@@ -102585,7 +104169,7 @@ index 201305c..8316beb 100644
  		"\t\t-version\t\tPrint the Condor Version and exit\n"
  		"\t\trestriction list\n"
  		"\twhere each restriction may be one of\n"
-@@ -1896,6 +1903,32 @@ output_sorter( const void * va, const void * vb ) {
+@@ -1896,6 +1905,32 @@ output_sorter( const void * va, const void * vb ) {
  	return 0;
  }
  
@@ -102618,7 +104202,7 @@ index 201305c..8316beb 100644
  /* The parameters v1, v2, and v3 will be intepreted immediately on the top 
     of the function based on the value of useDB. For more details, please 
     refer to the prototype of this function on the top of this file 
-@@ -2016,6 +2049,10 @@ show_queue_buffered( const char* v1, const char* v2, const char* v3, const char*
+@@ -2016,6 +2051,10 @@ show_queue_buffered( const char* v1, const char* v2, const char* v3, const char*
  		g_cur_schedd_for_process_buffer_line = NULL;
  	}
  
@@ -102629,7 +104213,7 @@ index 201305c..8316beb 100644
  	CondorError errstack;
  
  		/* get the job ads from database if database can be queried */
-@@ -2077,32 +2114,13 @@ show_queue_buffered( const char* v1, const char* v2, const char* v3, const char*
+@@ -2077,32 +2116,13 @@ show_queue_buffered( const char* v1, const char* v2, const char* v3, const char*
  	// If this is a global, don't print anything if this schedd is empty.
  	// If this is NOT global, print out the header and footer to show that we
  	//    did something.
@@ -102665,7 +104249,7 @@ index 201305c..8316beb 100644
  		}
  
  		if (!output_buffer_empty) {
-@@ -2158,7 +2176,7 @@ process_buffer_line( ClassAd *job )
+@@ -2158,7 +2178,7 @@ process_buffer_line( ClassAd *job )
  	int status = 0;
  
  	clusterProcString * tempCPS = new clusterProcString;
@@ -102674,7 +104258,7 @@ index 201305c..8316beb 100644
  	job->LookupInteger( ATTR_CLUSTER_ID, tempCPS->cluster );
  	job->LookupInteger( ATTR_PROC_ID, tempCPS->proc );
  	job->LookupInteger( ATTR_JOB_STATUS, status );
-@@ -2223,6 +2241,12 @@ process_buffer_line( ClassAd *job )
+@@ -2223,6 +2243,12 @@ process_buffer_line( ClassAd *job )
  		StringList *attr_white_list = attrs.isEmpty() ? NULL : &attrs;
  		job->sPrintAsXML(s,attr_white_list);
  		tempCPS->string = strnewp( s.Value() );
@@ -102687,7 +104271,7 @@ index 201305c..8316beb 100644
  	} else if( better_analyze ) {
  		tempCPS->string = strnewp( doRunAnalysisToBuffer( job, g_cur_schedd_for_process_buffer_line ) );
  	} else if ( show_io ) {
-@@ -2236,7 +2260,15 @@ process_buffer_line( ClassAd *job )
+@@ -2236,7 +2262,15 @@ process_buffer_line( ClassAd *job )
  		tempCPS->string = strnewp( bufferJobShort( job ) );
  	}
  
@@ -102871,10 +104455,29 @@ index 19395a2..fc6c89a 100644
              {
              RtlMoveMemory((void*)(_pszModuleName+1), (void*)(_pszModuleName),
 diff --git a/src/condor_schedd.V6/dedicated_scheduler.cpp b/src/condor_schedd.V6/dedicated_scheduler.cpp
-index 4418557..526940f 100644
+index 4418557..9e30965 100644
 --- a/src/condor_schedd.V6/dedicated_scheduler.cpp
 +++ b/src/condor_schedd.V6/dedicated_scheduler.cpp
-@@ -4247,27 +4247,71 @@ clusterSortByPrioAndDate( const void *ptr1, const void* ptr2 )
+@@ -3112,11 +3112,17 @@ DedicatedScheduler::AddMrec(
+ 	char const *remote_pool
+ )
+ {
++		// The dedicated scheduler expects the job id to not be set
++		// until this match is associated with a job.
++	PROC_ID empty_job_id;
++	empty_job_id.cluster = -1;
++	empty_job_id.proc = -1;
++
+ 		// Now, create a match_rec for this resource
+ 		// Note, we want to claim this startd as the
+ 		// "DedicatedScheduler" owner, which is why we call
+ 		// owner() here...
+-	match_rec *mrec = new match_rec( claim_id, startd_addr, &job_id,
++	match_rec *mrec = new match_rec( claim_id, startd_addr, &empty_job_id,
+ 									 match_ad,owner(),remote_pool,true);
+ 
+ 	match_rec *existing_mrec;
+@@ -4247,27 +4253,71 @@ clusterSortByPrioAndDate( const void *ptr1, const void* ptr2 )
  {
  	int cluster1 = *((const int*)ptr1);
  	int cluster2 = *((const int*)ptr2);
@@ -102973,7 +104576,7 @@ index 5b690ab..b613f94 100644
      int         status;
      int         qdate;
 diff --git a/src/condor_schedd.V6/qmgmt.cpp b/src/condor_schedd.V6/qmgmt.cpp
-index c3fbafd..3fae82a 100644
+index c3fbafd..dbaf3fb 100644
 --- a/src/condor_schedd.V6/qmgmt.cpp
 +++ b/src/condor_schedd.V6/qmgmt.cpp
 @@ -42,9 +42,8 @@
@@ -102987,7 +104590,15 @@ index c3fbafd..3fae82a 100644
  #include "condor_string.h" // for strnewp, etc.
  #include "utc_time.h"
  #include "condor_crontab.h"
-@@ -101,6 +100,7 @@ static time_t xact_start_time = 0;	// time at which the current transaction was
+@@ -57,6 +56,7 @@
+ #include "spool_version.h"
+ #include "condor_holdcodes.h"
+ #include "nullfile.h"
++#include "condor_url.h"
+ 
+ #if defined(WANT_CONTRIB) && defined(WITH_MANAGEMENT)
+ #if defined(HAVE_DLOPEN) || defined(WIN32)
+@@ -101,6 +101,7 @@ static time_t xact_start_time = 0;	// time at which the current transaction was
  static int cluster_initial_val = 1;		// first cluster number to use
  static int cluster_increment_val = 1;	// increment for cluster numbers of successive submissions 
  static int cluster_maximum_val = 0;     // maximum cluster id (default is 0, or 'no max')
@@ -102995,7 +104606,7 @@ index c3fbafd..3fae82a 100644
  
  static void AddOwnerHistory(const MyString &user);
  
-@@ -1748,6 +1748,7 @@ NewProc(int cluster_id)
+@@ -1748,6 +1749,7 @@ NewProc(int cluster_id)
  	JobQueue->NewClassAd(key, JOB_ADTYPE, STARTD_ADTYPE);
  
  	IncrementClusterSize(cluster_id);
@@ -103003,7 +104614,7 @@ index c3fbafd..3fae82a 100644
  
  		// now that we have a real job ad with a valid proc id, then
  		// also insert the appropriate GlobalJobId while we're at it.
-@@ -2321,18 +2322,6 @@ SetAttribute(int cluster_id, int proc_id, const char *attr_name,
+@@ -2321,18 +2323,6 @@ SetAttribute(int cluster_id, int proc_id, const char *attr_name,
  
  	if( round_param && *round_param && strcmp(round_param,"0") ) {
  		LexemeType attr_type = LX_EOF;
@@ -103022,7 +104633,7 @@ index c3fbafd..3fae82a 100644
  		ExprTree *tree = NULL;
  		classad::Value val;
  		if ( ParseClassAdRvalExpr(attr_value, tree) == 0 &&
-@@ -2345,7 +2334,6 @@ SetAttribute(int cluster_id, int proc_id, const char *attr_name,
+@@ -2345,7 +2335,6 @@ SetAttribute(int cluster_id, int proc_id, const char *attr_name,
  			}
  		}
  		delete tree;
@@ -103030,7 +104641,7 @@ index c3fbafd..3fae82a 100644
  
  		if ( attr_type == LX_INTEGER || attr_type == LX_FLOAT ) {
  			// first, store the actual value
-@@ -2366,18 +2354,10 @@ SetAttribute(int cluster_id, int proc_id, const char *attr_name,
+@@ -2366,18 +2355,10 @@ SetAttribute(int cluster_id, int proc_id, const char *attr_name,
  			double fvalue;
  
  			if ( attr_type == LX_INTEGER ) {
@@ -103049,7 +104660,7 @@ index c3fbafd..3fae82a 100644
  				ivalue = (int) fvalue;	// truncation conversion
  			}
  
-@@ -2862,6 +2842,7 @@ CommitTransaction(SetAttributeFlags_t flags /* = 0 */)
+@@ -2862,6 +2843,7 @@ CommitTransaction(SetAttributeFlags_t flags /* = 0 */)
  					rewriteSpooledJobAd(procad, cluster_id, proc_id, false);
  					JobQueue->CommitNondurableTransaction();
  					ScheduleJobQueueLogFlush();
@@ -103057,7 +104668,7 @@ index c3fbafd..3fae82a 100644
  				}
  
  				std::string version;
-@@ -2871,7 +2852,6 @@ CommitTransaction(SetAttributeFlags_t flags /* = 0 */)
+@@ -2871,7 +2853,6 @@ CommitTransaction(SetAttributeFlags_t flags /* = 0 */)
  					// they are responsible for writing the submit event
  					// to the user log.
  					if ( vers.built_since_version( 7, 5, 4 ) ) {
@@ -103065,7 +104676,7 @@ index c3fbafd..3fae82a 100644
  						PROC_ID job_id;
  						job_id.cluster = cluster_id;
  						job_id.proc = proc_id;
-@@ -2947,9 +2927,13 @@ GetAttributeFloat(int cluster_id, int proc_id, const char *attr_name, float *val
+@@ -2947,9 +2928,13 @@ GetAttributeFloat(int cluster_id, int proc_id, const char *attr_name, float *val
  	IdToStr(cluster_id,proc_id,key);
  
  	if( JobQueue->LookupInTransaction(key, attr_name, attr_val) ) {
@@ -103081,7 +104692,7 @@ index c3fbafd..3fae82a 100644
  	}
  
  	if (!JobQueue->LookupClassAd(key, ad)) {
-@@ -2971,9 +2955,13 @@ GetAttributeInt(int cluster_id, int proc_id, const char *attr_name, int *val)
+@@ -2971,9 +2956,13 @@ GetAttributeInt(int cluster_id, int proc_id, const char *attr_name, int *val)
  	IdToStr(cluster_id,proc_id,key);
  
  	if( JobQueue->LookupInTransaction(key, attr_name, attr_val) ) {
@@ -103097,7 +104708,7 @@ index c3fbafd..3fae82a 100644
  	}
  
  	if (!JobQueue->LookupClassAd(key, ad)) {
-@@ -2995,9 +2983,13 @@ GetAttributeBool(int cluster_id, int proc_id, const char *attr_name, int *val)
+@@ -2995,9 +2984,13 @@ GetAttributeBool(int cluster_id, int proc_id, const char *attr_name, int *val)
  	IdToStr(cluster_id,proc_id,key);
  
  	if( JobQueue->LookupInTransaction(key, attr_name, attr_val) ) {
@@ -103113,7 +104724,7 @@ index c3fbafd..3fae82a 100644
  	}
  
  	if (!JobQueue->LookupClassAd(key, ad)) {
-@@ -3025,15 +3017,13 @@ GetAttributeStringNew( int cluster_id, int proc_id, const char *attr_name,
+@@ -3025,15 +3018,13 @@ GetAttributeStringNew( int cluster_id, int proc_id, const char *attr_name,
  	IdToStr(cluster_id,proc_id,key);
  
  	if( JobQueue->LookupInTransaction(key, attr_name, attr_val) ) {
@@ -103135,7 +104746,7 @@ index c3fbafd..3fae82a 100644
  	}
  
  	if (!JobQueue->LookupClassAd(key, ad)) {
-@@ -3060,16 +3050,14 @@ GetAttributeString( int cluster_id, int proc_id, const char *attr_name,
+@@ -3060,16 +3051,14 @@ GetAttributeString( int cluster_id, int proc_id, const char *attr_name,
  	IdToStr(cluster_id,proc_id,key);
  
  	if( JobQueue->LookupInTransaction(key, attr_name, attr_val) ) {
@@ -103159,7 +104770,7 @@ index c3fbafd..3fae82a 100644
  	}
  
  	if (!JobQueue->LookupClassAd(key, ad)) {
-@@ -3372,7 +3360,7 @@ dollarDollarExpand(int cluster_id, int proc_id, ClassAd *ad, ClassAd *startd_ad,
+@@ -3372,7 +3361,7 @@ dollarDollarExpand(int cluster_id, int proc_id, ClassAd *ad, ClassAd *startd_ad,
  			bool expanded_something = false;
  			int search_pos = 0;
  			while( !attribute_not_found &&
@@ -103168,7 +104779,55 @@ index c3fbafd..3fae82a 100644
  			{
  				expanded_something = true;
  				
-@@ -4245,16 +4233,20 @@ PrintQ()
+@@ -3901,7 +3890,9 @@ rewriteSpooledJobAd(ClassAd *job_ad, int cluster, int proc, bool modify_ad)
+ 		const char *base = NULL;
+ 		while ( (old_path_buf=old_paths.next()) ) {
+ 			base = condor_basename(old_path_buf);
+-			if ( strcmp(base,old_path_buf)!=0 ) {
++			if ((AttrsToModify[attrIndex] == ATTR_TRANSFER_INPUT_FILES) && IsUrl(old_path_buf)) {
++				base = old_path_buf;
++			} else if ( strcmp(base,old_path_buf)!=0 ) {
+ 				changed = true;
+ 			}
+ 			new_paths.append(base);
+@@ -4195,6 +4186,36 @@ SendSpoolFileIfNeeded(ClassAd& ad)
+ 					        hash.c_str());
+ 					hash = "";
+ 			}
++
++			MyString cluster_owner;
++			if( GetAttributeString(active_cluster_num,-1,ATTR_OWNER,cluster_owner) == -1 ) {
++					// The owner is not set in the cluster ad.  We
++					// need it to be set so we can attempt to clean up
++					// the shared file when the cluster goes away.
++					// Setting the owner in the cluster ad to whatever
++					// it is in the ad we were given should be okay.
++					// If any other procs in this cluster have a
++					// different value for Owner, the cleanup will not
++					// be complete, but the files should eventually be
++					// cleaned by preen.  It would probably be a good
++					// idea to enforce the rule that all jobs in a
++					// cluster have the same Owner, but that is outside
++					// the scope of the code here.
++
++				rv = SetAttributeString(active_cluster_num,
++			                      -1,
++			                      ATTR_OWNER,
++			                      owner.Value());
++
++				if (rv < 0) {
++					dprintf(D_ALWAYS,
++					        "SendSpoolFileIfNeeded: unable to set %s to %s\n",
++					        ATTR_OWNER,
++					        owner.Value());
++					hash = "";
++				}
++			}
++
+ 			if (!hash.empty() &&
+ 			    ickpt_share_try_sharing(owner.Value(), hash, path))
+ 			{
+@@ -4245,16 +4266,20 @@ PrintQ()
  // seperate. 
  int get_job_prio(ClassAd *job)
  {
@@ -103194,7 +104853,7 @@ index c3fbafd..3fae82a 100644
  
  	ASSERT(job);
  
-@@ -4290,9 +4282,24 @@ int get_job_prio(ClassAd *job)
+@@ -4290,9 +4315,24 @@ int get_job_prio(ClassAd *job)
          return cur_hosts;
  	}
  
@@ -103221,7 +104880,7 @@ index c3fbafd..3fae82a 100644
      job->LookupInteger(ATTR_JOB_PRIO, job_prio);
      job->LookupInteger(ATTR_Q_DATE, q_date);
  	if( job->LookupInteger( ATTR_NICE_USER, niceUser ) && niceUser ) {
-@@ -4316,11 +4323,15 @@ int get_job_prio(ClassAd *job)
+@@ -4316,11 +4356,15 @@ int get_job_prio(ClassAd *job)
      // Rather look at if it has all the hosts that it wanted.
      if (cur_hosts>=max_hosts || job_status==HELD)
          return cur_hosts;
@@ -103242,7 +104901,7 @@ index c3fbafd..3fae82a 100644
  	if ( auto_id == -1 ) {
  		PrioRec[N_PrioRecs].auto_cluster_id = id.cluster;
  	} else {
-@@ -4914,3 +4925,7 @@ dirtyJobQueue()
+@@ -4914,3 +4958,7 @@ dirtyJobQueue()
  {
  	JobQueueDirty = true;
  }
@@ -103300,10 +104959,18 @@ index 0e01e05..74dca19 100644
  GetNextDirtyJobByConstraint( char const *constraint, int initScan )
  {
 diff --git a/src/condor_schedd.V6/qmgr_job_updater.cpp b/src/condor_schedd.V6/qmgr_job_updater.cpp
-index 421af0c..15f76f0 100644
+index 421af0c..5a884da 100644
 --- a/src/condor_schedd.V6/qmgr_job_updater.cpp
 +++ b/src/condor_schedd.V6/qmgr_job_updater.cpp
-@@ -120,6 +120,8 @@ QmgrJobUpdater::initJobQueueAttrLists( void )
+@@ -107,6 +107,7 @@ QmgrJobUpdater::initJobQueueAttrLists( void )
+ 	common_job_queue_attrs = new StringList();
+ 	common_job_queue_attrs->insert( ATTR_IMAGE_SIZE );
+ 	common_job_queue_attrs->insert( ATTR_RESIDENT_SET_SIZE );
++	common_job_queue_attrs->insert( ATTR_PROPORTIONAL_SET_SIZE );
+ 	common_job_queue_attrs->insert( ATTR_DISK_USAGE );
+ 	common_job_queue_attrs->insert( ATTR_JOB_REMOTE_SYS_CPU );
+ 	common_job_queue_attrs->insert( ATTR_JOB_REMOTE_USER_CPU );
+@@ -120,6 +121,8 @@ QmgrJobUpdater::initJobQueueAttrLists( void )
  	common_job_queue_attrs->insert( ATTR_JOB_COMMITTED_TIME );
  	common_job_queue_attrs->insert( ATTR_COMMITTED_SLOT_TIME );
  	common_job_queue_attrs->insert( ATTR_DELEGATED_PROXY_EXPIRATION );
@@ -103313,7 +104980,7 @@ index 421af0c..15f76f0 100644
  	hold_job_queue_attrs = new StringList();
  	hold_job_queue_attrs->insert( ATTR_HOLD_REASON );
 diff --git a/src/condor_schedd.V6/schedd.cpp b/src/condor_schedd.V6/schedd.cpp
-index 0e977f9..ebc871e 100644
+index 0e977f9..ca1d6c8 100644
 --- a/src/condor_schedd.V6/schedd.cpp
 +++ b/src/condor_schedd.V6/schedd.cpp
 @@ -30,7 +30,6 @@
@@ -103558,7 +105225,7 @@ index 0e977f9..ebc871e 100644
 +    // These are best done here in Init(), since the windows may change on reconfig, and
 +    // it does not result in total loss of data, only some data if reconfiguring to smaller
 +    // window, in which case it was because the user requested it.
-+    int event_stat_window = param_integer("WINDOWED_STAT_WIDTH", 300, 1, MAXINT);
++    int event_stat_window = param_integer("WINDOWED_STAT_WIDTH", 300, 1, INT_MAX);
 +    JobsSubmittedTQ.max_time(event_stat_window);
 +    JobsStartedTQ.max_time(event_stat_window);
 +    JobsCompletedTQ.max_time(event_stat_window);
@@ -103691,6 +105358,29 @@ index 204231e..075e698 100644
  
  // procad: the class ad for the job
  void schedd_files(ClassAd *procad);
+diff --git a/src/condor_schedd.V6/schedd_td.cpp b/src/condor_schedd.V6/schedd_td.cpp
+index 9d80ea3..7745b6f 100644
+--- a/src/condor_schedd.V6/schedd_td.cpp
++++ b/src/condor_schedd.V6/schedd_td.cpp
+@@ -30,6 +30,7 @@
+ #include "basename.h"
+ #include "nullfile.h"
+ #include "spooled_job_files.h"
++#include "condor_url.h"
+ 
+ /* In this service function, the client tells the schedd a bunch of jobs
+ 	it would like to perform a transfer for into/out of a sandbox. The
+@@ -868,7 +869,9 @@ Scheduler::treq_upload_update_callback(TransferRequest *treq,
+ 			MyString new_path_buf;
+ 			while ( (old_path_buf=old_paths.next()) ) {
+ 				base = condor_basename(old_path_buf);
+-				if ( strcmp(base,old_path_buf)!=0 ) {
++				if ((AttrsToModify[index] == ATTR_TRANSFER_INPUT_FILES) && IsUrl(old_path_buf)) {
++					base = old_path_buf;
++				} else if ( strcmp(base,old_path_buf)!=0 ) {
+ 					new_path_buf.sprintf(
+ 						"%s%c%s",SpoolSpace,DIR_DELIM_CHAR,base);
+ 					base = new_path_buf.Value();
 diff --git a/src/condor_schedd.V6/scheduler.h b/src/condor_schedd.V6/scheduler.h
 index 8d4a879..3926926 100644
 --- a/src/condor_schedd.V6/scheduler.h
@@ -104328,13 +106018,17 @@ index 77c4503..78f2dbd 100644
  			nodenum++;
  
 diff --git a/src/condor_shadow.V6.1/remoteresource.cpp b/src/condor_shadow.V6.1/remoteresource.cpp
-index 9618dc3..8a61041 100644
+index 9618dc3..9200ed5 100644
 --- a/src/condor_shadow.V6.1/remoteresource.cpp
 +++ b/src/condor_shadow.V6.1/remoteresource.cpp
-@@ -1019,6 +1019,14 @@ RemoteResource::updateFromStarter( ClassAd* update_ad )
+@@ -1019,6 +1019,18 @@ RemoteResource::updateFromStarter( ClassAd* update_ad )
  	    jobAd->Assign(ATTR_RESIDENT_SET_SIZE, int_value);
  	}
  
++	if( update_ad->LookupInteger(ATTR_PROPORTIONAL_SET_SIZE, int_value) ) {
++	    jobAd->Assign(ATTR_PROPORTIONAL_SET_SIZE, int_value);
++	}
++
 +	if( update_ad->LookupInteger(ATTR_BLOCK_READ_KBYTES, int_value) ) {
 +		jobAd->Assign(ATTR_BLOCK_READ_KBYTES, int_value);
 +	}
@@ -104458,7 +106152,7 @@ index 069605d..04e8dc4 100644
  			    "(MY.CheckpointPlatform =!= UNDEFINED) &&"
  			    "("
 diff --git a/src/condor_startd.V6/ResAttributes.cpp b/src/condor_startd.V6/ResAttributes.cpp
-index bd16f8c..cd992c5 100644
+index bd16f8c..aacdc92 100644
 --- a/src/condor_startd.V6/ResAttributes.cpp
 +++ b/src/condor_startd.V6/ResAttributes.cpp
 @@ -22,8 +22,13 @@
@@ -105211,6 +106905,31 @@ index bd16f8c..cd992c5 100644
  	}
  
  }
+@@ -854,12 +625,20 @@ MachAttributes::start_benchmarks( Resource* rip, int &count )
+ 	}
+ 
+ 	ASSERT( bench_job_mgr != NULL );
+-	bench_job_mgr->StartBenchmarks( rip, count );
+ 
+-	// Enter benchmarking activity
+-	if ( count ) {
+-		rip->change_state( benchmarking_act );
++	// Enter benchmarking activity BEFORE invoking StartBenchmarks().
++	// If StartBenchmarks() will return to idle activity upon failure
++	// to launch benchmarks, or upon completion of benchmarks 
++	// (in the reaper).
++	rip->change_state( benchmarking_act );
++	bench_job_mgr->StartBenchmarks( rip, count );
++	// However, if StartBenchmarks set count to zero, that means
++	// there are no benchmarks configured to run now. So set the activity
++	// back to idle.
++	if ( count == 0 ) {
++		rip->change_state( idle_act );
+ 	}
++
+ }
+ 
+ void
 diff --git a/src/condor_startd.V6/ResAttributes.h b/src/condor_startd.V6/ResAttributes.h
 index dfbf095..0df6b27 100644
 --- a/src/condor_startd.V6/ResAttributes.h
@@ -105529,9 +107248,35 @@ index 7d8dca1..e04a9b6 100644
  	bool	resume( void );
  
 diff --git a/src/condor_startd.V6/claim.cpp b/src/condor_startd.V6/claim.cpp
-index 1a373a8..921d188 100644
+index 1a373a8..2ac4529 100644
 --- a/src/condor_startd.V6/claim.cpp
 +++ b/src/condor_startd.V6/claim.cpp
+@@ -1010,7 +1010,7 @@ Claim::sendAliveConnectHandler(Stream *s)
+ 
+ 	if ( !sock->put_secret( claimId ) || !sock->end_of_message() ) {
+ 			dprintf( D_FAILURE|D_ALWAYS, 
+-				 "Failed to send Alive to schedd %s for job %d.%d id \n",
++				 "Failed to send Alive to schedd %s for job %d.%d id %s\n",
+ 				 c_addr, c_cluster, c_proc, publicClaimId() );
+ 		ALIVE_BAILOUT;  // note daemonCore will close sock for us
+ 	}
+@@ -1058,14 +1058,14 @@ Claim::sendAliveResponseHandler( Stream *sock )
+ 
+  	if( !sock->rcv_int(reply, TRUE) ) {
+ 		dprintf( D_ALWAYS, 
+-			"Response problem from schedd on ALIVE job %d.%d.\n", 
++			"Response problem from schedd %s on ALIVE job %d.%d.\n", 
+ 			c_addr, c_cluster, c_proc );	
+ 		ALIVE_BAILOUT;  // note daemonCore will close sock for us
+ 	}
+ 
+ 		// So here we got a response from the schedd.  
+ 	dprintf(D_PROTOCOL,
+-		"Received Alive response of %d from schedd %d job %d.%d\n",
++		"Received Alive response of %d from schedd %s job %d.%d\n",
+ 		reply, c_addr, c_cluster, c_proc);
+ 
+ 		// If the response is -1, that means the schedd knows nothing
 @@ -1543,11 +1543,11 @@ Claim::starterKillPg( int sig )
  
  
@@ -105547,9 +107292,18 @@ index 1a373a8..921d188 100644
  		// if there's no starter, we don't need to kill anything, so
  		// it worked...  
 diff --git a/src/condor_startd.V6/claim.h b/src/condor_startd.V6/claim.h
-index bfc4e1e..819f8e9 100644
+index bfc4e1e..9565232 100644
 --- a/src/condor_startd.V6/claim.h
 +++ b/src/condor_startd.V6/claim.h
+@@ -135,7 +135,7 @@ public:
+ 	void publishCOD( ClassAd* );
+ 	void publishStateTimes( ClassAd* );
+ 
+-	void dprintf( int, const char* ... );
++	void dprintf( int, const char* ... ) CHECK_PRINTF_FORMAT(3,4);
+ 
+ 	void refuseClaimRequest();
+ 
 @@ -241,7 +241,7 @@ public:
  	bool resumeClaim( void );
  	bool starterKill( int sig );
@@ -105590,6 +107344,19 @@ index 13d3d31..76410bb 100644
  	rip->r_cur->setrank( rank );
  
  		// Grab the job ID, so we've got it.  Once we give the
+diff --git a/src/condor_startd.V6/startd_hibernator.cpp b/src/condor_startd.V6/startd_hibernator.cpp
+index 9e4a693..8af055f 100644
+--- a/src/condor_startd.V6/startd_hibernator.cpp
++++ b/src/condor_startd.V6/startd_hibernator.cpp
+@@ -69,7 +69,7 @@ StartdHibernator::update( void )
+ 		}
+ 		m_plugin_path  = tmp;
+ 		m_plugin_path += "/";
+-		m_plugin_path += "power_state";
++		m_plugin_path += "condor_power_state";
+ 		free( tmp );
+ 	}
+ 
 diff --git a/src/condor_startd.V6/util.cpp b/src/condor_startd.V6/util.cpp
 index b552dcc..d86fc43 100644
 --- a/src/condor_startd.V6/util.cpp
@@ -105627,6 +107394,54 @@ index 23fd420..0d5728b 100644
  int 	create_port( ReliSock* );
  bool	reply( Stream*, int );
  bool	refuse( Stream* );
+diff --git a/src/condor_startd.V6/vmuniverse_mgr.cpp b/src/condor_startd.V6/vmuniverse_mgr.cpp
+index 1a4cd7f..f9473af 100644
+--- a/src/condor_startd.V6/vmuniverse_mgr.cpp
++++ b/src/condor_startd.V6/vmuniverse_mgr.cpp
+@@ -106,9 +106,17 @@ VMStarterInfo::getUsageOfVM(ProcFamilyUsage &usage)
+ 	if( updated ) {
+ 		usage.total_image_size = m_vm_alive_pinfo.imgsize;
+ 		usage.total_resident_set_size = m_vm_alive_pinfo.rssize;
++#if HAVE_PSS
++		usage.total_proportional_set_size = m_vm_alive_pinfo.pssize;
++		usage.total_proportional_set_size = m_vm_alive_pinfo.pssize_available;
++#endif
+ 	}else {
+ 		usage.total_image_size = 0;
+         usage.total_resident_set_size = 0;
++#if HAVE_PSS
++		usage.total_proportional_set_size = 0;
++		usage.total_proportional_set_size = false;
++#endif
+ 	}
+ 
+ 	if( (DebugFlags & D_FULLDEBUG) && (DebugFlags & D_LOAD) ) {
+@@ -141,6 +149,12 @@ VMStarterInfo::addProcessForVM(pid_t vm_pid)
+ 	if( m_vm_alive_pinfo.imgsize > m_vm_exited_pinfo.imgsize ) {
+ 		m_vm_exited_pinfo.imgsize = m_vm_alive_pinfo.imgsize;
+ 	}
++#if HAVE_PSS
++	if( m_vm_alive_pinfo.pssize_available && m_vm_alive_pinfo.pssize > m_vm_exited_pinfo.pssize ) {
++		m_vm_exited_pinfo.pssize_available = true;
++		m_vm_exited_pinfo.pssize = m_vm_alive_pinfo.pssize;
++	}
++#endif
+ 
+ 	// Reset usage of the current process for VM
+ 	memset(&m_vm_alive_pinfo, 0, sizeof(m_vm_alive_pinfo));
+@@ -964,6 +978,12 @@ VMUniverseMgr::getUsageForVM(pid_t s_pid, ProcFamilyUsage &usage)
+ 	}
+ 	usage.total_image_size += vm_usage.total_image_size;
+ 	usage.total_resident_set_size += vm_usage.total_resident_set_size;
++#if HAVE_PSS
++	if( vm_usage.total_proportional_set_size_available ) {
++		usage.total_proportional_set_size_available = true;
++		usage.total_proportional_set_size += vm_usage.total_proportional_set_size;
++	}
++#endif
+ 	return true;
+ }
+ 
 diff --git a/src/condor_startd.V6/winreg.windows.cpp b/src/condor_startd.V6/winreg.windows.cpp
 new file mode 100644
 index 0000000..e59a165
@@ -107775,7 +109590,7 @@ index b36f38e..f8a427a 100644
  
  #endif
 diff --git a/src/condor_starter.V6.1/vanilla_proc.cpp b/src/condor_starter.V6.1/vanilla_proc.cpp
-index b27af2a..f879393 100644
+index b27af2a..b4fe9d7 100644
 --- a/src/condor_starter.V6.1/vanilla_proc.cpp
 +++ b/src/condor_starter.V6.1/vanilla_proc.cpp
 @@ -208,9 +208,37 @@ VanillaProc::StartJob()
@@ -107817,10 +109632,16 @@ index b27af2a..f879393 100644
  }
  
  
-@@ -244,6 +272,14 @@ VanillaProc::PublishUpdateAd( ClassAd* ad )
- 	ad->InsertOrUpdate( buf );
+@@ -245,6 +273,21 @@ VanillaProc::PublishUpdateAd( ClassAd* ad )
  	sprintf( buf, "%s=%lu", ATTR_RESIDENT_SET_SIZE, usage->total_resident_set_size );
  	ad->InsertOrUpdate( buf );
+ 
++#if HAVE_PSS
++	if( usage->total_proportional_set_size_available ) {
++		ad->Assign( ATTR_PROPORTIONAL_SET_SIZE, usage->total_proportional_set_size );
++	}
++#endif
++
 +	if (usage->block_read_bytes >= 0) {
 +		sprintf( buf, "%s=%lu", ATTR_BLOCK_READ_KBYTES, usage->block_read_bytes/1024 );
 +		ad->InsertOrUpdate( buf );
@@ -107829,10 +109650,11 @@ index b27af2a..f879393 100644
 +		sprintf( buf, "%s=%lu", ATTR_BLOCK_WRITE_KBYTES, usage->block_write_bytes/1024 );
 +		ad->InsertOrUpdate( buf );
 +	}
- 
++
  		// Update our knowledge of how many processes the job has
  	num_pids = usage->num_procs;
-@@ -342,7 +378,11 @@ VanillaProc::ShutdownGraceful()
+ 
+@@ -342,7 +385,11 @@ VanillaProc::ShutdownGraceful()
  	//
  	OsProc::ShutdownGraceful();
  #if !defined(WIN32)
@@ -107845,8 +109667,72 @@ index b27af2a..f879393 100644
  #endif
  	return false; // shutdown is pending (same as OsProc::ShutdownGraceful()
  }
+diff --git a/src/condor_starter.V6.1/vm_proc.cpp b/src/condor_starter.V6.1/vm_proc.cpp
+index ad38943..0a9a99f 100644
+--- a/src/condor_starter.V6.1/vm_proc.cpp
++++ b/src/condor_starter.V6.1/vm_proc.cpp
+@@ -1207,8 +1207,10 @@ VMProc::PublishUpdateAd( ClassAd* ad )
+ 		long user_time = 0;
+ 		unsigned long max_image = 0;
+         unsigned long rss = 0;
++		unsigned long pss = 0;
++		bool pss_available = false;
+ 
+-		getUsageOfVM(sys_time, user_time, max_image, rss);
++		getUsageOfVM(sys_time, user_time, max_image, rss, pss, pss_available);
+ 		
+ 		// Added to update CPU Usage of VM in ESX
+ 		if ( long(m_vm_cputime) > user_time ) {
+@@ -1223,6 +1225,9 @@ VMProc::PublishUpdateAd( ClassAd* ad )
+ 		ad->InsertOrUpdate( buf.Value());
+ 		buf.sprintf("%s=%lu", ATTR_RESIDENT_SET_SIZE, rss );
+ 		ad->InsertOrUpdate( buf.Value());
++		if( pss_available ) {
++			ad->Assign(ATTR_PROPORTIONAL_SET_SIZE,pss);
++		}
+ 	}
+ 
+ 	if( m_vm_checkpoint ) {
+@@ -1469,7 +1474,7 @@ VMProc::updateUsageOfVM()
+ }
+ 
+ void
+-VMProc::getUsageOfVM(long &sys_time, long& user_time, unsigned long &max_image, unsigned long& rss)
++VMProc::getUsageOfVM(long &sys_time, long& user_time, unsigned long &max_image, unsigned long& rss, unsigned long& pss, bool &pss_available)
+ {
+ 	updateUsageOfVM();
+ 	sys_time = m_vm_exited_pinfo.sys_time + m_vm_alive_pinfo.sys_time;
+@@ -1478,6 +1483,15 @@ VMProc::getUsageOfVM(long &sys_time, long& user_time, unsigned long &max_image,
+ 	rss = (m_vm_exited_pinfo.rssize > m_vm_alive_pinfo.rssize) ? 
+ 		   m_vm_exited_pinfo.rssize : m_vm_alive_pinfo.rssize;
+ 
++#if HAVE_PSS
++	pss = (m_vm_exited_pinfo.pssize > m_vm_alive_pinfo.pssize) ? 
++		   m_vm_exited_pinfo.pssize : m_vm_alive_pinfo.pssize;
++	pss_available = m_vm_exited_pinfo.pssize_available || m_vm_alive_pinfo.pssize_available;
++#else
++	pss_available = false;
++	pss = 0;
++#endif
++
+ #if defined(WIN32)
+ 	max_image = (m_vm_exited_pinfo.rssize > m_vm_alive_pinfo.rssize) ? 
+ 		m_vm_exited_pinfo.rssize : m_vm_alive_pinfo.rssize;
+diff --git a/src/condor_starter.V6.1/vm_proc.h b/src/condor_starter.V6.1/vm_proc.h
+index 909d821..e9d3e93 100644
+--- a/src/condor_starter.V6.1/vm_proc.h
++++ b/src/condor_starter.V6.1/vm_proc.h
+@@ -100,7 +100,7 @@ class VMProc : public OsProc
+ 		void setVMIP(const char *ip);
+ 
+ 		void updateUsageOfVM();
+-		void getUsageOfVM(long &sys_time, long& user_time, unsigned long &max_image, unsigned long& rss);
++		void getUsageOfVM(long &sys_time, long& user_time, unsigned long &max_image, unsigned long& rss, unsigned long &pss, bool& pss_available);
+ 		void killProcessForVM();
+ 
+ 		// If interal vmgahp error occurs, call this function 
 diff --git a/src/condor_starter.std/starter_main.cpp b/src/condor_starter.std/starter_main.cpp
-index 557604b..a9e835d 100644
+index 557604b..acf423e 100644
 --- a/src/condor_starter.std/starter_main.cpp
 +++ b/src/condor_starter.std/starter_main.cpp
 @@ -164,7 +164,7 @@ init()
@@ -107858,8 +109744,45 @@ index 557604b..a9e835d 100644
  	close_unused_file_descriptors();
  
  	return DEFAULT;
+@@ -275,12 +275,35 @@ close_unused_file_descriptors()
+ 		}
+ 	}
+ 
++	int fd_count = 0;
++	int *open_fds = (int*)malloc(sizeof(int) * (D_NUMLEVELS+1));
++	if(!open_fds)
++		EXCEPT("Out of memory!\n");
++
++	fd_count = debug_open_fds(open_fds);
++
+ 		/* now close everything except the ones we use */
+ 	for( i=0; i<open_max; i++ ) {
+-		if( !needed_fd(i) ) {
++		bool is_log = false;
++		if(fd_count > 0)
++		{
++			for(int index = 0; index <= D_NUMLEVELS; index++)
++			{
++				if(i == open_fds[index])
++				{
++					is_log = true;
++				}
++			}
++		}
++
++
++		if(!is_log && !needed_fd(i)) {
+ 			(void) close( i );
+ 		}
+ 	}
++
++	free(open_fds);
++
+ 	dprintf( D_FULLDEBUG, "Done closing file descriptors\n" );
+ }
+ 
 diff --git a/src/condor_submit.V6/submit.cpp b/src/condor_submit.V6/submit.cpp
-index 377ab61..0c744da 100644
+index 377ab61..73d2591 100644
 --- a/src/condor_submit.V6/submit.cpp
 +++ b/src/condor_submit.V6/submit.cpp
 @@ -33,8 +33,6 @@
@@ -108167,6 +110090,15 @@ index 377ab61..0c744da 100644
  	}
  	
  
+@@ -5080,7 +5226,7 @@ SetGridParams()
+ 
+ 	if ( (tmp = condor_param( DeltacloudPasswordFile, ATTR_DELTACLOUD_PASSWORD_FILE )) ) {
+ 		// check private key file can be opened
+-		if ( !DisableFileChecks ) {
++		if ( !DisableFileChecks && !strstr( tmp, "$$" ) ) {
+ 			if( ( fp=safe_fopen_wrapper(full_path(tmp),"r") ) == NULL ) {
+ 				fprintf( stderr, "\nERROR: Failed to open password file %s (%s)\n", 
+ 							 full_path(tmp), strerror(errno));
 @@ -5254,6 +5400,15 @@ SetGSICredentials()
  			InsertJobExpr(buffer);	
  			free( proxy_subject );
@@ -108231,8 +110163,103 @@ index 3099315..9fc6ab4 100644
  
  #if defined(Darwin)
  #include <sys/sysctl.h>
+diff --git a/src/condor_sysapi/arch_t.cpp b/src/condor_sysapi/arch_t.cpp
+index 0cda23a..0ebf438 100644
+--- a/src/condor_sysapi/arch_t.cpp
++++ b/src/condor_sysapi/arch_t.cpp
+@@ -22,6 +22,7 @@
+ #include "condor_debug.h"
+ #include "sysapi.h"
+ #include "sysapi_externs.h"
++#include "test.h"
+ #include "stdio.h"
+ #include "string.h"
+ 
+diff --git a/src/condor_sysapi/clinpack_t.cpp b/src/condor_sysapi/clinpack_t.cpp
+index e431729..1114036 100644
+--- a/src/condor_sysapi/clinpack_t.cpp
++++ b/src/condor_sysapi/clinpack_t.cpp
+@@ -22,6 +22,7 @@
+ #include "condor_debug.h"
+ #include "sysapi.h"
+ #include "sysapi_externs.h"
++#include "test.h"
+ #include "stdio.h"
+ #include "math.h"
+ 
+diff --git a/src/condor_sysapi/dhry_t.cpp b/src/condor_sysapi/dhry_t.cpp
+index dfaa0ad..fb0b019 100644
+--- a/src/condor_sysapi/dhry_t.cpp
++++ b/src/condor_sysapi/dhry_t.cpp
+@@ -22,6 +22,7 @@
+ #include "condor_debug.h"
+ #include "sysapi.h"
+ #include "sysapi_externs.h"
++#include "test.h"
+ #include "stdio.h"
+ #include "math.h"
+ 
+diff --git a/src/condor_sysapi/idle_time_t.cpp b/src/condor_sysapi/idle_time_t.cpp
+index d3126e6..3f75fce 100644
+--- a/src/condor_sysapi/idle_time_t.cpp
++++ b/src/condor_sysapi/idle_time_t.cpp
+@@ -22,6 +22,7 @@
+ #include "condor_debug.h"
+ #include "sysapi.h"
+ #include "sysapi_externs.h"
++#include "test.h"
+ #include "stdio.h"
+ #include "time.h"
+ 
+diff --git a/src/condor_sysapi/load_avg_t.cpp b/src/condor_sysapi/load_avg_t.cpp
+index 53fa0c1..a89a14a 100644
+--- a/src/condor_sysapi/load_avg_t.cpp
++++ b/src/condor_sysapi/load_avg_t.cpp
+@@ -22,12 +22,11 @@
+ #include "condor_debug.h"
+ #include "sysapi.h"
+ #include "sysapi_externs.h"
++#include "test.h"
+ #include "stdio.h"
+ 
+ #define ITERATIONS_PER_SECOND 10000000
+ 
+-int load_avg_test(int trials, int interval, int num_children, double warn_ok_ratio);
+-
+ int load_avg_test(int trials, int interval, int num_children, double warn_ok_ratio) {
+ 	float		foo = 0;
+ 	float		foo2 = 0;
+diff --git a/src/condor_sysapi/ncpus_t.cpp b/src/condor_sysapi/ncpus_t.cpp
+index 92df60c..a6a4ed3 100644
+--- a/src/condor_sysapi/ncpus_t.cpp
++++ b/src/condor_sysapi/ncpus_t.cpp
+@@ -22,6 +22,7 @@
+ #include "condor_debug.h"
+ #include "sysapi.h"
+ #include "sysapi_externs.h"
++#include "test.h"
+ #include "stdio.h"
+ 
+ int ncpus_test(int trials, double warn_ok_ratio)
+diff --git a/src/condor_sysapi/phys_mem_t.cpp b/src/condor_sysapi/phys_mem_t.cpp
+index ede01f0..e884bac 100644
+--- a/src/condor_sysapi/phys_mem_t.cpp
++++ b/src/condor_sysapi/phys_mem_t.cpp
+@@ -22,11 +22,10 @@
+ #include "condor_debug.h"
+ #include "sysapi.h"
+ #include "sysapi_externs.h"
++#include "test.h"
+ #include "stdio.h"
+ #include "string.h"
+ 
+-int phys_memory_test(int trials, double warn_ok_ratio);
+-
+ int phys_memory_test(int trials, double warn_ok_ratio)
+ {
+ 	int foo,  bar;
 diff --git a/src/condor_sysapi/resource_limits.cpp b/src/condor_sysapi/resource_limits.cpp
-index ffbd58d..870ccb9 100644
+index ffbd58d..9e0b89e 100644
 --- a/src/condor_sysapi/resource_limits.cpp
 +++ b/src/condor_sysapi/resource_limits.cpp
 @@ -25,27 +25,26 @@
@@ -108252,9 +110279,11 @@ index ffbd58d..870ccb9 100644
 +	rlim_t lim;
 +	int free_blocks = sysapi_disk_space( "." );
  	unsigned long core_lim = (free_blocks - SLOP) * 1024;
+-	if( core_lim > MAXINT ) {
+-		lim = MAXINT;
 +
- 	if( core_lim > MAXINT ) {
- 		lim = MAXINT;
++	if( core_lim > INT_MAX ) {
++		lim = INT_MAX;
  	} else {
  		lim = (int) core_lim;
  	}
@@ -108325,6 +110354,24 @@ index c0fda97..709f734 100644
  /* this header file can be included by C and C++ files, so make sure it
     understands that fact.
  
+diff --git a/src/condor_sysapi/virt_mem_t.cpp b/src/condor_sysapi/virt_mem_t.cpp
+index 4752ff6..c943325 100644
+--- a/src/condor_sysapi/virt_mem_t.cpp
++++ b/src/condor_sysapi/virt_mem_t.cpp
+@@ -22,12 +22,10 @@
+ #include "condor_debug.h"
+ #include "sysapi.h"
+ #include "sysapi_externs.h"
++#include "test.h"
+ #include "stdio.h"
+ #include "math.h"
+ 
+-int virt_memory_test(int test_blocksize, double max_sd_varation_ratio,
+-					 					double max_failed_test_ratio);
+-
+ int virt_memory_test(int	test_blocksize,
+ 					 double max_sd_varation_ratio, 
+ 					 double max_failed_test_ratio)
 diff --git a/src/condor_syscall_lib/CMakeLists.txt b/src/condor_syscall_lib/CMakeLists.txt
 index 2f96684..7208da6 100644
 --- a/src/condor_syscall_lib/CMakeLists.txt
@@ -109040,6 +111087,91 @@ index 0000000..3f61bd5
 +++ b/src/condor_tests/job_ec2_basic.userDataFile
 @@ -0,0 +1 @@
 +userDataFileExampleData
+diff --git a/src/condor_tests/job_vmu_cdrom.run b/src/condor_tests/job_vmu_cdrom.run
+deleted file mode 100755
+index fb37dab..0000000
+--- a/src/condor_tests/job_vmu_cdrom.run
++++ /dev/null
+@@ -1,67 +0,0 @@
+-#!/usr/bin/env perl
+-##**************************************************************
+-##
+-## 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.
+-##
+-##**************************************************************
+-
+-use CondorTest;
+-use x_vm_utils;
+-
+-$corename = 'job_vmu_cdrom';
+-$testname = 'job_vmu_cdrom';
+-$testdesc = 'VM universe CD-ROM test';
+-
+-x_vm_utils::initialize($corename);
+-
+-sub create_file_for_iso
+-{
+-	my $filename = shift;
+-	open(FILE, ">$filename") ||
+-		die "error opening $filename: $!\n";
+-	print FILE "$filename\n" ||
+-		die "error writing to $filename\n";
+-	close(FILE);
+-}
+-create_file_for_iso("a.txt");
+-create_file_for_iso("b.txt");
+-create_file_for_iso("c.txt");
+-
+-$completed = sub
+-{
+-	CondorTest::debug("Job has completed\n",1);
+-	unless (x_vm_utils::check_output("a.txt b.txt c.txt")) {
+-		die "output check failed\n";
+-	}
+-};
+-CondorTest::RegisterExitedSuccess( $testname, $completed );
+-
+-x_vm_utils::add_submit_command("vmware_should_transfer_files = yes");
+-x_vm_utils::add_submit_command("vmware_snapshot_disk = false");
+-x_vm_utils::add_submit_command("vm_cdrom_files = a.txt,b.txt,c.txt");
+-x_vm_utils::add_submit_command("vm_should_transfer_cdrom_files = yes");
+-x_vm_utils::add_submit_command("periodic_remove = (time() - QDate) > 600");
+-$success = x_vm_utils::run_test($testname);
+-
+-x_vm_utils::cleanup();
+-
+-if( not $success )
+-{
+-	CondorTest::debug("$corename FAILED\n",1);
+-	exit(1);
+-}
+-CondorTest::debug("$corename SUCCESS\n",1);
+-exit(0);
+diff --git a/src/condor_tests/job_vmu_cdrom.sh b/src/condor_tests/job_vmu_cdrom.sh
+deleted file mode 100644
+index 90471bb..0000000
+--- a/src/condor_tests/job_vmu_cdrom.sh
++++ /dev/null
+@@ -1,6 +0,0 @@
+-#/bin/sh
+-
+-mount /dev/hdc /mnt
+-echo `cat /mnt/a.txt` `cat /mnt/b.txt` `cat /mnt/c.txt` > /tmp/condorout
+-umount /mnt
+-dd if=/tmp/condorout of=/dev/fd0
 diff --git a/src/condor_tests/lib_classads.run b/src/condor_tests/lib_classads.run
 index f83ab78..9022428 100755
 --- a/src/condor_tests/lib_classads.run
@@ -110711,6 +112843,106 @@ index 7f62e3a..5052829 100644
  		FAIL;
  	}
  	PASS;
+diff --git a/src/condor_unit_tests/OTEST_UserPolicy.cpp b/src/condor_unit_tests/OTEST_UserPolicy.cpp
+index 1550390..b170452 100644
+--- a/src/condor_unit_tests/OTEST_UserPolicy.cpp
++++ b/src/condor_unit_tests/OTEST_UserPolicy.cpp
+@@ -136,15 +136,15 @@ static bool test_firing_reason_exit_periodic_remove(void);
+ static bool test_firing_reason_exit_on_exit_hold(void);
+ static bool test_firing_reason_exit_on_exit_remove(void);
+ static bool test_firing_reason_exit_false(void);
+-static bool test_remove_macro_analyze_policy(void);
++/*static bool test_remove_macro_analyze_policy(void);*/
+ static bool test_remove_macro_firing_expression(void);
+ static bool test_remove_macro_firing_expression_value(void);
+ static bool test_remove_macro_firing_reason(void);
+-static bool test_release_macro_analyze_policy(void);
++/*static bool test_release_macro_analyze_policy(void);*/
+ static bool test_release_macro_firing_expression(void);
+ static bool test_release_macro_firing_expression_value(void);
+ static bool test_release_macro_firing_reason(void);
+-static bool test_hold_macro_analyze_policy(void);
++/*static bool test_hold_macro_analyze_policy(void);*/
+ static bool test_hold_macro_firing_expression(void);
+ static bool test_hold_macro_firing_expression_value(void);
+ static bool test_hold_macro_firing_reason(void);
+@@ -290,18 +290,18 @@ bool OTEST_UserPolicy(void) {
+ 	driver.register_function(test_firing_reason_exit_on_exit_hold);
+ 	driver.register_function(test_firing_reason_exit_on_exit_remove);
+ 	driver.register_function(test_firing_reason_exit_false);
+-	driver.register_function(test_remove_macro_analyze_policy);
+-	driver.register_function(test_remove_macro_firing_expression);
+-	driver.register_function(test_remove_macro_firing_expression_value);
+-	driver.register_function(test_remove_macro_firing_reason);
+-	driver.register_function(test_release_macro_analyze_policy);
+-	driver.register_function(test_release_macro_firing_expression);
++/*	driver.register_function(test_remove_macro_analyze_policy);*/
++//	driver.register_function(test_remove_macro_firing_expression);
++//	driver.register_function(test_remove_macro_firing_expression_value);
++//	driver.register_function(test_remove_macro_firing_reason);
++/*	driver.register_function(test_release_macro_analyze_policy);*/
++//	driver.register_function(test_release_macro_firing_expression);
+ 	driver.register_function(test_release_macro_firing_expression_value);
+-	driver.register_function(test_release_macro_firing_reason);
+-	driver.register_function(test_hold_macro_analyze_policy);
+-	driver.register_function(test_hold_macro_firing_expression);
++//	driver.register_function(test_release_macro_firing_reason);
++/*	driver.register_function(test_hold_macro_analyze_policy);*/
++//	driver.register_function(test_hold_macro_firing_expression);
+ 	driver.register_function(test_hold_macro_firing_expression_value);
+-	driver.register_function(test_hold_macro_firing_reason);
++//	driver.register_function(test_hold_macro_firing_reason);
+ 	
+ 	return driver.do_all_functions();
+ }
+@@ -2711,6 +2711,7 @@ static bool test_firing_reason_exit_false() {
+ 	PASS;
+ }
+ 
++#if 0
+ static bool test_remove_macro_analyze_policy() {
+ 	emit_test("Test that AnalyzePolicy() returns REMOVE_FROM_QUEUE when used"
+ 		" with the PERIODIC_ONLY mode and a ClassAd that has PeriodicRemove "
+@@ -2736,6 +2737,7 @@ static bool test_remove_macro_analyze_policy() {
+ 	}
+ 	PASS;
+ }
++#endif
+ 
+ static bool test_remove_macro_firing_expression() {
+ 	emit_test("Test that FiringExpression() returns SYSTEM_PERIODIC_REMOVE "
+@@ -2817,6 +2819,7 @@ static bool test_remove_macro_firing_reason() {
+ 	PASS;
+ }
+ 
++#if 0
+ static bool test_release_macro_analyze_policy() {
+ 	emit_test("Test that AnalyzePolicy() returns RELEASE_FROM_QUEUE when used"
+ 		" with the PERIODIC_ONLY mode and a ClassAd that has PeriodicRelease "
+@@ -2842,6 +2845,7 @@ static bool test_release_macro_analyze_policy() {
+ 	}
+ 	PASS;
+ }
++#endif
+ 
+ static bool test_release_macro_firing_expression() {
+ 	emit_test("Test that FiringExpression() returns SYSTEM_PERIODIC_RELEASE "
+@@ -2923,6 +2927,7 @@ static bool test_release_macro_firing_reason() {
+ 	PASS;
+ }
+ 
++#if 0
+ static bool test_hold_macro_analyze_policy() {
+ 	emit_test("Test that AnalyzePolicy() returns RELEASE_FROM_QUEUE when used"
+ 		" with the PERIODIC_ONLY mode and a ClassAd that has PeriodicHold "
+@@ -2948,6 +2953,7 @@ static bool test_hold_macro_analyze_policy() {
+ 	}
+ 	PASS;
+ }
++#endif
+ 
+ static bool test_hold_macro_firing_expression() {
+ 	emit_test("Test that FiringExpression() returns SYSTEM_PERIODIC_HOLD "
 diff --git a/src/condor_unit_tests/emit.cpp b/src/condor_unit_tests/emit.cpp
 index c79c0a2..9e6559e 100644
 --- a/src/condor_unit_tests/emit.cpp
@@ -111010,7 +113242,7 @@ index 4661eb6..024aa8c 100644
  	{ "FILETRANS_UPLOAD", FILETRANS_UPLOAD },
  	{ "FILETRANS_DOWNLOAD", FILETRANS_DOWNLOAD },
 diff --git a/src/condor_utils/compat_classad.cpp b/src/condor_utils/compat_classad.cpp
-index 203be06..e18a3b8 100644
+index 203be06..4f39e82 100644
 --- a/src/condor_utils/compat_classad.cpp
 +++ b/src/condor_utils/compat_classad.cpp
 @@ -967,10 +967,9 @@ LookupInteger( const char *name, int &value ) const
@@ -111025,7 +113257,48 @@ index 203be06..e18a3b8 100644
  	if( EvaluateAttrInt(sName, tmp_val ) ) {
  		value = tmp_val;
  		haveInteger = TRUE;
-@@ -2007,7 +2006,7 @@ CopyAttribute( char const *target_attr, char const *source_attr,
+@@ -1194,6 +1193,7 @@ EvalFloat (const char *name, classad::ClassAd *target, float &value)
+ 	classad::Value val;
+ 	double doubleVal;
+ 	int intVal;
++	bool boolVal;
+ 
+ 	if( target == this || target == NULL ) {
+ 		getTheMyRef( this );
+@@ -1206,6 +1206,10 @@ EvalFloat (const char *name, classad::ClassAd *target, float &value)
+ 				value = ( float )intVal;
+ 				rc = 1;
+ 			}
++			if( val.IsBooleanValue( boolVal ) ) {
++				value = ( float )boolVal;
++				rc = 1;
++			}
+ 		}
+ 		releaseTheMyRef( this );
+ 		return rc;
+@@ -1222,6 +1226,10 @@ EvalFloat (const char *name, classad::ClassAd *target, float &value)
+ 				value = ( float )intVal;
+ 				rc = 1;
+ 			}
++			if( val.IsBooleanValue( boolVal ) ) {
++				value = ( float )boolVal;
++				rc = 1;
++			}
+ 		}
+ 	} else if( target->Lookup( name ) ) {
+ 		if( target->EvaluateAttr( name, val ) ) {
+@@ -1233,6 +1241,10 @@ EvalFloat (const char *name, classad::ClassAd *target, float &value)
+ 				value = ( float )intVal;
+ 				rc = 1;
+ 			}
++			if( val.IsBooleanValue( boolVal ) ) {
++				value = ( float )boolVal;
++				rc = 1;
++			}
+ 		}
+ 	}
+ 	releaseTheMatchAd();
+@@ -2007,7 +2019,7 @@ CopyAttribute( char const *target_attr, char const *source_attr,
  //////////////XML functions///////////
  
  int ClassAd::
@@ -111034,7 +113307,7 @@ index 203be06..e18a3b8 100644
  {
      if(!fp)
      {
-@@ -2015,7 +2014,7 @@ fPrintAsXML(FILE *fp)
+@@ -2015,7 +2027,7 @@ fPrintAsXML(FILE *fp)
      }
  
      MyString out;
@@ -111043,7 +113316,7 @@ index 203be06..e18a3b8 100644
      fprintf(fp, "%s", out.Value());
      return TRUE;
  }
-@@ -2172,8 +2171,19 @@ _GetReferences(classad::ExprTree *tree,
+@@ -2172,8 +2184,19 @@ _GetReferences(classad::ExprTree *tree,
  	classad::References ext_refs_set;
  	classad::References int_refs_set;
  	classad::References::iterator set_itr;
@@ -111149,7 +113422,7 @@ index dde7f0f..694864f 100644
  
  typedef ClassAdList AttrListList;
 diff --git a/src/condor_utils/condor_attributes.cpp b/src/condor_utils/condor_attributes.cpp
-index a189a7b..54b006b 100644
+index a189a7b..dd24f66 100644
 --- a/src/condor_utils/condor_attributes.cpp
 +++ b/src/condor_utils/condor_attributes.cpp
 @@ -213,6 +213,8 @@ const char * const ATTR_FILE_READ_BYTES		= "FileReadBytes";
@@ -111177,7 +113450,15 @@ index a189a7b..54b006b 100644
  const char * const ATTR_X509_USER_PROXY_EXPIRATION	 = "x509UserProxyExpiration";
  const char * const ATTR_X509_USER_PROXY_VONAME	 = "x509UserProxyVOName";
  const char * const ATTR_X509_USER_PROXY_FIRST_FQAN	 = "x509UserProxyFirstFQAN";
-@@ -346,6 +350,10 @@ const char * const ATTR_JOB_OUTPUT				 = "Out";
+@@ -282,6 +286,7 @@ const char * const ATTR_HOOK_KEYWORD             = "HookKeyword";
+ const char * const ATTR_IDLE_JOBS                = "IdleJobs";
+ const char * const ATTR_IMAGE_SIZE				 = "ImageSize";
+ const char * const ATTR_RESIDENT_SET_SIZE        = "ResidentSetSize";
++const char * const ATTR_PROPORTIONAL_SET_SIZE    = "ProportionalSetSizeKb";
+ const char * const ATTR_INTERACTIVE			 = "Interactive";
+ const char * const ATTR_IS_DAEMON_CORE           = "IsDaemonCore";
+ const char * const ATTR_IS_OWNER                 = "IsOwner";
+@@ -346,6 +351,10 @@ const char * const ATTR_JOB_OUTPUT				 = "Out";
  const char * const ATTR_JOB_OUTPUT_ORIG			 = "OutOrig";
  const char * const ATTR_JOB_OUTPUT_SIZE			 = "OutSize";
  const char * const ATTR_JOB_PID                  = "JobPid";
@@ -111188,7 +113469,7 @@ index a189a7b..54b006b 100644
  const char * const ATTR_JOB_PRIO                 = "JobPrio";
  const char * const ATTR_JOB_COMMITTED_TIME		 = "CommittedTime";
  const char * const ATTR_JOB_LANGUAGE             = "JobLanguage";
-@@ -424,6 +432,8 @@ const char * const ATTR_MAX_HOSTS				 = "MaxHosts";
+@@ -424,6 +433,8 @@ const char * const ATTR_MAX_HOSTS				 = "MaxHosts";
  const char * const ATTR_MAX_JOB_RETIREMENT_TIME  = "MaxJobRetirementTime";
  const char * const ATTR_MAX_JOBS_RUNNING         = "MaxJobsRunning";
  const char * const ATTR_MEMORY                   = "Memory";
@@ -111197,7 +113478,7 @@ index a189a7b..54b006b 100644
  const char * const ATTR_MIN_HOSTS				 = "MinHosts";
  const char * const ATTR_MIPS                     = "Mips";
  const char * const ATTR_MPI_IS_MASTER            = "MPIIsMaster";
-@@ -591,6 +601,27 @@ const char * const ATTR_TOTAL_LOCAL_RUNNING_JOBS = "TotalLocalJobsRunning";
+@@ -591,6 +602,27 @@ const char * const ATTR_TOTAL_LOCAL_RUNNING_JOBS = "TotalLocalJobsRunning";
  const char * const ATTR_TOTAL_LOCAL_IDLE_JOBS	 = "TotalLocalJobsIdle";
  const char * const ATTR_TOTAL_SCHEDULER_RUNNING_JOBS = "TotalSchedulerJobsRunning";
  const char * const ATTR_TOTAL_SCHEDULER_IDLE_JOBS	 = "TotalSchedulerJobsIdle";
@@ -111225,7 +113506,7 @@ index a189a7b..54b006b 100644
  const char * const ATTR_TOTAL_SLOTS			 = "TotalSlots";
  const char * const ATTR_TOTAL_TIME_IN_CYCLE		   = "TotalTimeInCycle";	
  const char * const ATTR_TOTAL_TIME_BACKFILL_BUSY      = "TotalTimeBackfillBusy";
-@@ -606,6 +637,7 @@ const char * const ATTR_TOTAL_TIME_PREEMPTING_KILLING = "TotalTimePreemptingKill
+@@ -606,6 +638,7 @@ const char * const ATTR_TOTAL_TIME_PREEMPTING_KILLING = "TotalTimePreemptingKill
  const char * const ATTR_TOTAL_TIME_PREEMPTING_VACATING = "TotalTimePreemptingVacating";
  const char * const ATTR_TOTAL_TIME_UNCLAIMED_BENCHMARKING = "TotalTimeUnclaimedBenchmarking";
  const char * const ATTR_TOTAL_TIME_UNCLAIMED_IDLE     = "TotalTimeUnclaimedIdle";
@@ -111233,7 +113514,7 @@ index a189a7b..54b006b 100644
  
  // Deprecated (cruft) -- use: ATTR_TOTAL_SLOTS;
  const char * const ATTR_TOTAL_VIRTUAL_MACHINES	 = "TotalVirtualMachines";
-@@ -864,6 +896,19 @@ const char * const ATTR_AMAZON_REMOTE_VM_NAME = "AmazonRemoteVirtualMachineName"
+@@ -864,6 +897,19 @@ const char * const ATTR_AMAZON_REMOTE_VM_NAME = "AmazonRemoteVirtualMachineName"
  const char * const ATTR_AMAZON_INSTANCE_TYPE = "AmazonInstanceType";
  //************* End of changes for Amamzon Jobs *****************//
  
@@ -111253,7 +113534,7 @@ index a189a7b..54b006b 100644
  
  //************* Added for Lease Manager *******************//
  const char * const ATTR_LEASE_MANAGER_IP_ADDR = "LeaseManagerIpAddr";
-@@ -904,6 +949,9 @@ const char * const ATTR_HASH_NAME = "HashName";
+@@ -904,6 +950,9 @@ const char * const ATTR_HASH_NAME = "HashName";
  const char * const ATTR_AUTHENTICATED_IDENTITY = "AuthenticatedIdentity";
  const char * const ATTR_DELEGATE_JOB_GSI_CREDENTIALS_LIFETIME = "DelegateJobGSICredentialsLifetime";
  
@@ -111263,13 +113544,13 @@ index a189a7b..54b006b 100644
  const char * const ATTR_TRANSFER_QUEUE_NUM_UPLOADING = "TransferQueueNumUploading";
  const char * const ATTR_TRANSFER_QUEUE_NUM_DOWNLOADING = "TransferQueueNumDownloading";
  const char * const ATTR_TRANSFER_QUEUE_MAX_UPLOADING = "TransferQueueMaxUploading";
-@@ -912,3 +960,4 @@ const char * const ATTR_TRANSFER_QUEUE_NUM_WAITING_TO_UPLOAD = "TransferQueueNum
+@@ -912,3 +961,4 @@ const char * const ATTR_TRANSFER_QUEUE_NUM_WAITING_TO_UPLOAD = "TransferQueueNum
  const char * const ATTR_TRANSFER_QUEUE_NUM_WAITING_TO_DOWNLOAD = "TransferQueueNumWaitingToDownload";
  const char * const ATTR_TRANSFER_QUEUE_UPLOAD_WAIT_TIME = "TransferQueueUploadWaitTime";
  const char * const ATTR_TRANSFER_QUEUE_DOWNLOAD_WAIT_TIME = "TransferQueueDownloadWaitTime";
 +
 diff --git a/src/condor_utils/condor_config.cpp b/src/condor_utils/condor_config.cpp
-index 7517e66..13d0319 100644
+index 7517e66..6f9a521 100644
 --- a/src/condor_utils/condor_config.cpp
 +++ b/src/condor_utils/condor_config.cpp
 @@ -69,7 +69,6 @@
@@ -111280,6 +113561,42 @@ index 7517e66..13d0319 100644
  #include "condor_distribution.h"
  #include "condor_environ.h"
  #include "setenv.h"
+@@ -1540,21 +1539,22 @@ param_with_default_abort(const char *name, int abort)
+ 		// something in the Default Table.
+ 
+ 		// The candidate wasn't in the Config Table, so check the Default Table
+-		val = param_default_string(next_param_name);
+-		if (val != NULL) {
++		const char * def = param_default_string(next_param_name);
++		if (def != NULL) {
+ 			// Yay! Found something! Add the entry found in the Default 
+ 			// Table to the Config Table. This could be adding an empty
+ 			// string. If a default found, the loop stops searching.
+-			insert(next_param_name, val, ConfigTab, TABLESIZE);
++			insert(next_param_name, def, ConfigTab, TABLESIZE);
+ 			// also add it to the lame extra-info table
+ 			if (extra_info != NULL) {
+ 				extra_info->AddInternalParam(next_param_name);
+ 			}
+-			if (val[0] == '\0') {
++			if (def[0] == '\0') {
+ 				// If indeed it was empty, then just bail since it was
+ 				// validly found in the Default Table, but empty.
+ 				return NULL;
+ 			}
++            val = const_cast<char*>(def); // TJ: this is naughty, but expand_macro will replace it soon.
+ 		}
+ 	}
+ 
+@@ -2560,7 +2560,7 @@ write_config_file(const char* pathname) {
+ }
+ 
+ int
+-write_config_variable(param_info_t* value, void* file_desc) {
++write_config_variable(const param_info_t* value, void* file_desc) {
+ 	int config_fd = *((int*) file_desc);
+ 	char* actual_value = param(value->name);
+ 	if(strcmp(actual_value, value->str_val) != 0) {
 diff --git a/src/condor_utils/condor_event.h b/src/condor_utils/condor_event.h
 index 285c4d9..f9c142f 100644
 --- a/src/condor_utils/condor_event.h
@@ -111547,6 +113864,101 @@ index abd4ef0..c6f2769 100644
  							// handle it in expand_macro().
  							// Note that $$(DOLLARDOLLAR) is handled a little
  							// differently.  Instead of skipping over it,
+diff --git a/src/condor_utils/cron_job.cpp b/src/condor_utils/cron_job.cpp
+index 735cabb..5687b03 100644
+--- a/src/condor_utils/cron_job.cpp
++++ b/src/condor_utils/cron_job.cpp
+@@ -46,6 +46,7 @@ CronJob::CronJob( CronJobParams *params, CronJobMgr &mgr )
+ 		  m_killTimer( -1 ),
+ 		  m_num_outputs( 0 ),				// No data produced yet
+ 		  m_num_runs( 0 ),					// Hasn't run yet
++		  m_num_fails( 0 ),
+ 		  m_last_start_time( 0 ),
+ 		  m_last_exit_time( 0 ),
+ 		  m_run_load( 0.0 ),
+@@ -181,14 +182,15 @@ CronJob::Schedule( void )
+ {
+ 	dprintf( D_FULLDEBUG,
+ 			 "CronJob::Schedule '%s' "
+-			 "IR=%c IP=%c IWE=%c IOS=%c IOD=%c nr=%d\n",
++			 "IR=%c IP=%c IWE=%c IOS=%c IOD=%c nr=%d nf=%d\n",
+ 			 GetName(),
+ 			 IsReady() ? 'T' : 'F',
+ 			 IsPeriodic() ? 'T' : 'F',
+ 			 IsWaitForExit() ? 'T' : 'F',
+ 			 IsOneShot() ? 'T' : 'F',
+ 			 IsOnDemand() ? 'T' : 'F',
+-			 m_num_runs );
++			 m_num_runs,
++			 m_num_fails );
+ 
+ 	// If we're not initialized yet, do nothing...
+ 	if ( ! IsInitialized() ) {
+@@ -207,21 +209,21 @@ CronJob::Schedule( void )
+ 	else if ( IsPeriodic() ) {
+ 
+ 		// Start the first run..
+-		if ( 0 == m_num_runs ) {
++		if (  ( 0 == m_num_runs ) && ( 0 == m_num_fails )  ) {
+ 			status = RunJob( );
+ 		}
+ 	}
+ 
+ 	// "Wait for exit" job?  Start at init time
+ 	else if ( IsWaitForExit() ) {
+-		if ( 0 == m_num_runs ) {
++		if (  ( 0 == m_num_runs ) && ( 0 == m_num_fails )  ) {
+ 			status = StartJob( );
+ 		}
+ 	}
+ 
+ 	// One shot?  Only start it if it hasn't been already run
+ 	else if ( IsOneShot() ) {
+-		if ( 0 == m_num_runs ) {
++		if (  ( 0 == m_num_runs ) && ( 0 == m_num_fails )  ) {
+ 			status = StartJob( );
+ 		}
+ 	}
+@@ -349,17 +351,19 @@ CronJob::Reaper( int exitPid, int exitStatus )
+ {
+ 	if( WIFSIGNALED(exitStatus) ) {
+ 		dprintf( D_FULLDEBUG, "CronJob: '%s' (pid %d) exit_signal=%d\n",
+-				 GetName(), exitPid, WTERMSIG(exitStatus) );
++			 GetName(), exitPid, WTERMSIG(exitStatus) );
+ 	} else {
+ 		dprintf( D_FULLDEBUG, "CronJob: '%s' (pid %d) exit_status=%d\n",
+-				 GetName(), exitPid, WEXITSTATUS(exitStatus) );
++			 GetName(), exitPid, WEXITSTATUS(exitStatus) );
+ 	}
+ 
+ 	// What if the PIDs don't match?!
+ 	if ( exitPid != m_pid ) {
+-		dprintf( D_ALWAYS, "CronJob: WARNING: Child PID %d != Exit PID %d\n",
+-				 m_pid, exitPid );
++		dprintf( D_ALWAYS, 
++			"CronJob: WARNING: Child PID %d != Exit PID %d\n",
++			m_pid, exitPid );
+ 	}
++
+ 	m_pid = 0;
+ 	m_last_exit_time = time(NULL);
+ 	m_run_load = 0.0;
+@@ -545,7 +549,14 @@ CronJob::StartJobProcess( void )
+ 	// Did it work?
+ 	if ( m_pid <= 0 ) {
+ 		dprintf( D_ALWAYS, "CronJob: Error running job '%s'\n", GetName() );
+-		CleanAll( );
++		CleanAll();
++		SetState( CRON_IDLE );
++		m_num_fails++;
++
++		// Finally, notify my manager to transition the startd
++		// from benchmarking back to idle activity if there are no
++		// more benchmarks to be scheduled.
++		m_mgr.JobExited( *this );
+ 		return -1;
+ 	}
+ 
 diff --git a/src/condor_utils/cron_job_params.cpp b/src/condor_utils/cron_job_params.cpp
 index 9e19571..1aaad8b 100644
 --- a/src/condor_utils/cron_job_params.cpp
@@ -111648,10 +114060,564 @@ index ddc46f3..8114ad2 100644
  	char * filename;
  };
 diff --git a/src/condor_utils/dprintf.cpp b/src/condor_utils/dprintf.cpp
-index fa9749e..a1bc148 100644
+index fa9749e..93115ec 100644
 --- a/src/condor_utils/dprintf.cpp
 +++ b/src/condor_utils/dprintf.cpp
-@@ -1328,6 +1328,11 @@ lock_or_mutex_file(int fd, LOCK_TYPE type, int do_block)
+@@ -56,6 +56,8 @@
+ FILE *debug_lock(int debug_level, const char *mode, int force_lock);
+ FILE *open_debug_file( int debug_level, const char flags[] );
+ void debug_unlock(int debug_level);
++void debug_close_file(int debug_level);
++void debug_close_lock();
+ void preserve_log_file(int debug_level);
+ void _condor_dprintf_exit( int error_code, const char* msg );
+ void _condor_set_debug_flags( const char *strflags );
+@@ -87,7 +89,13 @@ static int DebugIsLocked = 0;
+ static int DebugLockDelay = 0; /* seconds spent waiting for lock */
+ static time_t DebugLockDelayPeriodStarted = 0;
+ 
+-FILE	*DebugFP = 0;
++/*
++ * On Windows we have the ability to hold open the handle/FD to the
++ * log file.  On Linux this is not enabled because of the hard global
++ * limit to FDs.  Windows can open as many as you want short of running
++ * out of physical resources like memory.
++ */
++FILE	*DebugFPs[D_NUMLEVELS+1] = { NULL };
+ 
+ /*
+  * This is last modification time of the main debug file as returned
+@@ -129,6 +137,8 @@ int		SetSyscalls(int mode);
+ 
+ int		LockFd = -1;
+ 
++int		log_keep_open = 0;
++
+ static	int DprintfBroken = 0;
+ static	int DebugUnlockBroken = 0;
+ #if !defined(WIN32) && defined(HAVE_PTHREADS)
+@@ -212,6 +222,8 @@ _condor_dfprintf_va( int flags, int mask_flags, time_t clock_now, struct tm *tm,
+ 	int my_pid;
+ 	int my_tid;
+ 	int start_pos;
++	FILE *local_fp;
++	int fopen_rc = 1;
+ 
+ 		/* Print the message with the time and a nice identifier */
+ 	if( ((mask_flags|flags) & D_NOHEADER) == 0 ) {
+@@ -232,10 +244,21 @@ _condor_dfprintf_va( int flags, int mask_flags, time_t clock_now, struct tm *tm,
+ 		}
+ 
+ 		if ( (mask_flags|flags) & D_FDS ) {
+-			rc = sprintf_realloc( &buf, &bufpos, &buflen, "(fd:%d) ", fileno(fp) );
++			//Regardless of whether we're keeping the log file open our not, we open
++			//the NULL file for the FD number.
++			if( (local_fp=safe_fopen_wrapper(NULL_FILE,"r",0644)) == NULL )
++			{
++				local_fp = fp;
++				fopen_rc = 0;
++			}
++			rc = sprintf_realloc( &buf, &bufpos, &buflen, "(fd:%d) ", fileno(local_fp) );
+ 			if( rc < 0 ) {
+ 				sprintf_errno = errno;
+ 			}
++			if(fopen_rc)
++			{
++				fopen_rc = fclose_wrapper(local_fp, FCLOSE_RETRY_MAX);
++			}
+ 		}
+ 
+ 		if( (mask_flags|flags) & D_PID ) {
+@@ -342,10 +365,10 @@ _condor_dprintf_va( int flags, const char* fmt, va_list args )
+ 	int saved_errno;
+ 	priv_state	priv;
+ 	int debug_level;
++	FILE *debug_file_ptr = NULL;
+ 
+ 		/* DebugFP should be static initialized to stderr,
+ 	 	   but stderr is not a constant on all systems. */
+-	if( !DebugFP ) DebugFP = stderr;
+ 
+ 		/* If we hit some fatal error in dprintf, this flag is set.
+ 		   If dprintf is broken and someone (like _EXCEPT_Cleanup)
+@@ -459,16 +482,16 @@ _condor_dprintf_va( int flags, const char* fmt, va_list args )
+ 				(DebugFile[debug_level] && (flags&(1<<(debug_level-1))))) {
+ 
+ 					/* Open and lock the log file */
+-				(void)debug_lock(debug_level, NULL, 0);
++				debug_file_ptr = debug_lock(debug_level, NULL, 0);
+ 
+-				if (DebugFP) {
++				if (debug_file_ptr) {
+ #ifdef va_copy
+ 					va_list copyargs;
+ 					va_copy(copyargs, args);
+-					_condor_dfprintf_va(flags,DebugFlags,clock_now,tm,DebugFP,fmt,copyargs);
++					_condor_dfprintf_va(flags,DebugFlags,clock_now,tm,debug_file_ptr,fmt,copyargs);
+ 					va_end(copyargs);
+ #else
+-					_condor_dfprintf_va(flags,DebugFlags,clock_now,tm,DebugFP,fmt,args);
++					_condor_dfprintf_va(flags,DebugFlags,clock_now,tm,debug_file_ptr,fmt,args);
+ #endif
+ 				}
+ 
+@@ -599,13 +622,13 @@ debug_open_lock(void)
+ 
+ 	if ( use_kernel_mutex == -1 ) {
+ #ifdef WIN32
+-			// Use a mutex by default on Win32
++		// Use a mutex by default on Win32
+ 		use_kernel_mutex = param_boolean_int("FILE_LOCK_VIA_MUTEX", TRUE);
+ #else
+-			// Use file locking by default on Unix.  We should 
+-			// call param_boolean_int here, but since locking via
+-			// a mutex is not yet implemented on Unix, we will force it
+-			// to always be FALSE no matter what the config file says.
++		// Use file locking by default on Unix.  We should 
++		// call param_boolean_int here, but since locking via
++		// a mutex is not yet implemented on Unix, we will force it
++		// to always be FALSE no matter what the config file says.
+ 		// use_kernel_mutex = param_boolean_int("FILE_LOCK_VIA_MUTEX", FALSE);
+ 		use_kernel_mutex = FALSE;
+ #endif
+@@ -613,7 +636,6 @@ debug_open_lock(void)
+ 
+ 		/* Acquire the lock */
+ 	if( DebugLock ) {
+-		
+ 		if( use_kernel_mutex == FALSE) {
+ 			if (LockFd > 0 ) {
+ 				fstat(LockFd, &fstatus);
+@@ -639,9 +661,9 @@ debug_open_lock(void)
+ 
+ 		errno = 0;
+ #ifdef WIN32
+-		if( lock_or_mutex_file(LockFd,WRITE_LOCK,TRUE) < 0 ) 
++		if( lock_or_mutex_file(LockFd,WRITE_LOCK,TRUE) < 0 )
+ #else
+-		if( lock_file_plain(LockFd,WRITE_LOCK,TRUE) < 0 ) 
++		if( lock_file_plain(LockFd,WRITE_LOCK,TRUE) < 0 )
+ #endif
+ 		{
+ 			save_errno = errno;
+@@ -683,29 +705,44 @@ debug_lock(int debug_level, const char *mode, int force_lock )
+ 	int save_errno;
+ 	char msg_buf[DPRINTF_ERR_MAX];
+ 	int locked = 0;
++	FILE *debug_file_ptr;
++
++	debug_file_ptr = DebugFPs[debug_level];
+ 
+ 	if ( mode == NULL ) {
+ 		mode = "a";
+ 	}
+ 
+-	if ( DebugFP == NULL ) {
+-		DebugFP = stderr;
+-	}
++	if(DebugFile[debug_level] == NULL)
++		return stderr;
++
++	errno = 0;
+ 
+ 	priv = _set_priv(PRIV_CONDOR, __FILE__, __LINE__, 0);
+ 
+-	if( DebugShouldLockToAppend || force_lock ) {
+-		debug_open_lock();
+-		locked = 1;
++	if(debug_file_ptr)
++	{
++		//Hypothetically if we never closed the file, we
++		//should have never unlocked it either.  The best
++		//way to handle this will need further thought.
++		if( DebugShouldLockToAppend || force_lock )
++			locked = 1;
+ 	}
++	else
++	{
++		if( DebugShouldLockToAppend || force_lock ) {
++			debug_open_lock();
++			locked = 1;
++		}
+ 
+-	if( DebugFile[debug_level] ) {
+-		errno = 0;
+-
+-		DebugFP = (FILE *) open_debug_file(debug_level, mode);
++		//open_debug_file will set DebugFPs[debug_level] so we do
++		//not have to worry about it in this function, assuming
++		//there are no further errors.
++		debug_file_ptr = open_debug_file(debug_level, mode);
+ 
+-		if( DebugFP == NULL ) {
++		if( debug_file_ptr == NULL ) {
+ 			if (debug_level > 0) return NULL;
++			
+ 			save_errno = errno;
+ #ifdef WIN32
+ 			if (DebugContinueOnOpenFailure) {
+@@ -721,99 +758,141 @@ debug_lock(int debug_level, const char *mode, int force_lock )
+ 					 DebugFile[debug_level] );
+ 			_condor_dprintf_exit( save_errno, msg_buf );
+ 		}
+-			/* Seek to the end */
+-		if( (length=lseek(fileno(DebugFP), 0, SEEK_END)) < 0 ) {
+-			if (debug_level > 0) {
+-				fclose_wrapper( DebugFP, FCLOSE_RETRY_MAX );
+-				DebugFP = NULL;
+-				return NULL;
+-			}
+-			save_errno = errno;
+-			snprintf( msg_buf, sizeof(msg_buf), "Can't seek to end of DebugFP file\n" );
+-			_condor_dprintf_exit( save_errno, msg_buf );
+-		}
++	}
+ 
+-			/* If it's too big, preserve it and start a new one */
+-		if( MaxLog[debug_level] && length > MaxLog[debug_level] ) {
++	if( (length=lseek(fileno(debug_file_ptr), 0, SEEK_END)) < 0 ) {
++		if (debug_level > 0) {
++			if(locked) debug_close_lock();
++			debug_close_file(debug_level);
+ 
+-			if( !locked ) {
+-					/* We need to redo everything we just did but with a lock
+-					 * to prevent a race in which multiple processes rotate
+-					 * the file.
+-					 */
++			return NULL;
++		}
++		save_errno = errno;
++		snprintf( msg_buf, sizeof(msg_buf), "Can't seek to end of DebugFP file\n" );
++		_condor_dprintf_exit( save_errno, msg_buf );
++	}
+ 
+-				_set_priv(priv, __FILE__, __LINE__, 0);
++	if( MaxLog[debug_level] && length > MaxLog[debug_level] ) {
++		if( !locked ) {
++			/*
++			 * We only need to redo everything if there is a lock defined
++			 * for the log.
++			 */
+ 
+-				debug_unlock(debug_level);
++			if (debug_file_ptr) {
++				int result = fflush( debug_file_ptr );
++				if (result < 0) {
++					DebugUnlockBroken = 1;
++					_condor_dprintf_exit(errno, "Can't fflush debug log file\n");
++				}
++			}
+ 
++			/*
++			 * We need to be in PRIV_CONDOR for the code in these two
++			 * functions, so since we are already in that privilege mode,
++			 * we do not go back to the old priv state until we call the
++			 * two functions.
++			 */
++			if(DebugLock)
++			{
++				debug_close_lock();
++				debug_close_file(debug_level);
++				_set_priv(priv, __FILE__, __LINE__, 0);
+ 				return debug_lock(debug_level, mode, 1);
+ 			}
+-
+-				// Casting length to int to get rid of compile warning.
+-				// Probably format should be %ld, and we should cast to
+-				// long int, but I'm afraid of changing the output format.
+-				// wenger 2009-02-24.
+-			_condor_dfprintf( DebugFP, "MaxLog = %d, length = %d\n",
+-							  (int) MaxLog[debug_level], (int)length );
+-			preserve_log_file(debug_level);
+ 		}
++
++		// Casting length to int to get rid of compile warning.
++		// Probably format should be %ld, and we should cast to
++		// long int, but I'm afraid of changing the output format.
++		// wenger 2009-02-24.
++		_condor_dfprintf( debug_file_ptr, "MaxLog = %d, length = %d\n",
++			(int) MaxLog[debug_level], (int)length );
++		
++		preserve_log_file(debug_level);
++		debug_file_ptr = DebugFPs[debug_level];
++
+ 	}
+ 
+ 	_set_priv(priv, __FILE__, __LINE__, 0);
+ 
+-	return DebugFP;
++	return debug_file_ptr;
+ }
+ 
+-void
+-debug_unlock(int debug_level)
++void debug_close_lock()
+ {
+-	priv_state priv;
++	int flock_errno;
+ 	char msg_buf[DPRINTF_ERR_MAX];
+-	int flock_errno = 0;
+-	int result = 0;
+-
+-	if( DebugUnlockBroken ) {
++	if(DebugUnlockBroken)
+ 		return;
+-	}
+-
+-	priv = _set_priv(PRIV_CONDOR, __FILE__, __LINE__, 0);
+-
+-	if (DebugFP) {
+-		result = fflush( DebugFP );
+-		if (result < 0) {
+-				DebugUnlockBroken = 1;
+-				_condor_dprintf_exit(errno, "Can't fflush debug log file\n");
+-		}
+-	}
+ 
+-	if( DebugIsLocked ) {
+-			/* Don't forget to unlock the file */
++	if(DebugIsLocked)
++	{
+ 		errno = 0;
+-
+-#if defined(WIN32)
++#ifdef WIN32
+ 		if ( lock_or_mutex_file(LockFd,UN_LOCK,TRUE) < 0 )
+ #else
+-		if( lock_file_plain(LockFd,UN_LOCK,TRUE) < 0 ) 
++		if( lock_file_plain(LockFd,UN_LOCK,TRUE) < 0 )
+ #endif
+ 		{
+ 			flock_errno = errno;
+ 			snprintf( msg_buf, sizeof(msg_buf), "Can't release exclusive lock on \"%s\", LockFd=%d\n", 
+-					 DebugLock, LockFd );
++				DebugLock, LockFd );
+ 			DebugUnlockBroken = 1;
+ 			_condor_dprintf_exit( flock_errno, msg_buf );
+ 		}
+ 	}
++}
++
++void debug_close_file(int debug_level)
++{
++	FILE *debug_file_ptr;
++
++	debug_file_ptr = DebugFPs[debug_level];
++
+ 
+ 	if( DebugFile[debug_level] ) {
+-		if (DebugFP) {
+-			int close_result = fclose_wrapper( DebugFP, FCLOSE_RETRY_MAX );
++		if (debug_file_ptr) {
++			int close_result = fclose_wrapper( debug_file_ptr, FCLOSE_RETRY_MAX );
+ 			if (close_result < 0) {
+ 				DebugUnlockBroken = 1;
+ 				_condor_dprintf_exit(errno, "Can't fclose debug log file\n");
+ 			}
++			DebugFPs[debug_level] = NULL;
+ 		}
+-		DebugFP = NULL;
+ 	}
++}
++
++void
++debug_unlock(int debug_level)
++{
++	priv_state priv;
++	int flock_errno = 0;
++	int result = 0;
++
++	FILE *debug_file_ptr;
++
++	if(log_keep_open)
++		return;
++
++	debug_file_ptr = DebugFPs[debug_level];
++
++	if( DebugUnlockBroken ) {
++		return;
++	}
++
++	priv = _set_priv(PRIV_CONDOR, __FILE__, __LINE__, 0);
++
++	if (debug_file_ptr) {
++		result = fflush( debug_file_ptr );
++		if (result < 0) {
++				DebugUnlockBroken = 1;
++				_condor_dprintf_exit(errno, "Can't fflush debug log file\n");
++		}
++	}
++
++	debug_close_lock();
++	debug_close_file(debug_level);
+ 
+ 	_set_priv(priv, __FILE__, __LINE__, 0);
+ }
+@@ -834,28 +913,33 @@ preserve_log_file(int debug_level)
+ 	const char *timestamp;
+ 	int			result;
+ 	int			file_there = 0;
++	FILE		*debug_file_ptr;
+ #ifndef WIN32
+ 	struct stat buf;
+ #endif
+ 	char msg_buf[DPRINTF_ERR_MAX];
+ 
++	debug_file_ptr = DebugFPs[debug_level];
++
+ 	priv = _set_priv(PRIV_CONDOR, __FILE__, __LINE__, 0);
+ 	(void)setBaseName(DebugFile[debug_level]);
+ 	timestamp = createRotateFilename(NULL, MaxLogNum[debug_level]);
+ 	(void)sprintf( old, "%s.%s", DebugFile[debug_level] , timestamp);
+-	_condor_dfprintf( DebugFP, "Saving log file to \"%s\"\n", old );
+-	(void)fflush( DebugFP );
++	_condor_dfprintf( debug_file_ptr, "Saving log file to \"%s\"\n", old );
++	(void)fflush( debug_file_ptr );
++
++	fclose_wrapper( debug_file_ptr, FCLOSE_RETRY_MAX );
++	debug_file_ptr = NULL;
++	DebugFPs[debug_level] = debug_file_ptr;
+ 
+-	fclose_wrapper( DebugFP, FCLOSE_RETRY_MAX );
+-	DebugFP = NULL;
+ 
+ 	result = rotateTimestamp(timestamp, MaxLogNum[debug_level]);
+ 
+ #if defined(WIN32)
+ 	if (result < 0) { // MoveFileEx and Copy failed
+ 		failed_to_rotate = TRUE;
+-		DebugFP = open_debug_file(debug_level, "w");
+-		if ( DebugFP ==  NULL ) {
++		debug_file_ptr = open_debug_file(debug_level, "w");
++		if ( debug_file_ptr ==  NULL ) {
+ 			still_in_old_file = TRUE;
+ 		}
+ 	}
+@@ -906,35 +990,40 @@ preserve_log_file(int debug_level)
+ 
+ #endif
+ 
+-	if (DebugFP == NULL) {
+-		DebugFP = open_debug_file(debug_level, "a");
++	if (debug_file_ptr == NULL) {
++		debug_file_ptr = open_debug_file(debug_level, "a");
+ 	}
+ 
+-	if( DebugFP == NULL ) {
+-		DebugFP = stderr;
++	if( debug_file_ptr == NULL ) {
++		debug_file_ptr = stderr;
++
+ 		save_errno = errno;
+ 		snprintf( msg_buf, sizeof(msg_buf), "Can't open file for debug level %d\n",
+ 				 debug_level ); 
+ 		_condor_dprintf_exit( save_errno, msg_buf );
+ 	}
++	else
++	{
++		DebugFPs[debug_level] = debug_file_ptr;
++	}
+ 
+ 	if ( !still_in_old_file ) {
+-		_condor_dfprintf (DebugFP, "Now in new log file %s\n", DebugFile[debug_level]);
++		_condor_dfprintf (debug_file_ptr, "Now in new log file %s\n", DebugFile[debug_level]);
+ 	}
+ 
+ 	// We may have a message left over from the succeeded rename after which the file
+ 	// may have been recreated by another process. Tell user about it.
+ 	if (file_there > 0) {
+-		_condor_dfprintf(DebugFP, "WARNING: %s", msg_buf);
++		_condor_dfprintf(debug_file_ptr, "WARNING: %s", msg_buf);
+ 	}
+ 
+ 	if ( failed_to_rotate || rename_failed ) {
+-		_condor_dfprintf(DebugFP,"WARNING: Failed to rotate log into file %s!\n",old);
++		_condor_dfprintf(debug_file_ptr,"WARNING: Failed to rotate log into file %s!\n",old);
+ 		if( rename_failed ) {
+-			_condor_dfprintf(DebugFP,"Likely cause is that another Condor process rotated the file at the same time.\n");
++			_condor_dfprintf(debug_file_ptr,"Likely cause is that another Condor process rotated the file at the same time.\n");
+ 		}
+ 		else {
+-			_condor_dfprintf(DebugFP,"       Perhaps someone is keeping log files open???");
++			_condor_dfprintf(debug_file_ptr,"       Perhaps someone is keeping log files open???");
+ 		}
+ 	}
+ 	
+@@ -968,19 +1057,19 @@ _condor_fd_panic( int line, const char* file )
+ 		(void)close( i );
+ 	}
+ 	if( DebugFile[0] ) {
+-		DebugFP = safe_fopen_wrapper(DebugFile[0], "a", 0644);
++		DebugFPs[0] = safe_fopen_wrapper(DebugFile[0], "a", 0644);
+ 	}
+ 
+-	if( DebugFP == NULL ) {
++	if( DebugFPs[0] == NULL ) {
+ 		save_errno = errno;
+ 		snprintf( msg_buf, sizeof(msg_buf), "Can't open \"%s\"\n%s\n", DebugFile[0],
+ 				 panic_msg ); 
+ 		_condor_dprintf_exit( save_errno, msg_buf );
+ 	}
+ 		/* Seek to the end */
+-	(void)lseek( fileno(DebugFP), 0, SEEK_END );
+-	fprintf( DebugFP, "%s\n", panic_msg );
+-	(void)fflush( DebugFP );
++	(void)lseek( fileno(DebugFPs[0]), 0, SEEK_END );
++	fprintf( DebugFPs[0], "%s\n", panic_msg );
++	(void)fflush( DebugFPs[0] );
+ 
+ 	_condor_dprintf_exit( 0, panic_msg );
+ }
+@@ -1026,6 +1115,9 @@ open_debug_file(int debug_level, const char flags[])
+ 	char msg_buf[DPRINTF_ERR_MAX];
+ 	int save_errno;
+ 
++	FILE* debug_file_fp;
++	debug_file_fp = DebugFPs[debug_level];
++
+ 	priv = _set_priv(PRIV_CONDOR, __FILE__, __LINE__, 0);
+ 
+ 	/* Note: The log file shouldn't need to be group writeable anymore,
+@@ -1039,10 +1131,10 @@ open_debug_file(int debug_level, const char flags[])
+ 			_condor_fd_panic( __LINE__, __FILE__ );
+ 		}
+ #endif
+-		if (DebugFP == 0) {
+-			DebugFP = stderr;
++		if (debug_file_fp == NULL) {
++			debug_file_fp = stderr;
+ 		}
+-		_condor_dfprintf( DebugFP, "Can't open \"%s\"\n", DebugFile[debug_level] );
++		_condor_dfprintf( debug_file_fp, "Can't open \"%s\"\n", DebugFile[debug_level] );
+ 		if( debug_level == 0 ) {
+ 			snprintf( msg_buf, sizeof(msg_buf), "Can't open \"%s\"\n",
+ 					 DebugFile[debug_level] );
+@@ -1055,6 +1147,7 @@ open_debug_file(int debug_level, const char flags[])
+ 	}
+ 
+ 	_set_priv(priv, __FILE__, __LINE__, 0);
++	DebugFPs[debug_level] = fp;
+ 
+ 	return fp;
+ }
+@@ -1135,7 +1228,14 @@ _condor_dprintf_exit( int error_code, const char* msg )
+ 		DprintfBroken = 1;
+ 
+ 			/* Don't forget to unlock the log file, if possible! */
+-		debug_unlock(0);
++		for (int debug_level = 0; debug_level <= D_NUMLEVELS; debug_level++)
++		{
++			if(DebugFPs[debug_level])
++			{
++				debug_close_lock();
++				debug_close_file(debug_level);
++			}
++		}
+ 	}
+ 
+ 		/* If _EXCEPT_Cleanup is set for cleaning up during EXCEPT(),
+@@ -1328,6 +1428,11 @@ lock_or_mutex_file(int fd, LOCK_TYPE type, int do_block)
  	char *ptr = NULL;
  	char mutex_name[MAX_PATH];
  
@@ -111663,7 +114629,7 @@ index fa9749e..a1bc148 100644
  	if ( use_kernel_mutex == FALSE ) {
  			// use a filesystem lock
  		return lock_file_plain(fd,type,do_block);
-@@ -1341,10 +1346,6 @@ lock_or_mutex_file(int fd, LOCK_TYPE type, int do_block)
+@@ -1341,10 +1446,6 @@ lock_or_mutex_file(int fd, LOCK_TYPE type, int do_block)
  		// starving to get the lock.  The Win32 mutex object,
  		// on the other hand, is FIFO --- thus starvation is avoided.
  
@@ -111674,6 +114640,116 @@ index fa9749e..a1bc148 100644
  
  		// first, open a handle to the mutex if we haven't already
  	if ( debug_win32_mutex == NULL && DebugLock ) {
+@@ -1547,6 +1648,27 @@ dprintf_dump_stack(void) {
+ 
+ #endif
+ 
++int debug_open_fds(int *open_fds)
++{
++	int counter = 0;
++
++	if(open_fds == NULL)
++		return 0;
++
++	for(int index = 0; index <= D_NUMLEVELS; index++)
++	{
++		if(DebugFPs[index] != NULL)
++		{
++			open_fds[index] = fileno(DebugFPs[index]);
++			++counter;
++		}
++		else
++			open_fds[index] = -1;
++	}
++
++	return counter;
++}
++
+ #if !defined(HAVE_BACKTRACE)
+ void
+ dprintf_dump_stack(void) {
+diff --git a/src/condor_utils/dprintf_config.cpp b/src/condor_utils/dprintf_config.cpp
+index 5781868..156b2cb 100644
+--- a/src/condor_utils/dprintf_config.cpp
++++ b/src/condor_utils/dprintf_config.cpp
+@@ -37,7 +37,7 @@
+ int		Termlog = 0;
+ 
+ extern int		DebugFlags;
+-extern FILE		*DebugFP;
++extern FILE		*DebugFPs[D_NUMLEVELS+1];
+ extern off_t		MaxLog[D_NUMLEVELS+1];
+ extern int 			MaxLogNum[D_NUMLEVELS+1];
+ extern char		*DebugFile[D_NUMLEVELS+1];
+@@ -47,12 +47,11 @@ extern int		_condor_dprintf_works;
+ extern time_t	DebugLastMod;
+ extern int		DebugUseTimestamps;
+ extern int      DebugContinueOnOpenFailure;
++extern int		log_keep_open;
+ 
+ extern void		_condor_set_debug_flags( const char *strflags );
+ extern void		_condor_dprintf_saved_lines( void );
+ 
+-FILE *open_debug_file( int debug_level, char flags[] );
+-
+ #if HAVE_EXT_GCB
+ void	_condor_gcb_dprintf_va( int flags, char* fmt, va_list args );
+ extern "C" void Generic_set_log_va(void(*app_log_va)(int level, char *fmt, va_list args));
+@@ -104,6 +103,8 @@ dprintf_config( const char *subsys )
+ 	static int first_time = 1;
+ 	int want_truncate;
+ 	int debug_level;
++	FILE *debug_file_fp;
++	int log_open_default = TRUE;
+ 
+ 	/*  
+ 	**  We want to initialize this here so if we reconfig and the
+@@ -248,12 +249,12 @@ dprintf_config( const char *subsys )
+ 				}
+ 
+ 				if( first_time && want_truncate ) {
+-					DebugFP = debug_lock(debug_level, "w", 0);
++					debug_file_fp = debug_lock(debug_level, "w", 0);
+ 				} else {
+-					DebugFP = debug_lock(debug_level, "a", 0);
++					debug_file_fp = debug_lock(debug_level, "a", 0);
+ 				}
+ 
+-				if( DebugFP == NULL && debug_level == 0 ) {
++				if( debug_file_fp == NULL && debug_level == 0 ) {
+                    #ifdef WIN32
+ 					/*
+ 					** If we could not open the log file, we might want to keep running anyway.
+@@ -278,8 +279,8 @@ dprintf_config( const char *subsys )
+ 					}
+ 				}
+ 
+-				if (DebugFP) (void)debug_unlock( debug_level );
+-				DebugFP = (FILE *)0;
++				if (debug_file_fp) (void)debug_unlock( debug_level );
++				debug_file_fp = NULL;
+ 
+ 				if (debug_level == 0) {
+ 					(void)sprintf(pname, "MAX_%s_LOG", subsys);
+@@ -320,6 +321,18 @@ dprintf_config( const char *subsys )
+ 							   the first couple dprintf don't come out right */
+ 	}
+ 
++#ifndef WIN32
++	if((strcmp(subsys, "SHADOW") == 0) || (strcmp(subsys, "GRIDMANAGER") == 0))
++	{
++		log_open_default = FALSE;
++	}
++#endif
++
++	if(!DebugLock) {
++		sprintf(pname, "%s_LOG_KEEP_OPEN", subsys);
++		log_keep_open = param_boolean_int(pname, log_open_default);
++	}
++
+ 	first_time = 0;
+ 	_condor_dprintf_works = 1;
+ #if HAVE_EXT_GCB
 diff --git a/src/condor_utils/dynuser.h b/src/condor_utils/dynuser.h
 index 751d7c8..abb7bd2 100644
 --- a/src/condor_utils/dynuser.h
@@ -111753,6 +114829,55 @@ index ce5f9cd..cb0419c 100644
  
  class FileLock;
  class MyString;
+diff --git a/src/condor_utils/file_transfer.cpp b/src/condor_utils/file_transfer.cpp
+index 2905d21..46e3ed3 100644
+--- a/src/condor_utils/file_transfer.cpp
++++ b/src/condor_utils/file_transfer.cpp
+@@ -237,7 +237,7 @@ FileTransfer::~FileTransfer()
+ int
+ FileTransfer::SimpleInit(ClassAd *Ad, bool want_check_perms, bool is_server, 
+ 						 ReliSock *sock_to_use, priv_state priv,
+-						 bool use_file_catalog) 
++						 bool use_file_catalog, bool is_spool) 
+ {
+ 	char buf[ATTRLIST_MAX_EXPRESSION];
+ 	char *dynamic_buf = NULL;
+@@ -319,6 +319,21 @@ FileTransfer::SimpleInit(ClassAd *Ad, bool want_check_perms, bool is_server,
+ 				InputFiles->append(buf);			
+ 		}
+ 	}
++
++	// If we are spooling, we want to ignore URLs
++	// We want the file transfer plugin to be invoked at the starter, not the schedd.
++	// See https://condor-wiki.cs.wisc.edu/index.cgi/tktview?tn=2162
++	if (IsClient() && simple_init && is_spool) {
++		InputFiles->rewind();
++		const char *x;
++		while ((x = InputFiles->next())) {
++			if (IsUrl(x)) {
++				InputFiles->deleteCurrent();
++			}
++		}
++		dprintf(D_FULLDEBUG, "Input files: %s\n", InputFiles->print_to_string());
++	}
++	
+ 	if ( Ad->LookupString(ATTR_ULOG_FILE, buf) == 1 ) {
+ 		UserLogFile = strdup(condor_basename(buf));
+ 		// For 7.5.6 and earlier, we want to transfer the user log as
+diff --git a/src/condor_utils/file_transfer.h b/src/condor_utils/file_transfer.h
+index 8f1736e..08f8e1e 100644
+--- a/src/condor_utils/file_transfer.h
++++ b/src/condor_utils/file_transfer.h
+@@ -106,7 +106,8 @@ class FileTransfer {
+ 	int SimpleInit(ClassAd *Ad, bool want_check_perms, bool is_server, 
+ 						 ReliSock *sock_to_use = NULL, 
+ 						 priv_state priv = PRIV_UNKNOWN,
+-						 bool use_file_catalog = true);
++						 bool use_file_catalog = true,
++						 bool is_spool = false);
+ 
+ 	/** @param Ad contains filename remaps for downloaded files.
+ 		       If NULL, turns off remaps.
 diff --git a/src/condor_utils/file_transfer_db.h b/src/condor_utils/file_transfer_db.h
 index 6cac1b3..69ac2c9 100644
 --- a/src/condor_utils/file_transfer_db.h
@@ -111778,6 +114903,19 @@ index 9e050bd..43f6713 100644
  #include "MyString.h"
  
  static char *new_strdup (const char *);
+diff --git a/src/condor_utils/get_random_num.cpp b/src/condor_utils/get_random_num.cpp
+index 82f5590..7cb6466 100644
+--- a/src/condor_utils/get_random_num.cpp
++++ b/src/condor_utils/get_random_num.cpp
+@@ -55,7 +55,7 @@ int get_random_int( void )
+ #if defined(WIN32)
+ 	return rand();
+ #else
+-	return (int) (lrand48() & MAXINT);
++	return (int) (lrand48() & INT_MAX);
+ #endif
+ }
+ 
 diff --git a/src/condor_utils/getwd.unix.cpp b/src/condor_utils/getwd.unix.cpp
 deleted file mode 100644
 index 3ec1c1b..0000000
@@ -112226,8 +115364,371 @@ index b59a107..8099d04 100644
  #include "named_classad.h"
  #include "named_classad_list.h"
  
+diff --git a/src/condor_utils/param_info.cpp b/src/condor_utils/param_info.cpp
+index 4ebff58..0fd163e 100644
+--- a/src/condor_utils/param_info.cpp
++++ b/src/condor_utils/param_info.cpp
+@@ -84,6 +84,8 @@ bucket_t** param_info;
+ 
+ //static int num_entries;
+ 
++#include "param_info_init.c"
++
+ void
+ param_info_init() 
+ {
+@@ -99,22 +101,19 @@ param_info_init()
+ 
+ 	param_info_hash_create(&param_info);
+ 
+-	// due to #793 coupled with the fact that the new param code is disabled for
+-	// the 7.4 series, and enabled for the 7.5 series, we short circuit the
+-	// initialization of the table for the 7.4 series to save on ram in the
+-	// shadow process.
+-
+-	// Normally, I'd use the CondorVersionInfo object here, but since this is
+-	// A C file and I don't want to have to implement a C interface to the
+-	// CondorVersionInfo object, this next line is commented out in the
+-	// trunk, which represents the 7.5 series at the writing of this comment.
+-/*	goto after_data_insertion;*/
+-
+-#include "param_info_init.c"
++    // eventually, we want to do a binary lookup in g_param_info_init_table rather than
++    // creating a hashtable from int and using the hash to do the lookup.  but in the
++    // interest in having minimal changes in this patch, we'll keep the hash table for now.
++    //
++    for (int ii = 0; ii < sizeof(g_param_info_init_table)/sizeof(g_param_info_init_table[0]); ++ii)
++       {
++       param_info_hash_insert(param_info, g_param_info_init_table[ii]);
++       }
+ 
+ /* 	after_data_insertion: ; */
+ }
+ 
++#if 0
+ void
+ param_info_insert(const char* param,
+ 				  const char* aliases,
+@@ -254,13 +253,13 @@ param_info_insert(const char* param,
+ 
+ 	param_info_hash_insert(param_info, p);
+ }
++#endif
+ 
+-
+-char*
++const char*
+ param_default_string(const char* param)
+ {
+-	param_info_t *p;
+-	char* ret = NULL;
++	const param_info_t *p;
++	const char* ret = NULL;
+ 
+ 	param_info_init();
+ 	p = param_info_hash_lookup(param_info, param);
+@@ -268,7 +267,7 @@ param_default_string(const char* param)
+ 	// Don't check the type here, since this is used in param and is used
+ 	// to look up values for all types.
+ 	if (p && p->default_valid) {
+-		ret = const_cast<char*>(p->str_val);
++		ret = p->str_val;
+ 	}
+ 
+ 	return ret;
+@@ -276,16 +275,17 @@ param_default_string(const char* param)
+ 
+ int
+ param_default_integer(const char* param, int* valid) {
+-	param_info_t* p;
++	const param_info_t* p;
+ 	int ret = 0;
+ 
+ 	param_info_init();
+ 
+ 	p = param_info_hash_lookup(param_info, param);
+ 
+-	if (p) {
+-		ret = p->default_val.int_val;
+-		*valid = p->default_valid && (p->type == PARAM_TYPE_INT || p->type == PARAM_TYPE_BOOL);
++	if (p && (p->type == PARAM_TYPE_INT || p->type == PARAM_TYPE_BOOL)) {
++        *valid = p->default_valid;
++        if (*valid)
++            ret = reinterpret_cast<const param_info_PARAM_TYPE_INT*>(p)->int_val;
+ 	} else {
+ 		*valid = 0;
+ 	}
+@@ -302,16 +302,17 @@ double
+ param_default_double(const char* param, int* valid) {
+ 
+ 
+-	param_info_t* p;
++	const param_info_t* p;
+ 	double ret = 0.0;
+ 
+ 	param_info_init();
+ 
+ 	p = param_info_hash_lookup(param_info, param);
+ 
+-	if (p) {
+-		ret = p->default_val.dbl_val;
+-		*valid = p->default_valid && (p->type == PARAM_TYPE_DOUBLE);
++	if (p && (p->type == PARAM_TYPE_DOUBLE)) {
++		*valid = p->default_valid;
++        if (*valid)
++		    ret = reinterpret_cast<const param_info_PARAM_TYPE_DOUBLE*>(p)->dbl_val;
+ 	} else {
+ 		*valid = 0;
+ 	}
+@@ -322,16 +323,21 @@ param_default_double(const char* param, int* valid) {
+ int
+ param_range_integer(const char* param, int* min, int* max) {
+ 
+-	param_info_t* p;
++	const param_info_t* p;
+ 
+ 	p = param_info_hash_lookup(param_info, param);
+ 
+ 	if (p) {
+-		if(p->type != PARAM_TYPE_INT) {
++		if (p->type != PARAM_TYPE_INT) {
+ 			return -1;
+ 		}
+-		*min = p->range_min.int_min;
+-		*max = p->range_max.int_max;
++        if ( ! p->range_valid) {
++            *min = INT_MIN;
++            *max = INT_MAX;
++        } else {
++		    *min = reinterpret_cast<const param_info_PARAM_TYPE_INT_ranged*>(p)->int_min;
++		    *max = reinterpret_cast<const param_info_PARAM_TYPE_INT_ranged*>(p)->int_max;
++        }
+ 	} else {
+ 		/* If the integer isn't known about, then don't assume a range for it */
+ /*		EXCEPT("integer range for param '%s' not found", param);*/
+@@ -343,7 +349,7 @@ param_range_integer(const char* param, int* min, int* max) {
+ int
+ param_range_double(const char* param, double* min, double* max) {
+ 
+-	param_info_t* p;
++	const param_info_t* p;
+ 
+ 	p = param_info_hash_lookup(param_info, param);
+ 
+@@ -351,8 +357,13 @@ param_range_double(const char* param, double* min, double* max) {
+ 		if(p->type != PARAM_TYPE_DOUBLE) {
+ 			return -1;
+ 		}
+-		*min = p->range_min.dbl_min;
+-		*max = p->range_max.dbl_max;
++        if ( ! p->range_valid) {
++            *min = DBL_MIN;
++            *max = DBL_MAX;
++        } else {
++		    *min = reinterpret_cast<const param_info_PARAM_TYPE_DOUBLE_ranged*>(p)->dbl_min;
++		    *max = reinterpret_cast<const param_info_PARAM_TYPE_DOUBLE_ranged*>(p)->dbl_max;
++        }
+ 	} else {
+ 		/* If the double isn't known about, then don't assume a range for it */
+ /*		EXCEPT("double range for param '%s' not found", param);*/
+@@ -554,7 +565,7 @@ validate_regex(const char* pattern, const char* subject) {
+ 
+ void
+ iterate_params(int (*callPerElement)
+-							(param_info_t* /*value*/, void* /*user data*/),
++							(const param_info_t* /*value*/, void* /*user data*/),
+ 				void* user_data) {
+ 	param_info_hash_iterate(param_info, callPerElement, user_data);
+ }
+diff --git a/src/condor_utils/param_info.h b/src/condor_utils/param_info.h
+index 2262b4f..8015615 100644
+--- a/src/condor_utils/param_info.h
++++ b/src/condor_utils/param_info.h
+@@ -30,41 +30,98 @@ typedef enum param_info_t_type_e {
+ 	PARAM_TYPE_DOUBLE = 3
+ } param_info_t_type_t;
+ 
++// This struct is common to all params, int and double params
++// will be followed by an int or double when default_valid is true,
++// ranged params will have min and max values following that if range_valid is true.
+ typedef struct param_info_t_s {
+ 
+-	char const *	name;
+-    char const * 	aliases;
+-	union {
+-		int 	int_val;
+-		char const * 	str_val;
+-		double  dbl_val;
+-	} default_val;
+-	char const *   str_val;
+-	int		default_valid;
+-    char const * 	range;
+-	union {
+-		int		int_min;
+-		double	dbl_min;
+-	} range_min;
+-	union {
+-		int		int_max;
+-		double	dbl_max;
+-	} range_max;
+-	int 	range_valid;
++	char const *  name;
++    //char const *  aliases;
++	char const *  str_val;
++    char const *  version;
++    //char const *  range;
++    char const *  friendly_name;
++    char const *  usage;
++    char const *  url;
++    char const *  tags;
++
++    //int		id;
++
++    param_info_t_type_t  	type;
++    int 	state;
+     int 	customization;
+     int 	reconfig;
+     int 	is_macro;
+-    char const * 	version;
+-    int 	state;
+-    char const *   friendly_name;
+-    param_info_t_type_t  	type;
+-    int		id;
+-    char const *   usage;
+-    char const *   url;
+-    char const *   tags;
++	int		default_valid;
++	int 	range_valid;
+ 
+ } param_info_t;
+ 
++/*
++typedef struct param_info_default_val_ranged_int_t_s {
++   int int_val;
++   int int_min;
++   int int_max;
++} param_info_default_val_ranged_int_t;
++
++typedef struct param_info_default_val_int_t_s {
++   int int_val;
++} param_info_default_val_int_t;
++
++typedef struct param_info_default_val_ranged_dbl_t_s {
++   double dbl_val;
++   double dbl_min;
++   double dbl_max;
++} param_info_default_val_ranged_dbl_t;
++
++typedef struct param_info_default_val_dbl_t_s {
++   double dbl_val;
++} param_info_default_val_dbl_t;
++*/
++
++struct param_info_str_t_s {
++   param_info_t hdr;
++   const char * str_val;
++};
++
++struct param_info_str_ranged_t_s {
++   param_info_t hdr;
++   const char * str_val;
++   const char * range;
++};
++
++struct param_info_int_t_s {
++   param_info_t hdr;
++   int int_val;
++};
++
++struct param_info_int_ranged_t_s {
++   param_info_t hdr;
++   int int_val;
++   int int_min;
++   int int_max;
++};
++
++struct param_info_dbl_t_s {
++   param_info_t hdr;
++   double dbl_val;
++};
++
++struct param_info_dbl_ranged_t_s {
++   param_info_t hdr;
++   double dbl_val;
++   double dbl_min;
++   double dbl_max;
++};
++
++typedef struct param_info_str_t_s param_info_PARAM_TYPE_STRING;
++typedef struct param_info_int_t_s param_info_PARAM_TYPE_BOOL;
++typedef struct param_info_int_t_s param_info_PARAM_TYPE_INT;
++typedef struct param_info_dbl_t_s param_info_PARAM_TYPE_DOUBLE;
++typedef struct param_info_str_t_s        param_info_PARAM_TYPE_STRING_ranged;
++typedef struct param_info_int_ranged_t_s param_info_PARAM_TYPE_INT_ranged;
++typedef struct param_info_dbl_ranged_t_s param_info_PARAM_TYPE_DOUBLE_ranged;
++
+ BEGIN_C_DECLS
+ 
+ 	void param_info_insert(const char* param,
+@@ -88,7 +145,7 @@ BEGIN_C_DECLS
+ 	int param_default_boolean(const char* param, int* valid);
+ 	double param_default_double(const char* param, int* valid);
+ 	//returns pointer to internal object (or null), do not free
+-	char* param_default_string(const char* param);
++	const char* param_default_string(const char* param);
+ 
+ 	// Returns -1 if param is not of the specified type.
+ 	// Otherwise, returns 0 and sets min and max to the minimum and maximum
+@@ -99,7 +156,7 @@ BEGIN_C_DECLS
+ 	// Iterate the list of parameter information.
+ 	// See param_info_hash_iterate below.
+ 	void iterate_params(int (*callPerElement)
+-			(param_info_t* /*value*/, void* /*user data*/), void* user_data);
++			(const param_info_t* /*value*/, void* /*user data*/), void* user_data);
+ 
+ END_C_DECLS
+ 
+@@ -111,17 +168,17 @@ END_C_DECLS
+ #define PARAM_INFO_TABLE_SIZE	2048
+ 
+ struct bucket_t {
+-	param_info_t* param;
++	const param_info_t* param;
+ 	struct bucket_t* next;
+ };
+ typedef struct bucket_t bucket_t;
+ 
+ typedef bucket_t** param_info_hash_t;
+ 
+-void param_info_hash_insert(param_info_hash_t param_info, param_info_t* p);
++void param_info_hash_insert(param_info_hash_t param_info, const param_info_t* p);
+ 
+ //returns a pointer to an internal object, do not free the returned pointer
+-param_info_t* param_info_hash_lookup(param_info_hash_t param_info, const char* param);
++const param_info_t* param_info_hash_lookup(param_info_hash_t param_info, const char* param);
+ 
+ //must call this on a param_info_hash_t* to initialize it
+ void param_info_hash_create(param_info_hash_t* param_info);
+@@ -134,7 +191,7 @@ void param_info_hash_create(param_info_hash_t* param_info);
+ // Continues as long as callPerElement returns 0, or until it iterates
+ // everything.  user_data is passed to every call of callPerElement.
+ void param_info_hash_iterate(param_info_hash_t param_info,
+-		int (*callPerElement) (param_info_t* /*value*/, void* /*user_data*/),
++		int (*callPerElement) (const param_info_t* /*value*/, void* /*user_data*/),
+ 		void* user_data);
+ 
+ // Dump the whole hash table.
+@@ -142,7 +199,7 @@ void param_info_hash_dump(param_info_hash_t param_info);
+ 
+ // Print out information for one given value.  Typed to be used with
+ // param_info_hash_iterate.
+-int param_info_hash_dump_value(param_info_t* param_value, void* unused);
++int param_info_hash_dump_value(const param_info_t* param_value, void* unused);
+ 
+ #endif
+ 
 diff --git a/src/condor_utils/param_info.in b/src/condor_utils/param_info.in
-index 6a0f573..f44956b 100644
+index 6a0f573..449cb57 100644
 --- a/src/condor_utils/param_info.in
 +++ b/src/condor_utils/param_info.in
 @@ -596,7 +596,7 @@ id=559
@@ -112248,7 +115749,17 @@ index 6a0f573..f44956b 100644
  version=0.0.0
  range=.*
  state=default
-@@ -9481,7 +9481,7 @@ id=555
+@@ -8537,7 +8537,8 @@ id=513
+ 
+ [MAX_JOBS_RUNNING]
+ aliases=
+-default=ceiling(ifThenElse( regexp("WIN.*","$(OPSYS)"), 200, ifThenElse( $(DETECTED_MEMORY)*0.8*1024/800 < 10000, $(DETECTED_MEMORY)*0.8*1024/800, 10000 )))
++default=ceiling(ifThenElse( $(DETECTED_MEMORY)*0.8*1024/800 < 10000, $(DETECTED_MEMORY)*0.8*1024/800, 10000 ))
++win32_default=200
+ version=0.0.0
+ range=.*
+ state=default
+@@ -9481,7 +9482,7 @@ id=555
  
  [GRIDMAP]
  aliases=
@@ -112257,7 +115768,7 @@ index 6a0f573..f44956b 100644
  version=0.0.0
  range=.*
  state=default
-@@ -9497,7 +9497,7 @@ id=555
+@@ -9497,7 +9498,7 @@ id=555
  
  [GSI_DAEMON_TRUSTED_CA_DIR]
  aliases=
@@ -112266,7 +115777,7 @@ index 6a0f573..f44956b 100644
  version=0.0.0
  range=.*
  state=default
-@@ -10136,6 +10136,22 @@ url=
+@@ -10136,6 +10137,22 @@ url=
  tags=
  id=601
  
@@ -112289,7 +115800,7 @@ index 6a0f573..f44956b 100644
  [SHADOW_CHECKPROXY_INTERVAL]
  aliases=
  default=600
-@@ -10151,3 +10167,20 @@ usage=
+@@ -10151,3 +10168,35 @@ usage=
  url=
  tags=
  id=601
@@ -112310,6 +115821,404 @@ index 6a0f573..f44956b 100644
 +tags=shadow
 +id=602
 +
++[SCHEDD_ROUND_ATTR_ProportionalSetSizeKb]
++aliases=
++default=25%
++version=0.0.0
++range=.*
++state=default
++type=string
++is_macro=false
++reconfig=false
++customization=seldom
++friendly_name=
++usage=
++url=
++tags=schedd
++id=602
+diff --git a/src/condor_utils/param_info_c_generator.pl b/src/condor_utils/param_info_c_generator.pl
+index 4e3a571..3d949d3 100755
+--- a/src/condor_utils/param_info_c_generator.pl
++++ b/src/condor_utils/param_info_c_generator.pl
+@@ -107,8 +107,8 @@ use constant {
+ # the name of the property to be substituted. 
+ # (property types and names are defined farther below in $property_types) 
+ ##################################################################################
+-use constant { RECONSTITUTE_TEMPLATE => 
+-'param_info_insert(%parameter_name%, %aliases%, %default%, %version%, %range%,
++use constant { RECONSTITUTE_TEMPLATE_FUNC => 
++'param_info_insert(%parameter_name%, %version%, %default%, %range%,
+                   %state%, %type%, %is_macro%, %reconfig%, %customization%,
+ 				  %friendly_name%, %usage%,
+ 				  %url%,
+@@ -116,6 +116,40 @@ use constant { RECONSTITUTE_TEMPLATE =>
+ '
+ };
+ 
++use constant { RECONSTITUTE_TEMPLATE => 
++'static const param_info_%typequal% param_def_info_%parameter_var% = {
++	%parameter_name%, %default%, %version%, 
++	%friendly_name%, %usage%,
++	%url%, %tags%,
++	%type%, %state%, %customization%, %reconfig%, %is_macro%, %def_valid%, %range_valid%,
++	%cooked_values%
++	};
++'
++};
++
++use constant { RECONSTITUTE_TEMPLATE_WIN => 
++'static const param_info_%typequal% param_def_info_%parameter_var% = {
++	%parameter_name%, 
++#ifdef WIN32
++	%win32_default%,
++#else	
++	%default%, 
++#endif
++	%version%, 
++	%friendly_name%, %usage%,
++	%url%, %tags%,
++	%type%, %state%, %customization%, %reconfig%, %is_macro%, 
++#ifdef WIN32
++	%win_valid%, %range_valid%,
++	%win_cooked_values%
++#else	
++	%def_valid%, %range_valid%,
++	%cooked_values%, 
++#endif
++	};
++'
++};
++
+ ##################################################################################
+ # $property_types customizes the type and options of the properties. Each property is 
+ # pointing toward a hash, containing the following metadata:
+@@ -125,8 +159,11 @@ use constant { RECONSTITUTE_TEMPLATE =>
+ #      dont_trim =>   (Set this to 1 to not trim trailing whitespace on value.) 
+ ##################################################################################
+ my $property_types = {
++	daemon_name     => { type => "literal",	optional => 1  },
+ 	parameter_name 	=> { type => "char[]" },
++	parameter_var 	=> { type => "nodots" },
+ 	default 		=> { type => "char[]", dont_trim => 1  },
++#	win32_default	=> { type => "char[]", dont_trim => 1, optional => 1 },
+ 	friendly_name 	=> { type => "char[]" },
+ 	type 			=> { type => "param_type" },
+ 	state 			=> { type => "state_type" },
+@@ -160,6 +197,7 @@ my $property_types = {
+ ##################################################################################
+ my $type_subs = { 
+ 	'char[]'  => sub { return '"'.escape($_[0]).'"'; },
++	'literal'  => sub { return $_[0]; },
+ 	'bool'  => sub { return enum($_[0],'true','false'); },
+ 	'int'  => sub { return $_[0]=~/^\d+$/?$_[0]:type_error($_[0], 'int'); },
+ 	'float'  => sub { return $_[0]=~/^\d+\.\d+$/?$_[0]:type_error($_[0], 'float'); },
+@@ -169,6 +207,11 @@ my $type_subs = {
+ 		my $state = enum($_[0],'USER','AUTODEFAULT','DEFAULT', 'RUNTIME');
+ 		return "STATE_".$state;
+ 	},
++	'nodots'  => sub { 
++	    my $param_var = $_[0];
++	    $param_var =~ s/\./_/g; 
++	    return $param_var;
++	},
+ 	'param_type' => sub { 
+ 		my $type = enum($_[0],'STRING','INT','BOOL', 'DOUBLE');
+ 		return "PARAM_TYPE_".$type;
+@@ -219,7 +262,7 @@ sub reconstitute {
+ 		my ($replace,$context) = @_;
+ 		while(my($key, $val) = each %{$replace} ) {
+ 			$key =~ s/\W/\\$&/mg;
+-			$context =~ s/$key/$val/ ;
++			$context =~ s/$key/$val/g ;
+ 		}
+ 		return $context;
+ 	}
+@@ -287,15 +330,46 @@ sub reconstitute {
+ 	
+ 	# Here we have the main logic of this function.
+ 	begin_output(); # opening the file, and beginning output
+-
++	
++	my @var_names;
++	
+ 	# Loop through each of the parameters in the structure passed as an argument
+ 	while(my ($param_name, $sub_structure) = each %{$structure}){
+ 
++		#my $daemon_name = "";
++		#if ($param_name =~ /\./) {
++		#	my @aaa = split(/\./, $param_name);
++		#	$param_name = $aaa[1];
++		#	$daemon_name = $aaa[0];	
++		#	print "$aaa[1] of $aaa[0]\n";
++		#}
++		
+ 		my %replace=();
+ 		# Quickly add the pseudo-property "parameter_name" for the name of the 
+ 		# parameter, so that it can be treated just like any other property.
+ 		$sub_structure->{'parameter_name'} = $param_name;
++		$sub_structure->{'parameter_var'} = $param_name;
++		
++		my $typequal = "t";
++		my $cooked_values = "";
++		my $win_cooked_values = "";
++		my $typequal_ranged = "";
++		my $cooked_range = "";
++		my $range_max = "";
++		my $nix_default = $sub_structure->{'default'};
++		my $win_default = $sub_structure->{'win32_default'};
++		my $def_valid = (defined $nix_default && $nix_default ne "") ? "1" : "0";
++		my $win_valid = (defined $win_default && $win_default ne "") ? "1" : "0";
++		my $range_valid = "0";
++		my $var_name = $param_name;
++		
++		$var_name =~ s/\./_/g;
++		push @var_names, $var_name;
++		
++		print "$var_name has win32_default=$win_default\n" if $win_valid eq "1";
++		
+ 		print Dumper($sub_structure) if $options{debug};
++		
+ 		# Loop through each of the properties in the hash specifying property 
+ 		# rules. (This hash is defined at the top of this file and it details 
+ 		# how every property should be treated).
+@@ -309,21 +383,67 @@ sub reconstitute {
+ 			$replace{"%$name%"}=do_one_property($sub_structure,$info,$name); 
+ 
+ 			# TYPECHECK: certain parameters types must have a non-empty default
++			# this is also where we set convert string default value to int or double as needed
++			# and decide whether to set the default_valid flag or not.
+ 			if ($name eq "type")
+ 			{
++				$typequal = do_one_property($sub_structure,$info,$name); 
++				
+ 				# Integer parameters
+ 				if ($type_subs->{$info->{type}}(exists $sub_structure->{type} ? $sub_structure->{type} : $default_structure->{type}) eq "PARAM_TYPE_INT")
+ 				{
+-					if ($sub_structure->{'default'} eq "") {
++					$range_max = "INT_MAX";
++				    $cooked_values = $nix_default;
++					if ($cooked_values =~ /^[0-9\-\*\/\(\) \t]*$/) {
++					    $def_valid = "1";
++					} else {
++						#print "$param_name default is expression $cooked_values\n";
++						$cooked_values = "0";
++						$def_valid = "0";
++					}
++					
++					if (defined $win_default)
++					{
++						$win_cooked_values = $win_default;
++						if ($win_cooked_values =~ /^[0-9\-\*\/\(\) \t]*$/) {
++							$win_valid = "1";
++						} else {
++							#print "$param_name default is expression $win_cooked_values\n";
++							$win_cooked_values = "0";
++							$win_valid = "0";
++						}
++					}
++									    
++					if ($nix_default eq "") {
+ 						print "ERROR: Integer parameter $param_name needs " .
+ 								"a default!\n";
+ 					}
++					#print "$param_name cooked is $cooked_values\n";
+ 				}
+ 
+ 				# Boolean parameters
+ 				if ($type_subs->{$info->{type}}(exists $sub_structure->{type} ? $sub_structure->{type} : $default_structure->{type}) eq "PARAM_TYPE_BOOL")
+ 				{
+-					if ($sub_structure->{'default'} eq "") {
++				    $cooked_values = $nix_default;
++					if ($cooked_values =~ /^[ \t]*TRUE|FALSE|true|false|0|1[ \t]*$/) {
++					    $def_valid = "1";
++					} else {
++						#print "$param_name default is expression $cooked_values\n";
++						$cooked_values = "0";
++						$def_valid = "0";
++					}
++					if (defined $win_default)
++					{
++						$win_cooked_values = $win_default;
++						if ($win_cooked_values =~ /^[ \t]*TRUE|FALSE|true|false|0|1[ \t]*$/) {
++							$win_valid = "1";
++						} else {
++							#print "$param_name default is expression $win_cooked_values\n";
++							$win_cooked_values = "0";
++							$win_valid = "0";
++						}
++					}
++					if ($nix_default eq "") {
+ 						print "ERROR: Boolean parameter $param_name needs " .
+ 								"a default!\n";
+ 					}
+@@ -332,18 +452,96 @@ sub reconstitute {
+ 				# Double parameters
+ 				if ($type_subs->{$info->{type}}(exists $sub_structure->{type} ? $sub_structure->{type} : $default_structure->{type}) eq "PARAM_TYPE_DOUBLE")
+ 				{
+-					if ($sub_structure->{'default'} eq "") {
++					$range_max = "DBL_MAX";
++				    $cooked_values = $nix_default;
++					if ($cooked_values =~ /^[0-9\.\-eE+\*\/\(\) \t]*$/) {
++						$def_valid = "1";
++					} else {
++						#print "$param_name default is expression $cooked_values\n";
++						$cooked_values = "0";
++						$def_valid = "0";
++					}				    
++					if (defined $win_default)
++					{
++						$win_cooked_values = $nix_default;
++						if ($win_cooked_values =~ /^[0-9\.\-eE+\*\/\(\) \t]*$/) {
++							$win_valid = "1";
++						} else {
++							#print "$param_name default is expression $win_cooked_values\n";
++							$win_cooked_values = "0";
++							$win_valid = "0";
++						}				    
++					}
++					if ($nix_default eq "") {
+ 						print "ERROR: Double parameter $param_name needs " .
+ 								"a default!\n";
+ 					}
+ 				}
+ 			}
++			
++			# convert ranges from string to int or double if we can
++			# if range can be set a compile time, then we need to emit a xxx_ranged
++			# structure and two aditional data values. plus we set the 
++			# range_valid flag.
++			#
++			if ($name eq "range")
++			{
++				my $range_raw = ".*";
++				if (exists $sub_structure->{'range'}) {
++				   $range_raw = $sub_structure->{'range'};
++				}
++				   
++				if ($range_raw ne ".*")
++				{
++					if ($range_raw =~ /^[0-9\.\-eE+, \t]*$/)
++					{
++						#print "$param_name range is numeric $range_raw\n";
++						$typequal_ranged = "_ranged";	
++						$cooked_range = ", ".$range_raw;
++						$range_valid = "1";
++					}
++					else
++					{
++						#print "$param_name range is expression $range_raw\n";
++					}
++				}
++			}
+ 		}
++		
++		# if cooked_range ends in a ,  then the max value is missing, so
++		# append $range_max
++		#
++		if ($cooked_range =~ /,$/) {
++			$cooked_range = $cooked_range.$range_max;
++			#print "$param_name range is $cooked_range\n";
++		}
++		
++		$replace{"%def_valid%"} = $def_valid;
++		$replace{"%range_valid%"} = $range_valid;
++		
++		$replace{"%cooked_values%"} = $cooked_values.$cooked_range;
++		$replace{"%typequal%"} = $typequal.$typequal_ranged;
+ 
+ 		# Here we actually apply the template and output the parameter.
+-		continue_output(replace_by_hash(\%replace, RECONSTITUTE_TEMPLATE));
++		if (defined $win_default) {
++		    $replace{"%win32_default%"} = '"'.escape($win_default).'"';
++			$replace{"%win_valid%"} = $win_valid;
++			$replace{"%win_cooked_values%"} = $win_cooked_values.$cooked_range;
++			continue_output(replace_by_hash(\%replace, RECONSTITUTE_TEMPLATE_WIN));
++		} else {
++			continue_output(replace_by_hash(\%replace, RECONSTITUTE_TEMPLATE));
++		}
+ 	}
+-
++	
++	# output a sorted table of pointers to the param_info_t structures
++	# we will use this to do a binary lookup of the parameter by name.
++	#
++	continue_output("\n\nstatic const param_info_t * g_param_info_init_table[] = {\n");
++	for(sort @var_names) {
++		continue_output("	&param_def_info_$_.hdr,\n");
++	}
++	continue_output("\n};");
++	
+ 	# wrap things up. 
+ 	end_output();
+ }
+diff --git a/src/condor_utils/param_info_hash.cpp b/src/condor_utils/param_info_hash.cpp
+index 3fae285..6948937 100644
+--- a/src/condor_utils/param_info_hash.cpp
++++ b/src/condor_utils/param_info_hash.cpp
+@@ -34,7 +34,7 @@ param_info_hash(const char *str)
+ }
+ 
+ void
+-param_info_hash_insert(param_info_hash_t param_info, param_info_t* p) {
++param_info_hash_insert(param_info_hash_t param_info, const param_info_t* p) {
+ 
+ 	unsigned int key;
+ 	bucket_t* b;
+@@ -61,7 +61,7 @@ param_info_hash_insert(param_info_hash_t param_info, param_info_t* p) {
+ 	}
+ }
+ 
+-param_info_t*
++const param_info_t*
+ param_info_hash_lookup(param_info_hash_t param_info, const char* param) {
+ 
+ 	unsigned int key;
+@@ -82,8 +82,27 @@ param_info_hash_lookup(param_info_hash_t param_info, const char* param) {
+ 
+ // of type to be used by param_info_hash_iterate
+ int
+-param_info_hash_dump_value(param_info_t* param_value, void* /*unused*/ ) {
++param_info_hash_dump_value(const param_info_t* param_value, void* /*unused*/ ) {
+ 	printf("%s:  default=", param_value->name);
++#if 1
++    if ( ! param_value->default_valid)
++       printf("<Undefined>");
++    else
++	switch (param_value->type) {
++		case PARAM_TYPE_STRING:
++			printf("%s", reinterpret_cast<const param_info_PARAM_TYPE_STRING*>(param_value)->str_val);
++			break;
++		case PARAM_TYPE_DOUBLE:
++			printf("%f", reinterpret_cast<const param_info_PARAM_TYPE_DOUBLE*>(param_value)->dbl_val);
++			break;
++		case PARAM_TYPE_INT:
++			printf("%d", reinterpret_cast<const param_info_PARAM_TYPE_INT*>(param_value)->int_val);
++			break;
++		case PARAM_TYPE_BOOL:
++			printf("%s", reinterpret_cast<const param_info_PARAM_TYPE_BOOL*>(param_value)->int_val == 0 ? "false" : "true");
++			break;
++	}
++#else
+ 	switch (param_value->type) {
+ 		case PARAM_TYPE_STRING:
+ 			printf("%s", param_value->default_val.str_val);
+@@ -98,6 +117,7 @@ param_info_hash_dump_value(param_info_t* param_value, void* /*unused*/ ) {
+ 			printf("%s", param_value->default_val.int_val == 0 ? "false" : "true");
+ 			break;
+ 	}
++#endif
+ 	printf("\n");
+ 	return 0;
+ }
+@@ -109,7 +129,7 @@ param_info_hash_dump(param_info_hash_t param_info) {
+ 
+ void
+ param_info_hash_iterate(param_info_hash_t param_info, int (*callPerElement)
+-			(param_info_t* /*value*/, void* /*user data*/), void* user_data) {
++			(const param_info_t* /*value*/, void* /*user data*/), void* user_data) {
+ 	int i;
+ 	int stop = 0;
+ 	for(i = 0; i < PARAM_INFO_TABLE_SIZE && stop == 0; i++) {
 diff --git a/src/condor_utils/perm.WINDOWS.cpp b/src/condor_utils/perm.WINDOWS.cpp
 index fd545ea..4dec99c 100644
 --- a/src/condor_utils/perm.WINDOWS.cpp
@@ -112354,6 +116263,32 @@ index fd545ea..4dec99c 100644
  			// this should never happen
  			dprintf(D_ALWAYS, "perm::GetComputerName failed: (Err: %d)", GetLastError());
  			result = -1; // failure
+diff --git a/src/condor_utils/proc_family_direct.cpp b/src/condor_utils/proc_family_direct.cpp
+index 411062f..f5d7cf7 100644
+--- a/src/condor_utils/proc_family_direct.cpp
++++ b/src/condor_utils/proc_family_direct.cpp
+@@ -128,6 +128,10 @@ ProcFamilyDirect::get_usage(pid_t pid, ProcFamilyUsage& usage, bool full)
+ 	usage.percent_cpu = 0.0;
+ 	usage.total_image_size = 0;
+     usage.total_resident_set_size = 0;
++#if HAVE_PSS
++    usage.total_proportional_set_size = 0;
++    usage.total_proportional_set_size_available = false;
++#endif
+ 	if (full) {
+ 		pid_t* family_array;
+ 		int family_size = family->currentfamily(family_array);
+@@ -143,6 +147,10 @@ ProcFamilyDirect::get_usage(pid_t pid, ProcFamilyUsage& usage, bool full)
+ 			usage.percent_cpu = proc_info.cpuusage;
+ 			usage.total_image_size = proc_info.imgsize;
+             usage.total_resident_set_size = proc_info.rssize;
++#if HAVE_PSS
++            usage.total_proportional_set_size = proc_info.pssize;
++            usage.total_proportional_set_size_available = proc_info.pssize_available;
++#endif
+ 		}
+ 		else {
+ 			dprintf(D_ALWAYS,
 diff --git a/src/condor_utils/proc_family_direct.h b/src/condor_utils/proc_family_direct.h
 index fe286e1..30c86f1 100644
 --- a/src/condor_utils/proc_family_direct.h
@@ -112613,7 +116548,7 @@ index caddf53..c922c60 100644
  #ifdef HAVE_DLOPEN // Used to be CLASSAD_FUNCTIONS
 diff --git a/src/condor_utils/timed_queue.h b/src/condor_utils/timed_queue.h
 new file mode 100644
-index 0000000..da2794d
+index 0000000..3e88b7d
 --- /dev/null
 +++ b/src/condor_utils/timed_queue.h
 @@ -0,0 +1,127 @@
@@ -112689,7 +116624,7 @@ index 0000000..da2794d
 +
 +    void max_time(size_type t) {
 +        _max_time = t;
-+        if (max_time() > 0) trim_time(base_type::front().first - max_time());
++        if ((!base_type::empty()) && (max_time() > 0)) trim_time(base_type::front().first - max_time());
 +    }
 +    size_type max_time() const {
 +        return _max_time;
@@ -112744,6 +116679,50 @@ index 0000000..da2794d
 +
 +
 +#endif // _timed_queue_h_
+diff --git a/src/condor_utils/uids.cpp b/src/condor_utils/uids.cpp
+index e08ef4f..170df98 100644
+--- a/src/condor_utils/uids.cpp
++++ b/src/condor_utils/uids.cpp
+@@ -769,8 +769,8 @@ init_condor_ids()
+ 	char* env_val = NULL;
+ 	char* config_val = NULL;
+ 	char* val = NULL;
+-	uid_t envCondorUid = MAXINT;
+-	gid_t envCondorGid = MAXINT;
++	uid_t envCondorUid = INT_MAX;
++	gid_t envCondorGid = INT_MAX;
+ 
+         /*
+         ** N.B. if we are using the yellow pages, system calls which are
+@@ -783,9 +783,9 @@ init_condor_ids()
+ 	gid_t MyGid = get_my_gid();
+ 	
+ 		/* if either of the following get_user_*() functions fail,
+-		 * the default is MAXINT */
+-	RealCondorUid = MAXINT;
+-	RealCondorGid = MAXINT;
++		 * the default is INT_MAX */
++	RealCondorUid = INT_MAX;
++	RealCondorGid = INT_MAX;
+ 	pcache()->get_user_uid( myDistro->Get(), RealCondorUid );
+ 	pcache()->get_user_gid( myDistro->Get(), RealCondorGid );
+ 
+@@ -839,13 +839,13 @@ init_condor_ids()
+ 	   specified in the "CONDOR_IDS" environment variable */
+ 	if( can_switch_ids() ) {
+ 		const char	*enviName = EnvGetName( ENV_UG_IDS ); 
+-		if( envCondorUid != MAXINT ) {	
++		if( envCondorUid != INT_MAX ) {	
+ 			/* CONDOR_IDS are set, use what it said */
+ 				CondorUid = envCondorUid;
+ 				CondorGid = envCondorGid;
+ 		} else {
+ 			/* No CONDOR_IDS set, use condor.condor */
+-			if( RealCondorUid != MAXINT ) {
++			if( RealCondorUid != INT_MAX ) {
+ 				CondorUid = RealCondorUid;
+ 				CondorGid = RealCondorGid;
+ 				if( CondorUserName != NULL ) {
 diff --git a/src/condor_utils/user_error_policy.dead.cpp b/src/condor_utils/user_error_policy.dead.cpp
 index aba3efd..d615683 100644
 --- a/src/condor_utils/user_error_policy.dead.cpp
@@ -112756,6 +116735,24 @@ index aba3efd..d615683 100644
  #include "condor_attributes.h"
  #include "condor_config.h"
  #include "user_error_policy.h"
+diff --git a/src/condor_vm-gahp/CMakeLists.txt b/src/condor_vm-gahp/CMakeLists.txt
+index 05a8954..5854627 100644
+--- a/src/condor_vm-gahp/CMakeLists.txt
++++ b/src/condor_vm-gahp/CMakeLists.txt
+@@ -22,11 +22,11 @@ if(NOT WIN_EXEC_NODE_ONLY)
+ 	condor_glob( HeaderFiles SourceFiles "${RmvSrcs}" )
+ 
+ 	condor_exe( condor_vm-gahp "${HeaderFiles};${SourceFiles}" ${C_SBIN}
+-	"${CONDOR_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${LIBVIRT_FOUND};${LIBXML2_FOUND};${COREDUMPER_FOUND};${ZLIB_FOUND}"
++	"${CONDOR_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${LIBVIRT_FOUND};${COREDUMPER_FOUND}"
+ 	OFF )
+ 
+     if (LINUX AND WANT_FULL_DEPLOYMENT)
+-        condor_exe( condor_vm-gahp-vmware "${HeaderFiles};${SourceFiles}" ${C_SBIN} "${CONDOR_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${COREDUMPER_FOUND};${ZLIB_FOUND}" OFF )
++        condor_exe( condor_vm-gahp-vmware "${HeaderFiles};${SourceFiles}" ${C_SBIN} "${CONDOR_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${COREDUMPER_FOUND}" OFF )
+         set_property( TARGET condor_vm-gahp-vmware APPEND PROPERTY COMPILE_DEFINITIONS VMWARE_ONLY)
+         install ( FILES condor_vm_vmware.pl DESTINATION ${C_SBIN} PERMISSIONS ${CONDOR_SCRIPT_PERMS} )
+     endif()
 diff --git a/src/cream_gahp/cream_gahp_server.cpp b/src/cream_gahp/cream_gahp_server.cpp
 index a09186e..b35d914 100644
 --- a/src/cream_gahp/cream_gahp_server.cpp
@@ -112769,6 +116766,750 @@ index a09186e..b35d914 100644
  			free(msg);
  		}
  		return 1;
+diff --git a/src/deltacloud_gahp/CMakeLists.txt b/src/deltacloud_gahp/CMakeLists.txt
+index 1d1beb4..08079ae 100644
+--- a/src/deltacloud_gahp/CMakeLists.txt
++++ b/src/deltacloud_gahp/CMakeLists.txt
+@@ -20,7 +20,7 @@
+ if (HAVE_EXT_LIBDELTACLOUD)
+ 
+ 	condor_exe( deltacloud_gahp "dcloudgahp_main.cpp;dcloudgahp_commands.cpp;PipeBuffer.cpp;dcloudgahp_common.cpp" ${C_SBIN}
+-	"${LIBDELTACLOUD_FOUND};${LIBXML2_FOUND};${CURL_FOUND};${OPENSSL_FOUND};${LDAP_FOUND};${ZLIB_FOUND}" OFF )
++	"${LIBDELTACLOUD_FOUND};${LIBXML2_FOUND};${CURL_FOUND};${OPENSSL_FOUND};${LDAP_FOUND}" OFF )
+ 
+ else()
+ 
+diff --git a/src/deltacloud_gahp/dcloudgahp_commands.cpp b/src/deltacloud_gahp/dcloudgahp_commands.cpp
+index 72a2727..eeb4eaa 100644
+--- a/src/deltacloud_gahp/dcloudgahp_commands.cpp
++++ b/src/deltacloud_gahp/dcloudgahp_commands.cpp
+@@ -63,74 +63,79 @@ static char *escape_id(const char *id)
+     return ret;
+ }
+ 
+-static ssize_t
+-full_read(int fd, void *ptr, size_t nbytes)
++static ssize_t full_read(int fd, void *ptr, size_t nbytes)
+ {
+-	int nleft, nread;
++    int nleft, nread;
+ 
+-	nleft = nbytes;
+-	while (nleft > 0) {
++    nleft = nbytes;
++    while (nleft > 0) {
+ 
+ #ifndef WIN32
+-		REISSUE_READ: 
++    REISSUE_READ:
+ #endif
+-		nread = read(fd, ptr, nleft);
+-		if (nread < 0) {
++        nread = read(fd, ptr, nleft);
++        if (nread < 0) {
+ 
+ #ifndef WIN32
+-			/* error happened, ignore if EINTR, otherwise inform the caller */
+-			if (errno == EINTR) {
+-				goto REISSUE_READ;
+-			}
++            /* error happened, ignore if EINTR, otherwise inform the caller */
++            if (errno == EINTR)
++                goto REISSUE_READ;
+ #endif
+-			/* The caller has no idea how much was actually read in this
+-				scenario and the file offset is undefined */
+-			return -1;
+-
+-		} else if (nread == 0) {
+-			/* We've reached the end of file marker, so stop looping. */
+-			break;
+-		}
+-
+-		nleft -= nread;
+-			/* On Win32, void* does not default to "byte", so we cast it */
+-		ptr = ((char *)ptr) + nread;
+-	}
+-
+-	/* return how much was actually read, which could include 0 in an
+-		EOF situation */
+-	return (nbytes - nleft);	 
++            /* The caller has no idea how much was actually read in this
++             * scenario and the file offset is undefined */
++            return -1;
++        }
++        else if (nread == 0)
++            /* We've reached the end of file marker, so stop looping. */
++            break;
++
++        nleft -= nread;
++        /* On Win32, void* does not default to "byte", so we cast it */
++        ptr = ((char *)ptr) + nread;
++    }
++
++    /* return how much was actually read, which could include 0 in an
++     * EOF situation */
++    return (nbytes - nleft);
+ }
+ 
+-static char *read_file( const char *path )
++static char *read_password_file(const char *path)
+ {
+-	if ( path == NULL ) {
+-		return NULL;
+-	}
+-
+-	int fd = open( path, O_RDONLY );
+-	if ( fd < 0 ) {
+-		return NULL;
+-	}
+-	struct stat stat_buf;
+-	if ( fstat( fd, &stat_buf ) < 0 ) {
+-		close( fd );
+-		return NULL;
+-	}
+-
+-	char *data = (char *)calloc( stat_buf.st_size + 1, 1 );
+-	if ( full_read( fd, data, stat_buf.st_size ) < 0 ) {
+-		close( fd );
+-		free( data );
+-		return NULL;
+-	}
+-
+-	close( fd );
+-	return data;
++    int fd;
++    struct stat stat_buf;
++    char *password = NULL;
++    int idx;
++
++    if (path == NULL)
++        return NULL;
++
++    fd = open(path, O_RDONLY);
++    if (fd < 0)
++        return NULL;
++
++    if (fstat(fd, &stat_buf) < 0)
++        goto cleanup;
++
++    password = (char *)calloc(stat_buf.st_size + 1, 1);
++    if (password == NULL)
++        goto cleanup;
++
++    if (full_read(fd, password, stat_buf.st_size) < 0) {
++        free(password);
++        password = NULL;
++        goto cleanup;
++    }
++
++    for (idx = strlen(password) - 1; idx >= 0 && isspace(password[idx]); idx--)
++        password[idx] = '\0';
++
++cleanup:
++    close(fd);
++    return password;
+ }
+ 
+ static std::string create_instance_output(char * reqid,
+-					  struct deltacloud_instance *inst)
++                                          struct deltacloud_instance *inst)
+ {
+     struct deltacloud_action *act;
+     struct deltacloud_address *addr;
+@@ -184,21 +189,57 @@ static std::string create_instance_output(char * reqid,
+     return output_string;
+ }
+ 
++static int assign_parameter(struct deltacloud_create_parameter **params,
++                            int *params_size, const char *name,
++                            const char *value)
++{
++    struct deltacloud_create_parameter *tmpparams;
++
++    if (STRCASEEQ(value, NULLSTRING))
++        return 0;
++
++    /* use a temporary variable here so that if we fail, we don't lose the
++     * pointer to params
++     */
++    tmpparams = (struct deltacloud_create_parameter *)realloc(*params,
++                                                              sizeof(struct deltacloud_create_parameter) * (*params_size + 1));
++    if (tmpparams == NULL)
++        return -1;
++
++    *params = tmpparams;
++
++    /* if prepare_parameter failed, then we have allocated additional memory
++     * for the array, but placed nothing inside the structure.  As long as we
++     * don't update params_size, it is safe to return here as the cleanup
++     * code will just free the other members, plus the array
++     */
++    if (deltacloud_prepare_parameter(*params + *params_size, name, value) < 0)
++        return -1;
++
++    (*params_size)++;
++
++    return 0;
++}
++
+ /*
+- * DELTACLOUD_VM_SUBMIT <reqid> <url> <user> <password> <image_id> <name> <realm_id> <hwp_id> <hwp_memory> <hwp_cpu> <hwp_storage> <keyname> <userdata>
+- *  where all arguments are required.  <reqid>, <url>, <user>, <password>, and
+- *  <image_id> all have to be non-NULL; <name>, <realm_id>, <hwp_id>,
+- *  <keyname>, and <userdata> should either be the string "NULL" to let
+- *  deltacloud pick, or a particular name, realm_id, hwp_id, or keyname to
+- *  specify.
++ * DELTACLOUD_VM_SUBMIT <reqid> <url> <user> <password_file> <image_id> <name> <realm_id> <hwp_id> <hwp_memory> <hwp_cpu> <hwp_storage> <keyname> <userdata>
++ *  where all arguments are required.  <reqid>, <url>, <user>, <password_file>,
++ *  and <image_id> all have to be non-NULL; <name>, <realm_id>, <hwp_id>,
++ *  <hwp_memory>, <hwp_cpu>, <hwp_storage>, <keyname>, and <userdata> should
++ *  either be the string "NULL" to let deltacloud pick, or a particular value.
+  */
+ bool dcloud_start_worker(int argc, char **argv, std::string &output_string)
+ {
+-    char *url, *user, *password_file, *password, *image_id, *name, *realm_id, *hwp_id, *hwp_memory, *hwp_cpu, *hwp_storage, *reqid;
++    char *url, *user, *password_file, *password, *image_id, *name, *realm_id;
++    char *hwp_id, *hwp_memory, *hwp_cpu, *hwp_storage, *reqid;
+     char *keyname, *userdata;
+     struct deltacloud_api api;
+     struct deltacloud_instance inst;
+     bool ret = FALSE;
++    struct deltacloud_create_parameter *params = NULL;
++    int params_size = 0;
++    char *instid = NULL;
++    int i;
+ 
+     if (!verify_number_args(14, argc)) {
+         output_string = create_failure("0", "Wrong_Argument_Number");
+@@ -219,7 +260,9 @@ bool dcloud_start_worker(int argc, char **argv, std::string &output_string)
+     keyname = argv[12];
+     userdata = argv[13];
+ 
+-	dcloudprintf("Arguments: reqid %s, url %s, user %s, password %s, image_id %s, name %s, realm_id %s, hwp_id %s, hwp_memory %s, hwp_cpu %s, hwp_storage %s, keyname %s\n", reqid, url, user, password_file, image_id, name, realm_id, hwp_id, hwp_memory, hwp_cpu, hwp_storage, keyname);
++    dcloudprintf("Arguments: reqid %s, url %s, user %s, password_file %s, image_id %s, name %s, realm_id %s, hwp_id %s, hwp_memory %s, hwp_cpu %s, hwp_storage %s, keyname %s, userdata %s\n",
++                 reqid, url, user, password_file, image_id, name, realm_id,
++                 hwp_id, hwp_memory, hwp_cpu, hwp_storage, keyname, userdata);
+ 
+ 
+     if (STRCASEEQ(url, NULLSTRING)) {
+@@ -237,42 +280,39 @@ bool dcloud_start_worker(int argc, char **argv, std::string &output_string)
+ 
+     if (STRCASEEQ(password_file, NULLSTRING))
+         password_file = NULL;
+-    if (STRCASEEQ(name, NULLSTRING))
+-        name = NULL;
+-    if (STRCASEEQ(realm_id, NULLSTRING))
+-        realm_id = NULL;
+-    if (STRCASEEQ(hwp_id, NULLSTRING))
+-        hwp_id = NULL;
+-    if (STRCASEEQ(hwp_memory, NULLSTRING))
+-        hwp_memory = NULL;
+-    if (STRCASEEQ(hwp_cpu, NULLSTRING))
+-        hwp_cpu = NULL;
+-    if (STRCASEEQ(hwp_storage, NULLSTRING))
+-        hwp_storage = NULL;
+-    if (STRCASEEQ(keyname, NULLSTRING))
+-        keyname = NULL;
+-    if (STRCASEEQ(userdata, NULLSTRING))
+-        userdata = NULL;
+-
+-    password = read_file( password_file );
+-	if ( !password ) {
+-		output_string = create_failure(reqid, "Invalid_Password_File");
+-		return FALSE;
+-	}
+-	for ( int idx = strlen( password ) - 1; idx >= 0 && isspace( password[idx] ); idx-- ) {
+-		password[idx] = '\0';
+-	}
++    password = read_password_file(password_file);
++    if (!password) {
++        output_string = create_failure(reqid, "Invalid_Password_File");
++        return FALSE;
++    }
+ 
+     if (deltacloud_initialize(&api, url, user, password) < 0) {
+         output_string = create_failure(reqid, "Deltacloud_Init_Failure: %s",
+                                        deltacloud_get_last_error_string());
+-        return FALSE;
++        goto cleanup_password;
+     }
+ 
+-	free( password );
++    if (assign_parameter(&params, &params_size, "name", name) < 0 ||
++        assign_parameter(&params, &params_size, "realm_id", realm_id) < 0 ||
++        assign_parameter(&params, &params_size, "keyname", keyname) < 0 ||
++        assign_parameter(&params, &params_size, "hwp_id", hwp_id) < 0 ||
++        assign_parameter(&params, &params_size, "hwp_memory", hwp_memory) < 0 ||
++        assign_parameter(&params, &params_size, "hwp_cpu", hwp_cpu) < 0 ||
++        assign_parameter(&params, &params_size, "hwp_storage", hwp_storage) < 0 ||
++        assign_parameter(&params, &params_size, "user_data", userdata) < 0) {
++        output_string = create_failure(reqid,
++                                       "Create_Instance_Failure: Failed to allocate parameter memory");
++        goto cleanup_library;
++    }
++
++    if (deltacloud_create_instance(&api, image_id, params, params_size,
++                                   &instid) < 0) {
++        output_string = create_failure(reqid, "Create_Instance_Failure: %s",
++                                       deltacloud_get_last_error_string());
++        goto cleanup_library;
++    }
+ 
+-    if (deltacloud_create_instance(&api, image_id, name, realm_id, hwp_id, hwp_memory,
+-                                   hwp_cpu, hwp_storage, keyname, userdata, &inst) < 0) {
++    if (deltacloud_get_instance_by_id(&api, instid, &inst) < 0) {
+         output_string = create_failure(reqid, "Create_Instance_Failure: %s",
+                                        deltacloud_get_last_error_string());
+         goto cleanup_library;
+@@ -284,15 +324,23 @@ bool dcloud_start_worker(int argc, char **argv, std::string &output_string)
+ 
+     ret = TRUE;
+ 
+- cleanup_library:
++cleanup_library:
++    free(instid);
++    for (i = 0; i < params_size; i++)
++        deltacloud_free_parameter_value(&params[i]);
++    free(params);
+     deltacloud_free(&api);
+ 
++cleanup_password:
++    free(password);
++
+     return ret;
+ }
+ 
+ /*
+- * DELTACLOUD_VM_ACTION <reqid> <url> <user> <password> <instance_id> <action>
+- *  where reqid, url, user, password, instance_id, and action have to be non-NULL
++ * DELTACLOUD_VM_ACTION <reqid> <url> <user> <password_file> <instance_id> <action>
++ *  where reqid, url, user, password_file, instance_id, and action have to be
++ *  non-NULL.
+  */
+ bool dcloud_action_worker(int argc, char **argv, std::string &output_string)
+ {
+@@ -314,7 +362,7 @@ bool dcloud_action_worker(int argc, char **argv, std::string &output_string)
+     instance_id = argv[5];
+     action = argv[6];
+ 
+-    dcloudprintf("Arguments: reqid %s, url %s, user %s, password %s, instance_id %s, action %s\n", reqid, url, user, password_file, instance_id, action);
++    dcloudprintf("Arguments: reqid %s, url %s, user %s, password_file %s, instance_id %s, action %s\n", reqid, url, user, password_file, instance_id, action);
+ 
+     if (STRCASEEQ(url, NULLSTRING)) {
+         output_string = create_failure(reqid, "Invalid_URL");
+@@ -336,23 +384,18 @@ bool dcloud_action_worker(int argc, char **argv, std::string &output_string)
+     if (STRCASEEQ(password_file, NULLSTRING))
+         password_file = NULL;
+ 
+-    password = read_file( password_file );
+-	if ( !password ) {
+-		output_string = create_failure(reqid, "Invalid_Password_File");
+-		return FALSE;
+-	}
+-	for ( int idx = strlen( password ) - 1; idx >= 0 && isspace( password[idx] ); idx-- ) {
+-		password[idx] = '\0';
+-	}
++    password = read_password_file(password_file);
++    if (!password) {
++        output_string = create_failure(reqid, "Invalid_Password_File");
++        return FALSE;
++    }
+ 
+     if (deltacloud_initialize(&api, url, user, password) < 0) {
+         output_string = create_failure(reqid, "Deltacloud_Init_Failure: %s",
+                                        deltacloud_get_last_error_string());
+-        return FALSE;
++        goto cleanup_password;
+     }
+ 
+-	free( password );
+-
+     if (deltacloud_get_instance_by_id(&api, instance_id, &instance) < 0) {
+         output_string = create_failure(reqid, "Instance_Lookup_Failure: %s",
+                                        deltacloud_get_last_error_string());
+@@ -391,12 +434,15 @@ cleanup_instance:
+ cleanup_library:
+     deltacloud_free(&api);
+ 
++cleanup_password:
++    free(password);
++
+     return ret;
+ }
+ 
+ /*
+- * DELTACLOUD_VM_INFO <reqid> <url> <user> <password> <instance_id>
+- *  where reqid, url, user, password, and instance_id have to be non-NULL
++ * DELTACLOUD_VM_INFO <reqid> <url> <user> <password_file> <instance_id>
++ *  where reqid, url, user, password_file, and instance_id have to be non-NULL.
+  */
+ bool dcloud_info_worker(int argc, char **argv, std::string &output_string)
+ {
+@@ -416,7 +462,7 @@ bool dcloud_info_worker(int argc, char **argv, std::string &output_string)
+     password_file = argv[4];
+     instance_id = argv[5];
+ 
+-    dcloudprintf("Arguments: reqid %s, url %s, user %s, password %s, instance_id %s\n", reqid, url, user, password_file, instance_id);
++    dcloudprintf("Arguments: reqid %s, url %s, user %s, password_file %s, instance_id %s\n", reqid, url, user, password_file, instance_id);
+ 
+     if (STRCASEEQ(url, NULLSTRING)) {
+         output_string = create_failure(reqid, "Invalid_URL");
+@@ -434,23 +480,18 @@ bool dcloud_info_worker(int argc, char **argv, std::string &output_string)
+     if (STRCASEEQ(password_file, NULLSTRING))
+         password_file = NULL;
+ 
+-    password = read_file( password_file );
+-	if ( !password ) {
+-		output_string = create_failure(reqid, "Invalid_Password_File");
+-		return FALSE;
+-	}
+-	for ( int idx = strlen( password ) - 1; idx >= 0 && isspace( password[idx] ); idx-- ) {
+-		password[idx] = '\0';
+-	}
++    password = read_password_file(password_file);
++    if (!password) {
++        output_string = create_failure(reqid, "Invalid_Password_File");
++        return FALSE;
++    }
+ 
+     if (deltacloud_initialize(&api, url, user, password) < 0) {
+         output_string = create_failure(reqid, "Deltacloud_Init_Failure: %s",
+                                        deltacloud_get_last_error_string());
+-        return FALSE;
++        goto cleanup_password;
+     }
+ 
+-	free( password );
+-
+     if (deltacloud_get_instance_by_id(&api, instance_id, &inst) < 0) {
+         output_string = create_failure(reqid, "Instance_Lookup_Failure %s: %s",
+                                        instance_id,
+@@ -467,12 +508,15 @@ bool dcloud_info_worker(int argc, char **argv, std::string &output_string)
+ cleanup_library:
+     deltacloud_free(&api);
+ 
++cleanup_password:
++    free(password);
++
+     return ret;
+ }
+ 
+ /*
+- * DELTACLOUD_VM_STATUS_ALL <reqid> <url> <user> <password>
+- *  where reqid, url, user, and password have to be non-NULL.
++ * DELTACLOUD_VM_STATUS_ALL <reqid> <url> <user> <password_file>
++ *  where reqid, url, user, and password_file have to be non-NULL.
+  */
+ bool dcloud_statusall_worker(int argc, char **argv, std::string &output_string)
+ {
+@@ -493,7 +537,7 @@ bool dcloud_statusall_worker(int argc, char **argv, std::string &output_string)
+     user = argv[3];
+     password_file = argv[4];
+ 
+-    dcloudprintf("Arguments: reqid %s, url %s, user %s, password %s\n", reqid, url, user, password_file);
++    dcloudprintf("Arguments: reqid %s, url %s, user %s, password_file %s\n", reqid, url, user, password_file);
+ 
+     if (STRCASEEQ(url, NULLSTRING)) {
+         output_string = create_failure(reqid, "Invalid_URL");
+@@ -507,23 +551,18 @@ bool dcloud_statusall_worker(int argc, char **argv, std::string &output_string)
+     if (STRCASEEQ(password_file, NULLSTRING))
+         password_file = NULL;
+ 
+-    password = read_file( password_file );
+-	if ( !password ) {
+-		output_string = create_failure(reqid, "Invalid_Password_File");
+-		return FALSE;
+-	}
+-	for ( int idx = strlen( password ) - 1; idx >= 0 && isspace( password[idx] ); idx-- ) {
+-		password[idx] = '\0';
+-	}
++    password = read_password_file(password_file);
++    if (!password) {
++        output_string = create_failure(reqid, "Invalid_Password_File");
++        return FALSE;
++    }
+ 
+     if (deltacloud_initialize(&api, url, user, password) < 0) {
+         output_string = create_failure(reqid, "Deltacloud_Init_Failure: %s",
+                                        deltacloud_get_last_error_string());
+-        return FALSE;
++        goto cleanup_password;
+     }
+ 
+-	free( password );
+-
+     if (deltacloud_get_instances(&api, &instances) < 0) {
+         output_string = create_failure(reqid, "Instance_Fetch_Failure: %s",
+                                        deltacloud_get_last_error_string());
+@@ -552,12 +591,15 @@ bool dcloud_statusall_worker(int argc, char **argv, std::string &output_string)
+ cleanup_library:
+     deltacloud_free(&api);
+ 
++cleanup_password:
++    free(password);
++
+     return ret;
+ }
+ 
+ /*
+- * DELTACLOUD_VM_FIND <reqid> <url> <user> <password> <name>
+- *  where reqid, url, user, password, and name have to be non-NULL.
++ * DELTACLOUD_VM_FIND <reqid> <url> <user> <password_file> <name>
++ *  where reqid, url, user, password_file, and name have to be non-NULL.
+  */
+ bool dcloud_find_worker(int argc, char **argv, std::string &output_string)
+ {
+@@ -580,7 +622,7 @@ bool dcloud_find_worker(int argc, char **argv, std::string &output_string)
+     password_file = argv[4];
+     name = argv[5];
+ 
+-    dcloudprintf("Arguments: reqid %s, url %s, user %s, password %s, name %s\n", reqid, url, user, password_file, name);
++    dcloudprintf("Arguments: reqid %s, url %s, user %s, password_file %s, name %s\n", reqid, url, user, password_file, name);
+ 
+     if (STRCASEEQ(url, NULLSTRING)) {
+         output_string = create_failure(reqid, "Invalid_URL");
+@@ -598,23 +640,18 @@ bool dcloud_find_worker(int argc, char **argv, std::string &output_string)
+     if (STRCASEEQ(password_file, NULLSTRING))
+         password_file = NULL;
+ 
+-    password = read_file( password_file );
+-	if ( !password ) {
+-		output_string = create_failure(reqid, "Invalid_Password_File");
+-		return FALSE;
+-	}
+-	for ( int idx = strlen( password ) - 1; idx >= 0 && isspace( password[idx] ); idx-- ) {
+-		password[idx] = '\0';
+-	}
++    password = read_password_file(password_file);
++    if (!password) {
++        output_string = create_failure(reqid, "Invalid_Password_File");
++        return FALSE;
++    }
+ 
+     if (deltacloud_initialize(&api, url, user, password) < 0) {
+         output_string = create_failure(reqid, "Deltacloud_Init_Failure: %s",
+                                        deltacloud_get_last_error_string());
+-        return FALSE;
++        goto cleanup_password;
+     }
+ 
+-	free( password );
+-
+     rc = deltacloud_get_instance_by_name(&api, name, &inst);
+     if (rc == 0) {
+         /* found the instance, output the id */
+@@ -633,8 +670,8 @@ bool dcloud_find_worker(int argc, char **argv, std::string &output_string)
+                                            "Instance_Fetch_Failure %s",
+                                            name);
+             goto cleanup_library;
+-		}
+-		else if(last->error_num != DELTACLOUD_NAME_NOT_FOUND_ERROR) {
++        }
++        else if(last->error_num != DELTACLOUD_NAME_NOT_FOUND_ERROR) {
+             /* failed to find the instance, output an error */
+             output_string = create_failure(reqid,
+                                            "Instance_Fetch_Failure %s: %s",
+@@ -653,5 +690,8 @@ bool dcloud_find_worker(int argc, char **argv, std::string &output_string)
+ cleanup_library:
+     deltacloud_free(&api);
+ 
++cleanup_password:
++    free(password);
++
+     return ret;
+ }
+diff --git a/src/deltacloud_gahp/dcloudgahp_common.cpp b/src/deltacloud_gahp/dcloudgahp_common.cpp
+index e67d93c..8100725 100644
+--- a/src/deltacloud_gahp/dcloudgahp_common.cpp
++++ b/src/deltacloud_gahp/dcloudgahp_common.cpp
+@@ -11,7 +11,7 @@ void dcloudprintf_internal(const char *function, const char *fmt, ...)
+ {
+     va_list va_args;
+ 
+-    if ( logfp ) {
++    if (logfp) {
+         pthread_mutex_lock(&dcloudprintf_mutex);
+         fprintf(logfp, "%s: ", function);
+         va_start(va_args, fmt);
+@@ -37,9 +37,9 @@ std::string create_failure(const char *req_id, const char *err_msg, ...)
+     va_end(ap);
+ 
+     for (i = 0; i < strlen(tmp); i++) {
+-      if (tmp[i] == ' ')
+-          buffer += '\\';
+-      buffer += tmp[i];
++        if (tmp[i] == ' ')
++            buffer += '\\';
++        buffer += tmp[i];
+     }
+     free(tmp);
+ 
+@@ -68,16 +68,17 @@ Gahp_Args::~Gahp_Args()
+ void
+ Gahp_Args::reset()
+ {
+-    if ( argv == NULL ) {
++    int i;
++
++    if (argv == NULL)
+         return;
+-    }
+ 
+-    for ( int i = 0; i < argc; i++ ) {
+-        free( argv[i] );
++    for (i = 0; i < argc; i++) {
++        free(argv[i]);
+         argv[i] = NULL;
+     }
+ 
+-    free( argv );
++    free(argv);
+     argv = NULL;
+     argv_size = 0;
+     argc = 0;
+@@ -89,14 +90,13 @@ Gahp_Args::reset()
+  * you would typically give add_arg() a strdup()ed string.
+  */
+ void
+-Gahp_Args::add_arg( char *new_arg )
++Gahp_Args::add_arg(char *new_arg)
+ {
+-    if ( new_arg == NULL ) {
++    if (new_arg == NULL)
+         return;
+-    }
+-    if ( argc >= argv_size ) {
++    if (argc >= argv_size) {
+         argv_size += 60;
+-        argv = (char **)realloc( argv, argv_size * sizeof(char *) );
++        argv = (char **)realloc(argv, argv_size * sizeof(char *));
+     }
+     argv[argc] = new_arg;
+     argc++;
+diff --git a/src/deltacloud_gahp/dcloudgahp_common.h b/src/deltacloud_gahp/dcloudgahp_common.h
+index a9121aa..4f5edd5 100644
+--- a/src/deltacloud_gahp/dcloudgahp_common.h
++++ b/src/deltacloud_gahp/dcloudgahp_common.h
+@@ -27,13 +27,13 @@ std::string create_failure(const char *req_id, const char *err_msg, ...);
+  */
+ class Gahp_Args {
+  public:
+-	Gahp_Args();
+-	~Gahp_Args();
+-	void reset();
+-	void add_arg( char *arg );
+-	char **argv;
+-	int argc;
+-	int argv_size;
++    Gahp_Args();
++    ~Gahp_Args();
++    void reset();
++    void add_arg(char *arg);
++    char **argv;
++    int argc;
++    int argv_size;
+ };
+ 
+ #endif
+diff --git a/src/deltacloud_gahp/dcloudgahp_main.cpp b/src/deltacloud_gahp/dcloudgahp_main.cpp
+index 42947e8..e072815 100644
+--- a/src/deltacloud_gahp/dcloudgahp_main.cpp
++++ b/src/deltacloud_gahp/dcloudgahp_main.cpp
+@@ -96,21 +96,21 @@ static int parse_gahp_command(const char *raw, Gahp_Args *args)
+             continue;
+         }
+ 
+-        if (raw[i] == '\\') {
++        if (raw[i] == '\\')
+             in_escape = true;
+-        } else if (raw[i] == ' ' || raw[i] == '\t' || raw[i] == '\r' ||
++        else if (raw[i] == ' ' || raw[i] == '\t' || raw[i] == '\r' ||
+                    raw[i] == '\n') {
+             buff[buff_len++] = '\0';
+-            args->add_arg( strdup(buff) );
++            args->add_arg(strdup(buff));
+             buff_len = 0; // re-set temporary buffer
+-        } else {
+-            buff[buff_len++] = raw[i];
+         }
++        else
++            buff[buff_len++] = raw[i];
+     }
+ 
+     /* Copy the last portion */
+     buff[buff_len++] = '\0';
+-    args->add_arg( strdup(buff) );
++    args->add_arg(strdup(buff));
+ 
+     free (buff);
+     return TRUE;
+@@ -149,9 +149,8 @@ static void unregisterAllDcloudCommands(void)
+ {
+     std::set<DcloudGahpCommand*>::iterator itr;
+ 
+-    for (itr = dcloud_gahp_commands.begin(); itr != dcloud_gahp_commands.end(); itr++) {
++    for (itr = dcloud_gahp_commands.begin(); itr != dcloud_gahp_commands.end(); itr++)
+         delete *itr;
+-    }
+ }
+ 
+ static void handle_command_results(Gahp_Args *args)
+@@ -308,9 +307,8 @@ cleanup:
+         async_results_signalled = true;
+       }
+     }
+-    else {
++    else
+         safe_printf("%s", output_string.c_str());
+-    }
+     pthread_mutex_unlock(&async_mutex);
+ 
+     free(data->fullcommand);
+@@ -354,9 +352,8 @@ static void handle_dcloud_commands(const char *cmd, const char *fullcommand)
+                 pthread_detach(thread);
+                 gahp_output_return_success();
+             }
+-            else {
++            else
+                 pthread_join(thread, NULL);
+-            }
+ 
+             return;
+         }
+@@ -442,26 +439,22 @@ static void registerAllDcloudCommands(void)
+         return;
+     }
+ 
+-    registerDcloudGahpCommand(DCLOUD_COMMAND_VM_SUBMIT,
+-                              dcloud_start_worker);
++    registerDcloudGahpCommand(DCLOUD_COMMAND_VM_SUBMIT, dcloud_start_worker);
+ 
+-    registerDcloudGahpCommand(DCLOUD_COMMAND_VM_ACTION,
+-                              dcloud_action_worker);
++    registerDcloudGahpCommand(DCLOUD_COMMAND_VM_ACTION, dcloud_action_worker);
+ 
+-    registerDcloudGahpCommand(DCLOUD_COMMAND_VM_INFO,
+-                              dcloud_info_worker);
++    registerDcloudGahpCommand(DCLOUD_COMMAND_VM_INFO, dcloud_info_worker);
+ 
+     registerDcloudGahpCommand(DCLOUD_COMMAND_VM_STATUS_ALL,
+-                              dcloud_statusall_worker);
++			      dcloud_statusall_worker);
+ 
+-    registerDcloudGahpCommand(DCLOUD_COMMAND_VM_FIND,
+-                              dcloud_find_worker);
++    registerDcloudGahpCommand(DCLOUD_COMMAND_VM_FIND, dcloud_find_worker);
+ }
+ 
+ int main(int argc, char *argv[])
+ {
+     const char *debug_file = getenv("DELTACLOUD_GAHP_DEBUG_FILE");
+-    if ( debug_file ) {
++    if (debug_file) {
+         logfp = fopen(debug_file, "a");
+         if (!logfp) {
+             fprintf(stderr, "Could not open log file %s: %s\n",
 diff --git a/src/ec2_gahp/CMakeLists.txt b/src/ec2_gahp/CMakeLists.txt
 new file mode 100644
 index 0000000..eaa7bd4
@@ -114688,10 +119429,10 @@ index 0000000..cd98fd5
 +}
 diff --git a/src/ec2_gahp/amazongahp_common.cpp b/src/ec2_gahp/amazongahp_common.cpp
 new file mode 100644
-index 0000000..aea93ea
+index 0000000..6a4db8d
 --- /dev/null
 +++ b/src/ec2_gahp/amazongahp_common.cpp
-@@ -0,0 +1,478 @@
+@@ -0,0 +1,476 @@
 +/***************************************************************
 + *
 + * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
@@ -114729,13 +119470,11 @@ index 0000000..aea93ea
 +static FILE *gahp_log_file = stderr;
 +
 +// This variable is defined in dprintf.c
-+extern FILE *DebugFP;
 +
 +bool set_gahp_log_file(const char* logfile)
 +{
 +	static bool done_init = false;
 +
-+	DebugFP = stderr;
 +	Termlog = 1;
 +
 +	if( !done_init ) {
@@ -114763,9 +119502,9 @@ index 0000000..aea93ea
 +	}
 +
 +	gahp_log_file = fp;
-+	DebugFP = fp;
 +
 +	//DebugLock = ;
++
 +	return true;
 +}
 +
@@ -115257,7 +119996,7 @@ index 0000000..6ebea36
 +#endif
 diff --git a/src/ec2_gahp/io_loop_pthread.cpp b/src/ec2_gahp/io_loop_pthread.cpp
 new file mode 100644
-index 0000000..32151b8
+index 0000000..d57ca10
 --- /dev/null
 +++ b/src/ec2_gahp/io_loop_pthread.cpp
 @@ -0,0 +1,1080 @@
@@ -115333,7 +120072,7 @@ index 0000000..32151b8
 +void
 +usage()
 +{
-+	dprintf( D_ALWAYS, "Usage: amazon_gahp -f logfile -d debuglevel -w min_worker_nums -m max_worker_nums\n");
++	dprintf( D_ALWAYS, "Usage: amazon_gahp -d debuglevel -w min_worker_nums -m max_worker_nums\n");
 +	exit(1);
 +}
 +
diff --git a/condor.spec b/condor.spec
index 7da3b9b..bf9daf3 100644
--- a/condor.spec
+++ b/condor.spec
@@ -3,7 +3,7 @@
 Summary: Condor: High Throughput Computing
 Name: condor
 Version: 7.7.0
-Release: 0.2%{?dist}
+Release: 0.3%{?dist}
 License: ASL 2.0
 Group: Applications/System
 URL: http://www.cs.wisc.edu/condor/
@@ -714,6 +714,10 @@ fi
 
 
 %changelog
+* Tue Jun  7 2011 <matt at redhat> - 7.7.0-0.3
+- Fast forward to 7.7.0 pre-release at 1babb324
+-  Catch libdeltacloud 0.8 update
+
 * Fri May 20 2011 <matt at redhat> - 7.7.0-0.2
 - Added GSI support, dependency on Globus
 


More information about the scm-commits mailing list