process

how to give wait & close the command prompt in java

I am using the following code to execute a batch file: java.lang.Runtime rt = java.lang.Runtime.getRuntime(); Process pr = rt.exec("MyBatch.bat"); My batch file takes some time to execute. I want my servlet process to wait till the batch file execution completes. I would like to close the command prompt after executing the batch file....

What is the best way to upgrade from Eclipse 3.3 to 3.4 (or future releases)

In the past I have had problems upgrading from release to release of Eclipse. I was wondering how the Eclipse users on StackOverflow dealt with upgrading from release to release of Eclipse. Is using a Distro the solution? Staying on a past release point until you are forced forward, a good idea? Lately I have just reloaded from scrat...

Methods of sharing class instances between processes

I have written a C++ class that I need to share an instance of between at least two windows processes. What are the various ways to do this? Initially I looked into #pragma data_seg only to be disappointed when I realised that it will not work on classes or with anything that allocates on the heap. The instance of the class must be acc...

If Quartz Scheduler dies, how do I stop the child Java processes that it started?

I'm currently using Quartz Scheduler as a replacement for Cron on our Windows 2003 Server Box. I have two specific Jobs that needed to be started in a new VM, so I'm using the ProcessBuilder object in Java 5 to get my "Process" object. The problem I'm running into is when our Quartz Scheduler JVM stops, the 2 jobs in separate JVM's kee...

Reset IIS on multiple servers at once instead of looping through

I am trying to reset IIS on a set of servers all at one time instead of looping through and resetting each one individually, but I can't seem to figure out how to do it. Could someone please give me an example? Thank you I am using System.Diagnostics With m_Process.StartInfo .FileName = strFileName ...

What are known/documented/undocmented methods of the process start monitoring?

I need to monitor and, if it is needed, decline process start in the Windows XP and Vista OS? What are known/documented/undocmented methods? What about known hacks of this methods? (It will be used for the shareware firewall/security software). ...

Monitoring windows processes

I'd like get a notification if a particular process starts. For ex., if xyz.exe starts in the background, I need a messagebox stating the same. I'm a little familiar with Windows Hooks in VC++. Can someone point me to some similar links or methods to achieve my goal? Thanks. ...

Executing a Cygwin process from .NET ?

I'm trying to launch Cygwin version of ruby.exe from a .NET application, but I'm stuck. c:\>"c:\cygwin\bin\ruby.exe" c:\test\ruby.rb /usr/bin/ruby: no such file to load -- ubygems (LoadError) As you see Ruby can't locate libraries because it's looking some Linux style paths. Obviously when I run ruby.exe from .NET since it can't fin...

When should you not Scrum?

I have seen a lot of companies buy into the Agile/Scrum process and basically use it for every project, regardless of what it is. When is Scrum not appropriate and can cause more harm than good (generally speaking)? ...

Should human factor be taken into account when deciding on what process to use?

When you are deciding on what methodology or process to use for your project, should you take into account the human factors? If there is any resistance to things, do you go with the flow or force people to change? For example, say you want to push for pair programming but the team members resist to working in that mode (or show dislike...

How do I get the path of a process in Unix / Linux

In Windows environment there is an API to obtain the path which is running a process. Is there something similar in Unix / Linux? Or is there some other way to do that in these environments? ...

Async process start and wait for it to finish

I am new to the thread model in .net. What would you use to: start a process that handles a file (process.StartInfo.FileName = fileName;) wait for the user to close the process OR abandon the thread after some time if the user closed the process, delete the file Starting the process and waiting should be done on a different thread t...

Why should I use a thread vs using a process?

I'm a newbie at this so please forgive me for my ignorance. Separating different parts of a program into different processes seems (to me) to make a more elegant program then just threading everything. In what scenario would it make sense to make things run on a thread vs separating the program into different processes? When should I ...

Process Priority inheritance

Hi, imagine that you have a process A running with priority AboveNormal that starts another process B without specify the priority. Is the priority of the process B inherited from the priority of the process A? So, what will be the priority on the process B? AboveNormal, Normal or another? ...

How can I set the max number of mysql processes or threads?

ps axuw| grep mysql indicates only mysql process but if I run htop I can see 10 rows each one of them with a separate PID. So I wonder if they are threads or processes that for some reason I cannot see using ps. Would it make any sense to try to limit them to 2 on my development machine where I don't need concurrent access of many clien...

Canceling a programatically started SQL Server Express Install

During my application setup, the user has the option of installing a new SQL Server Express 2005 instance in the local machine if they don't want to use an already existing SQL Server 2005 in their network for whatever reason. As the SQL Server installation is optional, I don't have it as a prerequisite of my installer. Instead, I just ...

Partially read standard output of another process created from c# application

I have a GUI application within which i'm spawning a console application using Process class. Process p1 = new Process(); p1.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; p1.StartInfo.CreateNoWindow = true; p1.StartInfo.UseShellExecute = false; p1.StartInfo.FileName = Path.Combine(basepath, "abc.exe"); p1.StartInfo.Arguments = "/pn...

how do I get a process to reload itself in linux?

I have a service, say foo, written in C++, that runs as root. There is the usual scrip, /etc/init.d/foo start|stop|restart. At certain times, foo needs to reload itself. Normally after an upgrade has finished. But doing things like: system("/etc/init.d/foo restart") doesn't work since as soon as restart kills foo, the system() cal...

How to determine the state of a process (i.e. if it is a zombie)

Hi, how can I get information on the state of a process (i.e. if it is a zombie) using C under Linux? After reading the answers so far I want to narrow my question somewhat: I would prefer a pure C solution. After reading the ps source (which reads /proc/) I thought that there should be a better way and asked here :) ...

Return process id

Hello everyone. I have this issue that I want to resolve. Lets think we have this situation. We have one instance of notepad.exe running. I run another notepad.exe. Now I want to kill the latter. How can I do it? If I was able to know the pid of last notepad.exe then I could kill it. But how to get the PID of last opened program? Anot...