Commit Graph
85 Commits
Author SHA1 Message Date
Atsushi Eno d4cbaa798f 2004-06-24 Atsushi Enomoto <[email protected]>
* Process.cs : quick fix for UseShellExecute=false on windows. See
	  the code comment.

svn path=/trunk/mcs/; revision=30290
2004-06-24 11:57:36 +00:00
Duncan Mak 24f5ef2c44 Add MIT license to System.dll
svn path=/trunk/mcs/; revision=30054
2004-06-21 18:02:11 +00:00
Lluis Sanchez add2bf8f69 * Process.cs: Added missing check in HasExited property.
svn path=/trunk/mcs/; revision=29721
2004-06-16 23:16:49 +00:00
Gert Driesen 2e472fe368 * EventLogPermissionAttribute.cs:
* PerformanceCounterPermissionAttribute.cs: adjust AllowMultiple
and Inherited to match .NET

svn path=/trunk/mcs/; revision=27769
2004-05-20 18:56:34 +00:00
Gonzalo Paniagua Javier 8886aab23f Fix ChangeLog entry to tell the truth
svn path=/trunk/mcs/; revision=27708
2004-05-19 19:43:16 +00:00
Gonzalo Paniagua Javier d41151034a 2004-05-19 Gonzalo Paniagua Javier <[email protected]>
* Process.cs: separate the command and the arguments when calling
	Start_internal.

svn path=/trunk/mcs/; revision=27695
2004-05-19 17:59:11 +00:00
Gonzalo Paniagua Javier 84943987e3 2004-05-19 Gonzalo Paniagua Javier <[email protected]>
* Process.cs: redirecting I/O is not permitted if UseShellExecute is
	false. Also throw if FileName is null.

svn path=/trunk/mcs/; revision=27684
2004-05-19 16:10:46 +00:00
Lluis Sanchez 14c59cfad1 * DiagnosticsConfigurationHandler.cs: If initializeData is provided, use the
constructor that only takes one string as parameter to construct the
	listener. The name is set using the Name property, not the constructor.

	* TextWriterTraceListener.cs: In Write*, do nothing if no writer was
	provided.

svn path=/trunk/mcs/; revision=25105
2004-04-06 19:05:13 +00:00
Gonzalo Paniagua Javier 77338acee6 2004-03-25 Gonzalo Paniagua Javier <[email protected]>
* Process.cs: use the ISynchronizeInvoke object to invoke the event.
	Implemented Close, CloseMainWindow and Kill.

svn path=/trunk/mcs/; revision=24622
2004-03-25 23:45:44 +00:00
Ben Maurer a68914c645 2004-03-23 Ben Maurer <[email protected]>
* Switch.cs: Don't throw when there is no switches section.

svn path=/trunk/mcs/; revision=24502
2004-03-23 20:57:13 +00:00
Gonzalo Paniagua Javier 799e70ce7e Don't dispose the handler
svn path=/trunk/mcs/; revision=24441
2004-03-22 21:55:44 +00:00
Gonzalo Paniagua Javier 1586e985e1 2004-03-22 Gonzalo Paniagua Javier <[email protected]>
* Process.cs: support EnableRaisingEvents + Exited event.

svn path=/trunk/mcs/; revision=24439
2004-03-22 21:36:03 +00:00
Gonzalo Paniagua Javier 3e48b49a24 2004-03-15 Gonzalo Paniagua Javier <[email protected]>
* Process.cs: patch by Gert Driesen that fixes WaitForExit when the
	timeout is int.MaxValue.

svn path=/trunk/mcs/; revision=24104
2004-03-16 04:21:35 +00:00
Gonzalo Paniagua Javier 429226eafa 2004-03-15 Gonzalo Paniagua Javier <[email protected]>
* System.dll.sources: added ProcessStringDictionary.

	* System.Collections.Specialized/ProcessStringDictionary.cs: the same
	as StringDictionary, but doesn't turn keys into lowercase.

	* System.Diagnostics/Process.cs: added environment variables setting
	support and also send useShellExecute to the runtime.

	* System.Diagnostics/ProcessStartInfo.cs: support EnvironmentVariables.
	MS uses StringDictionary, which turns keys into lowercase. We don't
	do that.

