Commit Graph
82 Commits
Author SHA1 Message Date
Andrés G. Aragoneses 5bb70a1030 * Test/System.Diagnostics/ProcessTest.cs: New tests for bug 477943.
* System.Diagnostics/Process.cs: Throw IOEs instead of normal
exceptions. Fixes bug 477943.

svn path=/trunk/mcs/; revision=127932
2009-02-25 02:28:14 +00:00
Zoltan Varga 10cabfadcc 2009-01-18 Zoltan Varga <[email protected]>
* Process.cs: Avoid closing the duplicated process handle in
	ProcessWaitHandle, it is done automatically by the WaitHandle.Dispose ().
	Fixes #464628.

svn path=/trunk/mcs/; revision=123738
2009-01-18 16:00:11 +00:00
Miguel de Icaza 1755003275 A bug fix for 459450
2008-12-25  Miguel de Icaza  <[email protected]>

	* ProcessTest.cs: Created a test case from bug 459450.

2008-12-25   Leszek Ciesielski <[email protected]>

	* System.Diagnostics/Process.cs: Raise the
	Process.OutputDataReceived and Process.ErrorDataReceived with null
	arguments at the end.   This is the documented behavior:

	http://msdn.microsoft.com/en-us/library/system.diagnostics.datareceivedeventargs.data.aspx

	And CruiseControl.NET depended on this.   Bug #459450.
	
	* Microsoft.CSharp/CSharpCodeCompiler.cs: Fix the code, as it
	depened on the previous broken behavior.



svn path=/trunk/mcs/; revision=122125
2008-12-25 17:44:52 +00:00
Bill Holmes 18e193acd5 2008-11-13 Bill Holmes <[email protected]>
* process.h : Adding method declaration for
	  ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.

	* process.c : Adding implementation for
	  ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.

	* icall-def.h : Registering ICALL Processs.WaitForInputIdle_internal
	  to ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.

	* wait.h : Adding method declaration for WaitForInputIdle.

	* wait.c : Adding implementation for WaitForInputIdle.

	* Process.cs : Adding an implementation for WaitForInputIdle
	  to call the an internal call.  The internal call is only
	  implemented properly on Windows.

	Code is contributed under MIT/X11 license.


svn path=/trunk/mcs/; revision=118724
2008-11-13 16:03:48 +00:00
Jonathan Chambers 84ec87d71b 2008-11-06 Jonathan Chambers <[email protected]>
* MonoIO.cs : Add DuplicateHandle.

2008-11-06  Jonathan Chambers  <[email protected]>

        * Process.cs : Use DuplicateHandle when redirecting
        StdInput and StdOutput. Fixes bug #436291.



