commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject cvs commit: jakarta-commons-sandbox/daemon/src/native/nt/procrun/testchild testchild.vcproj testchild.c
Date Fri, 07 Feb 2003 07:05:58 GMT
mturk       2003/02/06 23:05:58

  Added:       daemon/src/native/nt/procrun/testchild testchild.vcproj
                        testchild.c
  Log:
  Initial version.
  
  Revision  Changes    Path
  1.1                  jakarta-commons-sandbox/daemon/src/native/nt/procrun/testchild/testchild.vcproj
  
  Index: testchild.vcproj
  ===================================================================
  <?xml version="1.0" encoding = "windows-1250"?>
  <VisualStudioProject
  	ProjectType="Visual C++"
  	Version="7.00"
  	Name="testchild"
  	ProjectGUID="{C815B005-1292-47F7-9052-F46676CE2879}"
  	Keyword="Win32Proj">
  	<Platforms>
  		<Platform
  			Name="Win32"/>
  	</Platforms>
  	<Configurations>
  		<Configuration
  			Name="Debug|Win32"
  			OutputDirectory="Debug"
  			IntermediateDirectory="Debug"
  			ConfigurationType="1"
  			CharacterSet="2">
  			<Tool
  				Name="VCCLCompilerTool"
  				Optimization="0"
  				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
  				MinimalRebuild="TRUE"
  				BasicRuntimeChecks="3"
  				RuntimeLibrary="3"
  				UsePrecompiledHeader="0"
  				WarningLevel="3"
  				Detect64BitPortabilityProblems="TRUE"
  				DebugInformationFormat="4"/>
  			<Tool
  				Name="VCCustomBuildTool"/>
  			<Tool
  				Name="VCLinkerTool"
  				OutputFile="$(OutDir)/testchild.exe"
  				LinkIncremental="2"
  				GenerateDebugInformation="TRUE"
  				ProgramDatabaseFile="$(OutDir)/testchild.pdb"
  				SubSystem="1"
  				TargetMachine="1"/>
  			<Tool
  				Name="VCMIDLTool"/>
  			<Tool
  				Name="VCPostBuildEventTool"/>
  			<Tool
  				Name="VCPreBuildEventTool"/>
  			<Tool
  				Name="VCPreLinkEventTool"/>
  			<Tool
  				Name="VCResourceCompilerTool"/>
  			<Tool
  				Name="VCWebServiceProxyGeneratorTool"/>
  			<Tool
  				Name="VCWebDeploymentTool"/>
  		</Configuration>
  		<Configuration
  			Name="Release|Win32"
  			OutputDirectory="Release"
  			IntermediateDirectory="Release"
  			ConfigurationType="1"
  			CharacterSet="2">
  			<Tool
  				Name="VCCLCompilerTool"
  				Optimization="2"
  				InlineFunctionExpansion="1"
  				OmitFramePointers="TRUE"
  				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
  				StringPooling="TRUE"
  				RuntimeLibrary="2"
  				EnableFunctionLevelLinking="TRUE"
  				UsePrecompiledHeader="0"
  				WarningLevel="3"
  				Detect64BitPortabilityProblems="TRUE"
  				DebugInformationFormat="3"/>
  			<Tool
  				Name="VCCustomBuildTool"/>
  			<Tool
  				Name="VCLinkerTool"
  				OutputFile="$(OutDir)/testchild.exe"
  				LinkIncremental="1"
  				GenerateDebugInformation="TRUE"
  				SubSystem="1"
  				OptimizeReferences="2"
  				EnableCOMDATFolding="2"
  				TargetMachine="1"/>
  			<Tool
  				Name="VCMIDLTool"/>
  			<Tool
  				Name="VCPostBuildEventTool"/>
  			<Tool
  				Name="VCPreBuildEventTool"/>
  			<Tool
  				Name="VCPreLinkEventTool"/>
  			<Tool
  				Name="VCResourceCompilerTool"/>
  			<Tool
  				Name="VCWebServiceProxyGeneratorTool"/>
  			<Tool
  				Name="VCWebDeploymentTool"/>
  		</Configuration>
  	</Configurations>
  	<Files>
  		<Filter
  			Name="Source Files"
  			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
  			<File
  				RelativePath="testchild.c">
  			</File>
  		</Filter>
  		<Filter
  			Name="Header Files"
  			Filter="h;hpp;hxx;hm;inl;inc">
  		</Filter>
  		<Filter
  			Name="Resource Files"
  			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
  		</Filter>
  	</Files>
  	<Globals>
  	</Globals>
  </VisualStudioProject>
  
  
  
  1.1                  jakarta-commons-sandbox/daemon/src/native/nt/procrun/testchild/testchild.c
  
  Index: testchild.c
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * Portions of this software are based upon public domain software
   * originally written at the National Center for Supercomputing Applications,
   * University of Illinois, Urbana-Champaign.
   */
  
  /* ====================================================================
   * testchild.c
   *
   * Contributed by Mladen Turk <mturk@mappingsoft.com>
   *
   * 05 Aug 2002
   * ==================================================================== 
   */
  
  #ifndef STRICT
  #define STRICT
  #endif
  #ifndef OEMRESOURCE
  #define OEMRESOURCE
  #endif
  
  #include <windows.h>
  #include <stdlib.h>
  #include <stdio.h>
  #include <io.h>
  #include <fcntl.h>
  #include <process.h>
  #include <time.h>
  #include <stdarg.h>
  
  BOOL WINAPI ControlHandler ( DWORD dwCtrlType )
  {
     switch (dwCtrlType) {
     case CTRL_BREAK_EVENT:
        printf("got CTRL+BREAK Event\n");
        exit(1);
        return TRUE;
     case CTRL_C_EVENT:
        printf("got CTRL+C Event\n");
        exit(2);
        return TRUE;
        break;
  
     }
     return FALSE;
  }
  
  //int main(int argc, char **argv, char **envp)
  void __cdecl main(int argc, char **argv)
  
  {
      int i;
      char **envp = _environ;
      SetConsoleCtrlHandler(ControlHandler, TRUE);
  
      printf("Testing child\n");
      printf("ARGV:\n");
      for (i = 0; i < argc; i++)
          printf("\t%d %s\n", i, argv[i]);
      printf("ENVP:\n");
      for (i = 0; envp[i]; i++)
          printf("\t%d %s\n", i, envp[i]);
      
      printf("\nChild done...\n");
      fflush(stdout);
      for (i = 0; i < 1000; i++)
          Sleep(100);
  }
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message