svn path=/trunk/mcs/; revision=24068
2004-03-15 21:19:08 +00:00
Gonzalo Paniagua Javier fd2f751c17 2004-02-22 Gonzalo Paniagua Javier <[email protected]>
* Process.cs: ExitCode and ExitTime check that the process is finished.

svn path=/trunk/mcs/; revision=23316
2004-02-22 05:24:27 +00:00
Marek Safar 69e8f23c41 2004-02-04 Marek Safar <[email protected]>
* Makefile: Build System.dll in two steps. Because of the circular
        dependency with System.XML.dll.

svn path=/trunk/mcs/; revision=22761
2004-02-04 08:30:20 +00:00
Gonzalo Paniagua Javier 160303bc5c 2003-12-10 Gonzalo Paniagua Javier <[email protected]>
* Process.cs: if there's an error when starting the process, the 'pid'
	field contains the GetLastError code. Use that for the Win32Exception.

svn path=/trunk/mcs/; revision=20976
2003-12-10 16:48:12 +00:00
Martin Baulig 401b598342 2003-12-06 Martin Baulig <[email protected]>
* DefaultTraceListener: Don't use `where' in variable names.

svn path=/trunk/mcs/; revision=20823
2003-12-06 20:12:35 +00:00
Andreas N a41bcb0ed3 2003-11-13 Andreas Nahr <[email protected]>
* ICollectData.cs: Fixed signature

svn path=/trunk/mcs/; revision=19955
2003-11-13 19:30:35 +00:00
Andreas N 7ffd65ca4d corrected some format errors my previous commit did make
svn path=/trunk/mcs/; revision=19913
2003-11-12 20:32:56 +00:00
Andreas N 377d09d54d 2003-11-12 Andreas Nahr <[email protected]>
* ICollectData.cs: Added missing attribute

svn path=/trunk/mcs/; revision=19908
2003-11-12 20:23:41 +00:00
Andreas N 9f70ec7968 2003-07-27 Andreas Nahr <[email protected]>
* SRDescriptionAttribute.cs: Moved to System directory

svn path=/trunk/mcs/; revision=16735
2003-07-27 09:59:44 +00:00
Andreas N f46576b1b2 2003-07-21 Andreas Nahr <[email protected]>
* EventLog.cs: Implementation handling
	* EventLogImpl.cs: Added, contains an platform independent empty implementation
	for EventLog

svn path=/trunk/mcs/; revision=16492
2003-07-21 17:20:51 +00:00
Andreas N ca390b4310 2003-07-18 Andreas Nahr <[email protected]>
* AlphabeticalEnumConverter.cs: Added
	* EventLogEntry.cs: Implemented
	* EventLogPermissionEntryCollection.cs: Fixed signature and implementation of indexer
	* EventLogTraceListener.cs: Fixed signature
	* PerformanceCounter.cs: Added missing attribute
	* PerformanceCounterType.cs: Added missing attribute
	* SRDescriptionAttribute.cs: Added and implemented

svn path=/trunk/mcs/; revision=16399
2003-07-18 11:38:19 +00:00
Andreas N 44c8d493b2 2003-07-17 Andreas Nahr <[email protected]>
* CounterCreationData.cs:
	* EventLog.cs:
	* EventLogEntry.cs:
	* PerformanceCounter.cs:
	* Process.cs:
	* ProcessModule.cs:
	* ProcessStartInfo.cs:
	* ProcessThread.cs: Reworked attributes based on the new Consts scheme

svn path=/trunk/mcs/; revision=16339
2003-07-17 11:27:24 +00:00
Andreas N c87a8b4929 2003-07-14 Andreas Nahr <[email protected]>
* PerformanceCounterCategory.cs: Fixed signatures