svn path=/trunk/mcs/; revision=118134
2008-11-06 18:48:08 +00:00
Paolo Molaro 43c05dda29 Mon Oct 13 14:39:52 CEST 2008 Paolo Molaro <[email protected]>
* Process.cs: added icall and implementation of many memory-related
	query methods (bug #434473).


svn path=/trunk/mcs/; revision=115653
2008-10-13 12:42:08 +00:00
Bill Holmes 017eaee375 2008-09-10 Bill Holmes <[email protected]>
* Socket.cs : Adding a comment to provide locations where
	  changes to MonoSocketAsyncResult need to be synced.

	* Process.cs : Update the fields of ProcessAsyncReader to
	  match MonoSocketAsyncResult metadata/socket-io.h

	Code is contributed under MIT/X11 license.


svn path=/trunk/mcs/; revision=112681
2008-09-10 15:20:35 +00:00
Dick Porter 941ac90384 2008-07-28 Dick Porter <[email protected]>
* Process.cs: When passing handle references around, it needs to
	be duplicated and freed so the OS doesn't close it.  Makes the
	testcase in 410743 work again now the underlying bug has been
	fixed.



svn path=/trunk/mcs/; revision=109048
2008-07-28 16:30:37 +00:00
Zoltan Varga eff019542d 2008-07-27 Zoltan Varga <[email protected]>
* Process.cs (SetExitCallbackIfNeeded): Avoid a race condition by not
	checking for HashExited.

svn path=/trunk/mcs/; revision=108887
2008-07-27 00:08:08 +00:00
Robert Jordan 2b194c193d In System.Diagnostics:
2008-06-21  Robert Jordan  <[email protected]>

	* Process.cs (Start_common): UserName may be null or empty.
	Fixes bug  #350543.

In Test/System.Diagnostics:
2008-06-21  Robert Jordan  <[email protected]>

	* ProcessTest.cs (Start_UseShellExecuteWithEmptyUserName):
	add test for bug #350543.


svn path=/trunk/mcs/; revision=106452
2008-06-23 19:09:22 +00:00
Dick Porter a4a491eac8 2008-06-19 Dick Porter <[email protected]>
* Process.cs: Match the buffer sizes of StreamWriter and
	MonoSyncFileStream for redirected stdout and stderr.  Fixes bug
	401225.



svn path=/trunk/mcs/; revision=106217
2008-06-19 14:56:31 +00:00
Gert Driesen baab1f11d4 * Process.cs: In PriorityClass setter, first check whether value is
valid and remove LAMESPEC since the documentation has been corrected 
for .NET 3.5. Code formatting.
* ProcessTest.cs: Added tests for PriorityClass.

svn path=/trunk/mcs/; revision=91804
2007-12-22 09:48:37 +00:00
Dick Porter 6ffa6c9dbc 2007-12-19 Dick Porter <[email protected]>
* Process.cs: Check that the process has been started before
	getting or setting the priority class.  Fixes bug 348415.

2007-12-19  Dick Porter  <[email protected]>

	* Win32Exception.cs: Add text for error 5, Access denied.



svn path=/trunk/mcs/; revision=91629
2007-12-19 14:25:14 +00:00
Gert Driesen 3b0d04fd6c * Process.cs: Modified StartInfo to throw ArgumentNullException when
value is set to null, instead of ArgumentException. Remove check if   
file name is rooted and exists when UseShellExecute is false, and let
runtime handle this. Fixes bug #345565. When a process cannot be started, do
not access ProcessStartInfo.EnvironmentVariables since that would not allow us
to re-use the instance when changing UseShellExecute. Added argument check in
Start (ProcessStartInfo). Code formatting.
* ProcessTest.cs: Added tests for Start overloads.

svn path=/trunk/mcs/; revision=90693
2007-12-04 16:37:36 +00:00
Dick Porter e2577f0f0d 2007-11-15 Dick Porter <[email protected]>
* Process.cs: Pass the process handle to GetModules_internal();



svn path=/trunk/mcs/; revision=89687
2007-11-15 17:13:46 +00:00
Atsushi Eno c961accff5 2007-11-13 Atsushi Enomoto <[email protected]>
* Process.cs : ... and it exposed some missing attributes.


svn path=/trunk/mcs/; revision=89548
2007-11-13 11:51:37 +00:00
Atsushi Eno 42bd154fb0 2007-11-13 Atsushi Enomoto <[email protected]>
* Process.cs : oops, SessionId was int.


svn path=/trunk/mcs/; revision=89532
2007-11-13 09:45:56 +00:00
Atsushi Eno 09a8cb64ff oops.
svn path=/trunk/mcs/; revision=89531
2007-11-13 09:37:43 +00:00
Atsushi Eno 3df8967748 2007-11-13 Atsushi Enomoto <[email protected]>
* Process.cs : added missing SessionId (NIE).


svn path=/trunk/mcs/; revision=89530
2007-11-13 09:29:03 +00:00
Robert Jordan 535abaefa2 In Test/System.Diagnostics:
2007-10-30  Robert Jordan  <[email protected]>

	* ProcessTest.cs: Add tests for bug #319829.

In System.Diagnostics:
2007-10-30  Robert Jordan  <[email protected]>

	* Process.cs: Wrap the redirected streams with a stream
	that provides real async Begin/Read|Write operations.
	Fixes bug #319829.

In System.IO:
2007-10-30  Robert Jordan  <[email protected]>

	* MonoSyncFileStream.cs: Add.


svn path=/trunk/mcs/; revision=88491
2007-10-30 18:35:42 +00:00
Miguel de Icaza 9cf1277ccf 2007-09-25 Miguel de Icaza <[email protected]>
* Process.cs: Return an empty collection to prevent crashes;
        Fixes #319946


svn path=/trunk/mcs/; revision=86360
2007-09-25 21:43:56 +00:00
Paolo Molaro bc3b51b83f Tue Sep 25 18:03:37 CEST 2007 Paolo Molaro <[email protected]>
* Process.cs: eliminate the console encoding logic which was
	duplicated from System.Console and just use Console.Out.Encoding
	(bug #328162).


svn path=/trunk/mcs/; revision=86341
2007-09-25 15:57:26 +00:00
Atsushi Eno 5ccf103008 2007-09-05 Atsushi Enomoto <[email protected]>
* EventLog.cs, EventLogImpl.cs, LocalFileEventLog.cs, NullEventLog.cs,
	  Win32EventLog.cs : added missing members, will be left unsupported
	  in non-Win32 impl and left unimplemented in Win32.
	* CounterCreationDataCollection.cs : in 2.0 OnValidate() is overriden
	  instad of OnInsert().
	* Process.cs : removed StandardErrorEncoding and
	  StandardOutputEncoding. They do not exist anymore.


svn path=/trunk/mcs/; revision=85336
2007-09-05 08:57:02 +00:00
Atsushi Eno 14448f8d30 2007-09-03 Atsushi Enomoto <[email protected]>
* Process.cs, ProcessStartInfo.cs : user info support (on windows).
	 Removed encoding_stderr, encoding_stdout which are not needed and
	 do not match icall.


svn path=/trunk/mcs/; revision=85209
2007-09-03 08:51:17 +00:00
Robert Jordan ff0f205a05 2007-08-23 Robert Jordan <[email protected]>
* Process.cs: implement PriorityClass. Fixes #81756.


svn path=/trunk/mcs/; revision=84679
2007-08-23 06:17:06 +00:00
Paolo Molaro 822ca991f0 Mon Aug 20 12:41:09 CEST 2007 Paolo Molaro <[email protected]>
* Process.cs: implemented icall for system/user times.


svn path=/trunk/mcs/; revision=84440
2007-08-20 10:18:46 +00:00
Gonzalo Paniagua Javier b28ba972c6 2007-08-08 Gonzalo Paniagua Javier <[email protected]>
* Process.cs: added StandardOutputEncoding and StandardErrorEncoding
	properties. Bug #82262 fixed.


svn path=/trunk/mcs/; revision=83703
2007-08-09 03:48:02 +00:00
Atsushi Eno 520f81d70b 2007-08-06 Atsushi Enomoto <[email protected]>
* Process.cs, ProcessStartInfo.cs : added StandardOutputEncoding
	  and StandardErrorEncoding.

	* ProcessStartInfoTest.cs: tests for Standard[Output|Error]Encoding.


svn path=/trunk/mcs/; revision=83566
2007-08-06 23:46:28 +00:00
Atsushi Eno bc1aba7e94 2007-08-06 Atsushi Enomoto <[email protected]>
* PerformanceCounterInstanceLifetime.cs
	  PerformanceCounterCategoryType.cs : new.
	* ICollectData.cs ProcessStartInfo.cs
	  InstanceDataCollectionCollection.cs PerformanceCounter.cs
	  InstanceDataCollection.cs Process.cs :
	  cosmetic attributes cleanup.

	* System.dll.sources : added PerformanceCounterInstanceLifetime.cs
	  and PerformanceCounterCategoryType.cs.


svn path=/trunk/mcs/; revision=83517
2007-08-06 05:40:47 +00:00
Jb Evain ccd11c2531 2007-08-03 Jb Evain <[email protected]>
* Process.cs: disable StartExistCallbackIfNeeded in 2.1.

svn path=/trunk/mcs/; revision=83453
2007-08-03 21:13:42 +00:00
Gonzalo Paniagua Javier b92f00f9a4 2007-07-24 Gonzalo Paniagua Javier <[email protected]>
* Process.cs: use the default encoding or the windows input/output
	encodings for the process input/output/error streams. Bug #80838 fixed.


svn path=/trunk/mcs/; revision=82618
2007-07-24 22:26:31 +00:00
Gonzalo Paniagua Javier 81c1bfa917 2007-07-14 Gonzalo Paniagua Javier <[email protected]>
* Process.cs: don't send empty lines that are not in the input. Fixes
	bug #79529.


svn path=/trunk/mcs/; revision=81996
2007-07-14 22:44:21 +00:00
Gert Driesen 2016ab5b30 * ProcessTest.cs: Added null check tests.
* Process.cs: Allow GetProcesses and GetProcessById overloads with
machine name to work for local machine.
* System_test.dll.sources: Added ProcessTest.cs.

svn path=/trunk/mcs/; revision=70366
2007-01-02 15:07:35 +00:00
Paolo Molaro f166c9e540 Thu Dec 14 20:24:09 CET 2006 Paolo Molaro <[email protected]>
* Process.cs: if a process object is restarted, close the
	previous process handle (bug #80143).


svn path=/trunk/mcs/; revision=69505
2006-12-14 19:25:03 +00:00
Gonzalo Paniagua Javier 76822ab984 2006-11-27 Gonzalo Paniagua Javier <[email protected]>
* Process.cs: the Process returned by the static Start method never had
	the right ProcessStartInfo. Fixes bug #80019.


svn path=/trunk/mcs/; revision=68543
2006-11-28 00:05:00 +00:00
Miguel de Icaza 52c833fdd6 Improve TODOs, remove fear of spaces
svn path=/trunk/mcs/; revision=68043
2006-11-17 01:16:56 +00:00
Gonzalo Paniagua Javier b51a1abd5c 2006-09-11 Gonzalo Paniagua Javier <[email protected]>
* Process.cs: fix operation number to be 8. The other one was working
	because the default is to wait for input on the file descriptor.


svn path=/trunk/mcs/; revision=65248
2006-09-11 17:49:22 +00:00
Kornél Pál 546a1134d2 Converted source files to UTF-8 (without byte order mark). Use UTF-8 as the default encoding for compilers.
svn path=/trunk/mcs/; revision=64941
2006-09-05 13:54:12 +00:00
Gonzalo Paniagua Javier 134878e861 2006-08-09 Gonzalo Paniagua Javier <[email protected]>
* Process.cs: reset the 'start' time if we wait for stdout reading to
	be completed.


svn path=/trunk/mcs/; revision=63567
2006-08-09 21:20:35 +00:00
Gonzalo Paniagua Javier e9c77c5f09 2006-08-09 Gonzalo Paniagua Javier <[email protected]>
* mcs/class/System/System.Diagnostics/Process.cs: add support for 2.0
	asynchronous reads on stdout and stderr.

	* mono/mono/metadata/threadpool.c: treat pipes from process
	asynchronous reads as sockets when reading from them, so we get
	select/poll or epoll to wait for data.


svn path=/trunk/mcs/; revision=63565
2006-08-09 21:13:11 +00:00
Sebastien Pouliot 74387a7d7d 2006-07-31 Sebastien Pouliot <[email protected]>
* EventLogEntry.cs: Add a linkdemand for unrestricted on class.
	* EventLogTraceListener.cs: Add a linkdemand for unrestricted on class
	* FileVersionInfo.cs: Add a linkdemand for unrestricted on class. Add
	an imperative demand for FileIOPermission.Read on GetVersionInfo 
	method. Change ToString method to use a StringBuilder.
	* PerformanceCounterCategory.cs: Add a linkdemand for unrestricted on
	class.
	* PerformanceCounterManager.cs: Add a linkdemand for unrestricted on 
	class. Add [Obsolete] for NET_2_0 profile.
	* Process.cs: Add a linkdemand and an inheritancedemand for 
	unrestricted on class.
	* ProcessStartInfo.cs: Add a linkdemand for unrestricted on class.


svn path=/trunk/mcs/; revision=63179
2006-07-31 13:44:41 +00:00
Andrew Skiba 75bc0abfda * SharpCodeCompiler.cs: find mono.exe in mono/mini; fixes #78731
* Process.cs: throw FileNotFoundException earlier; give more diagnostics.

svn path=/trunk/mcs/; revision=62662
2006-07-16 16:25:25 +00:00
Dick Porter d2f7f87ac4 2006-05-16 Dick Porter <[email protected]>
* Process.cs: Dispose the handle from a destructor too



svn path=/trunk/mcs/; revision=60744
2006-05-16 16:57:41 +00:00
Atsushi Eno 091cb74cc9 2006-04-04 Atsushi Enomoto <[email protected]>
* System.dll.sources: added DataReceivedEventArgs.cs and
          DataReceivedEventHandler.cs.
        * System_test.dll.sources : added StopwatchTest.cs.

        * Stopwatch.cs:
          Zoltan was quicker to add it, here I put my implementation ;-)
        * Process.cs :
          Added some missing long members (not implemented anyways).
        * DataReceivedEventHandler.cs DataReceivedEventArgs.cs :
          added new 2.0 types.

        * StopwatchTest.cs : new test.


svn path=/trunk/mcs/; revision=58989
2006-04-04 00:36:49 +00:00
Dick Porter d269933466 2006-03-03 Dick Porter <[email protected]>
* Process.cs: Close redirected pipes on errors.  Fixes bug 77514.



svn path=/trunk/mcs/; revision=57540
2006-03-03 15:21:38 +00:00
Dick Porter 5c566a7470 2005-11-17 Dick Porter <[email protected]>
* Process.cs: Split Start_common into Start_shell and
        Start_noshell, which call ShellExecuteEx and CreateProcess
        respectively.  Fixes bug 76670.

2005-11-17  Dick Porter  <[email protected]>

        * Environment.cs: Incremented corlib version



svn path=/trunk/mcs/; revision=53199
2005-11-17 17:36:36 +00:00
Gonzalo Paniagua Javier 98b21a6a26 fix thinko. It should work anyway
svn path=/trunk/mcs/; revision=50357
2005-09-21 05:53:21 +00:00
Gonzalo Paniagua Javier 10875ea704 2005-09-21 Gonzalo Paniagua Javier <[email protected]>
* Process.cs: deal with the fact that someone can enable raising events
	and/or registed a Exited delegate before and *after* Start is called for
	the process. Only queue the exit callback in the threadpool when it's
	possible and requested. Fixes bug #76129.


svn path=/trunk/mcs/; revision=50356
2005-09-21 05:49:59 +00:00
Gert Driesen 39421f4b7c * EventLog.cs: Fixed Designer attribute to match MS.NET.
* ICollectData.cs: Added marshalling attribute to match MS.NET.
* PerformanceCounter.cs: Fixed Designer attribute to match MS.NET.
* Process.cs: Fixed Designer attribute to match MS.NET, modified
* ProcessModule.cs: Fixed Designer attribute to match MS.NET.
* ProcessThread.cs: Fixed Designer attribute to match MS.NET.
DesignerSerializationVisibility on StartInfo to match MS.NET, changed
Category attribute on Exited event to match MS.NET.

svn path=/trunk/mcs/; revision=48151
2005-08-09 08:44:10 +00:00
Ben Maurer 0e8decdb37 remove svn:executable from .cs files
svn path=/trunk/mcs/; revision=46562
2005-06-27 15:51:40 +00:00