process

Starting a new process with arguments

I have a program that receives something like this from a settings file: "C:\Files\App 1\App.exe" "-param1:true -blah" It receives this all as 1 string, but the Process object in C# needs the program and the arguments passed separately. Is there an easy way in C# to parse this, or a way to just pass the statement as it is without pars...

Strange behavior when running a bash script from java program

I have a script (KSH script to be precise) that downloads 3 files from a FTP server, using the curl command. When I run manually my script, i.e. by executing the command ./ftp_download.sh XXX (XXX are the parameters for the script), the download finishes correctly. As I want to run the script from a Java program, I have made a short Ja...

What's your process for dealing with database schema changes in a dev team?

Hey guys - here's a more general question on how you handle database schema changes in a development team. We are a team of developers and the databases used during development are running locally on everyone's box as we want to avoid the requirement to have web access all the time. So running a single central database instance somewhe...

GWT Change URL after processing request parameters

I want to support linking with url request parameters in my GWT app. Example http://host/app?action=A&p1=v1&p2=v2 I am able to process the action=A & other params, but once I am done with that, I want to change the URL to remove them. The problem is that once the user comes to the webpage, for completing the "action" with para...

Linux Process States

In Linux, what happens to the state of a process when it needs to read blocks from a disk? Is it blocked? If so, how is another process chosen to execute? ...

Coldfusion Process Name

This is just an edit to help people from google out a bit later on. What is the ColdFusion Process Name? Answer is below. OLD QUESTION - Found the answer, but renaming for Google purposes: Hi All, I am attempting to get the Virtual Memory and Memory Usage from a Windows Service that is not listed in the process list. If it were, i...

DeadLock Issues in Process.StandardOutput.ReadToEnd();

I read that this portion of code can cause deadlock: Process p = new Process(); p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.FileName = "Write500Lines.exe"; p.Start(); p.WaitForExit(); string output = p.StandardOutput.ReadToEnd(); Because A deadlock condition can result if ...

Check if handle belongs to the current process?

Is there any Win32 API to check if a given handle belongs to the current process? ...

Windows Mobile 5 - Handle Application Exit

Hi there, I'm developing for Windows Mobile 5.0 and have come across a little issue with my app. I'm using the win32 api to schedule a process to run periodically. This is thanks to the code posted at http://www.codeproject.com/KB/mobile/WiMoPower1.aspx (call to CeRunAppAtTime) The problem I've got however is that if I'm scheduling a p...

Does this registration process seem simple enough?

Building a website that has English & Japanese speaking users, with the Japanese users being actual paying customers (they're businesses looking to promote their presence). Their registration process is a tad different than the English users. Here's what I had in mind, tell me if there are any glaring mistakes I should avoid: User -> H...

Why code segment is Common for different instances of same program

Hi, I wanted to know Why code segment is common for different instances of same program. For Eg: Consider program P1.exe running, if another copy of P1.exe is running, code segment will be common for both running instances. Why is it so ?. Answer will be highly appreciated. Thanks in advance. ...

unix process infinite

Hi, I am wondering what happens in a program that just has a while(1); in the main() function when compiled with g++ on unix. When I run the program, I am seeing 0% cpu usage. Why is this? Shouldn't it hog up the cpu? Is the compiler optimizing this somehow? By putting a yield_processor like system call that context switches out? The ...

How to achive single-processing mode running php scripts?

I have cron job - php script which is called one time in 5 minutes. I need to be sure that previously called php script has finished execution - do not want to mix data that's being processed. There are three approaches I used to apply: Creation of auxiliary text file which contains running-state flag. Executed script analyzes the co...

How to abort a running program in MATLAB?

Sometimes after calling a function (which takes some 30 odd minutes to finish), you realize that you did something wrong and want to stop the program. How do you do that in MATLAB? What I do is shutdown MATLAB completely and restart. I think there would be a way to abort the execution of the function instead. Anybody know what that is...

Gracefuly stop .net initiated Java Process

Having the next .net code, I want to stop it correctly so that the jvm executes it's ShutdownHooks. System.Diagnostics.Process p = new Process(); p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardError = true; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; p.StartInfo.Worki...

Difference between process group id and job id in UNIX

Please tell me the difference between a process group ID and a jobid. Is jobid a builtin of a shell program or is it related to the kernel? What are the uses of each of them? When a process is run in background, is only jobid set or is the pgid set as well? What are the uses of the setpgid() function? When a process is run in background...

Job id in UNIX doubt

I asked a related question 'Difference between process group id and job id in Unix', but I have a doubt that was not answered. In that answer, it was written that job id is built in data related to shell (kernel has nothing to do with it), so foreground / background is understanding of shell, but when we do "ps x" then it display in st...

Can we start a background process using exec() giving & as an argument?

If not, how can we start a background process in C? ...

Timeout when ssh command is executed from my Java program

I have a Java program which runs in Tomcat and which needs to execute several ssh and scp commands, as well as a few simple commands such as ls on the local machine. I am having trouble with my current approach in that I am getting a time out every time I execute an ssh command. I can run the ssh command on the command line with no pro...

Does waitpid blocks on a stopped job?

I have a child process which has received a SIGTSTP signal. When I call waitpid(-1,NULL,0); the parent blocks, but in documentation, its written that waitpid returns with pid for stopped jobs. #include<unistd.h> #include<stdio.h> #include<signal.h> #include<sys/wait.h> main() { int pid; if( (pid=fork()) > 0) { sleep(5); if(ki...