svn path=/trunk/mcs/; revision=16193
2003-07-14 10:33:59 +00:00
Andreas N caa00be083 2003-07-13 Andreas Nahr <[email protected]>
* PerformanceCounter: Implemented or implementation added

svn path=/trunk/mcs/; revision=16178
2003-07-13 22:12:52 +00:00
Andreas N 78dc7ab616 2003-07-13 Andreas Nahr <[email protected]>
* DiagnosticsConfigurationHandler.cs: Removed a never used variable
	* EventLog.cs: Small update to prevent a warning
	* EventLogPermission.cs: Implemented or implementation added
	* EventLogPermissionAttribute.cs: Implemented or implementation added
	* EventLogPermissionEntry.cs: Implemented or implementation added
	* EventLogPermissionEntryCollection.cs: Implemented or implementation added
	* EventLogTraceListener.cs: Implemented or implementation added
	* PerformanceCounterManager.cs: Implemented or implementation added
	* PerformanceCounterInstaller.cs: Made internal
	* PerformanceCounterCategory.cs: Implemented few members
	* PerformanceCounterPermission.cs: Implemented or implementation added
	* PerformanceCounterPermissionAttribute.cs: Implemented or implementation added
	* PerformanceCounterPermissionEntry.cs: Implemented or implementation added
	* PerformanceCounterPermissionEntryCollection.cs: Implemented or implementation added

svn path=/trunk/mcs/; revision=16177
2003-07-13 22:09:12 +00:00
Andreas N d56e933d51 2003-07-07 Andreas Nahr <[email protected]>
* EventLog.cs: Removed unneccesary attribute according to corecompare
	* EventLogEntry.cs: Removed unneccesary attribute according to corecompare
	* Process.cs: Removed unneccesary attributes according to corecompare, added attribute
	* ProcessModule.cs: Removed unneccesary attribute according to corecompare
	* ProcessStartInfo.cs: Removed unneccesary attribute according to corecompare
	* ProcessThread.cs: Removed unneccesary attribute according to corecompare, fixed signature

svn path=/trunk/mcs/; revision=16010
2003-07-07 11:03:46 +00:00
Andreas N e1a881b8f8 2003-07-05 Andreas Nahr <[email protected]>
* InstanceDataCollectionCollection.cs: Corrected wrong signature
	* EventLog.cs: Missing attributes added, redirected some class members
	* EventLogEntry.cs: Missing attributes added
	* EventLogInstaller.cs: Made internal

svn path=/trunk/mcs/; revision=15968
2003-07-05 23:16:07 +00:00
Andreas N e5a860bb93 2003-07-02 Andreas Nahr <[email protected]>
* CounterCreationData.cs: Added missing attributes
	* CounterSample.cs: Implemented missing rest, fixed signature
	* CounterSampleCalculator.cs: Added private constructor, redirected function
	* Process.cs: Added attributes, added event mechanism
	* ProcessModule.cs: Added missing attributes
	* ProcessModuleCollection.cs: Redone using the already inherited-from ArrayList. Simplifies this a LOT
	* ProcessStartInfo.cs: Added missing attributes, moved internal fields to the begining of the file, restyling
	* ProcessThread.cs: Added missing attributes, added pseudo constructor
	* ProcessThreadCollection.cs: Implemented
	* PerformanceCounterPermission.cs: Fixed typo in class name
	* PerformanceCounterPermissionAccess.cs: Added attributes, fixed wrong member

svn path=/trunk/mcs/; revision=15958
2003-07-05 15:59:37 +00:00
Dick Porter f364bbf69f 2003-03-19 Dick Porter <[email protected]>
* Process.cs: Implement HasExited, fixes bug 39267

svn path=/trunk/mcs/; revision=12680
2003-03-19 16:31:16 +00:00
Gonzalo Paniagua Javier f84c69c393 oops. did the commit in the wrong tree
svn path=/trunk/mcs/; revision=12478
2003-03-13 19:33:25 +00:00
Gonzalo Paniagua Javier 31e90cb37e 2003-03-13 Gonzalo Paniagua Javier <[email protected]>
* Process.cs: throw an exception when the executable cannot be found.

svn path=/trunk/mcs/; revision=12477
2003-03-13 19:20:32 +00:00
Jonathan Pryor f69bd81f97 DiagnosticsConfigurationHandler.cs:
Don't assume that optional attributes are always present
  <assert/> can't have any child nodes
  Change in semantics: if the attribute isn't present, GetAttribute()
    returns null, not "".  This allows us to differentiate between an attribute
    not being present and an attribute with an empty value.
  Translate exceptions if a TraceListener type is invalid

ChangeLog: Update for the previous changes I forgot to record

svn path=/trunk/mcs/; revision=9806
2002-12-21 03:38:12 +00:00
Miguel de Icaza 594edb6fd8 Fix from Matt Kunze to add the other Process.Start overloads
svn path=/trunk/mcs/; revision=9800
2002-12-21 00:14:16 +00:00
Jonathan Pryor 1f73687f90 IndentLevel and IndentSize shouldn't be hardcoded; they should be set to
whatever TraceImpl is using (which in turn may have been set by the .config
file, so we should get the user-specified values in added listeners).

svn path=/trunk/mcs/; revision=9787
2002-12-20 00:04:00 +00:00
Jonathan Pryor 1eb5d4634b * TraceListener.cs: Make sure that indents are initially written. This allows
code that uses Trace.Indent() before a Trace.WriteLine() to be indented
  properly.
* TraceImpl.cs: provide a static constructor to explicitly specify the
  ordering of initialization, in particular the ordering of
  TraceImpl.Listeners and the reading of the .config file (by accessing
  DiagnosticsConfiguration.Settings).  This (hopefully) ensures that the
  Listeners collection is initialized before the .config file is read in, as
  the DiagnosticsConfigurationHandler will directly modify the listeners
  collection.
  The DiagnosticsConfigurationHandler assumes this so that it can <add/> and
  <remove/> trace listeners and set the logfile for the DefaultTraceListener.

svn path=/trunk/mcs/; revision=9786
2002-12-19 23:36:00 +00:00
Jonathan Pryor 60d72a0f50 Switches (Boolean & Trace) should be working now. Behavior of user-provided
Switch derived classes should match that of .NET.

Go forth and use Swiches! ;-)

ChangeLog:
  * BooleanSwitch.cs: Complete re-write.  It works now.
  * DefaultTraceListener.cs:
    - Use `const' strings, so I don't worry about copy/paste errors
    - Give `AssertUiEnabled' an actual backing member
  * DiagnosticsConfigurationHandler.cs: To avoid race conditions, let the
    configuration handler set .config-specified properties on
    DefaultTraceListener (AssertUiEnabled, LogFileName) and TraceImpl
    (AutoFlush, IndentSize).
  * Switch.cs: Near complete re-write.  Actually works, and is (should be)
    comformant with .NET behavior.  Changed member names because they were
    confusing me.  (Yes, that doesn't say much about my memory.)
  * TextWriterTraceListener.cs: Append text to already existing files, don't
    overwrite them.
  * TraceImpl.cs:
    - Added private destructor, to ensure no instances are created.
    - Move members declarations to be closer to each other.
  * TraceSwitch.cs: Complete re-write.  It works now.

svn path=/trunk/mcs/; revision=9747
2002-12-18 16:01:09 +00:00
Jonathan Pryor 7187b5f041 Reformat to comply with Mono coding standards.
svn path=/trunk/mcs/; revision=9735
2002-12-17 22:10:50 +00:00
Jonathan Pryor b843881827 Implement DiagnosticsConfigurationHandler, so that .config files can contain
<system.diagnostics/> configuration sections.

svn path=/trunk/mcs/; revision=9733
2002-12-17 21:42:08 +00:00
Gonzalo Paniagua Javier 2a0582c8bf 2002-12-15 Gonzalo Paniagua Javier <[email protected]>
* DefaultTraceListener.cs: now OutputDebugStringW is called from an
	internal call (update your runtime!). No more warnings in linux.

svn path=/trunk/mcs/; revision=9661
2002-12-15 02:19:34 +00:00
Dick Porter 542709a35c 2002-10-31 Dick Porter <[email protected]>
* FileStream.cs: Fix buffering properly this time.  Also kludge
	around broken pipe errors, treating them as EOF instead of
	throwing an IO exception.

	* MonoIO.cs: Return the error status in a parameter, as the
	GetLastError() value has long since been blown away if we try and
	look it up in a subsequent internal call invocation.

	* Process.cs:
	* Environment.cs:
	* FileSystemInfo.cs:
	* FileInfo.cs:
	* File.cs:
	* Directory.cs: MonoIO methods now have an error parameter

2002-10-31  Dick Porter  <[email protected]>

	* list.unix: Added MonoIO and MonoIOError to the build

svn path=/trunk/mcs/; revision=8712
2002-10-31 15:55:48 +00:00
Gonzalo Paniagua Javier 7f080f3193 2002-10-26 Gonzalo Paniagua Javier <[email protected]>
* DefaultTraceListener.cs: changed OutputDebugString to
	OutputDebugStringW (no more warnings under windows). Also a few style
	fixes.

svn path=/trunk/mcs/; revision=8580
2002-10-26 15:26:35 +00:00
Dick Porter 3207e426e4 2002-10-23 Dick Porter <[email protected]>
* Process.cs: Redirected standard input needs to have AutoFlush set

2002-10-23  Dick Porter  <[email protected]>

	* FileStream.cs: Implemented CanSeek, and used it around all the
	calls to MonoIO.Seek.  Fixed buffering in Read() so that it
	doesn't block forever on short reads.

	* MonoFileType.cs: New enum for GetFileType

	* MonoIO.cs: Added GetFileType

svn path=/trunk/mcs/; revision=8492
2002-10-23 15:12:26 +00:00
Dick Porter 0037b58a94 2002-09-27 Dick Porter <[email protected]>
* Process.cs: Implemented {get_,set_}{Min,Max}WorkingSet,
	ProcessName, GetProcessById, GetProcesses, GetProcessesByName.
	Pass the working directory to Start.  Pass the program and args in
	one string to be used with the second arg of CreateProcess, so it
	will search the path.

svn path=/trunk/mcs/; revision=7856
2002-09-27 11:39:50 +00:00
Nick Drochak f6e3aaa0b1 Forgot one...
svn path=/trunk/mcs/; revision=7609
2002-09-19 06:59:15 +00:00
Nick Drochak e1a0fb9915 2002-09-19 Nick Drochak <[email protected]>
* TraceImpl.cs: Remove debug prints

svn path=/trunk/mcs/; revision=7608
2002-09-19 06:56:12 +00:00
Nick Drochak 7a11028c33 2002-09-19 Nick Drochak <[email protected]>
* TraceListenerCollection.cs: Set Indet level and size to default
	values.  The values from TraceImpl might have been changed.

svn path=/trunk/mcs/; revision=7607
2002-09-19 06:48:05 +00:00
Nick Drochak 9f997ad5cd 2002-09-17 Nick Drochak <[email protected]>
* UriTest.cs: Fixed some path separator issues for the tests running on
	linux.

	* TraceTest.cs: Remove extraneous Console.WriteLine().

	* ServicePointManagerTest.cs: Convert Console.WriteLine() into a Fail()

	* TraceImpl.cs: Add some debug to find the error.  Still working on
	this one.

svn path=/trunk/mcs/; revision=7563
2002-09-17 15:05:21 +00:00