process

Calling PHP multiple times within a CRON job (self-calling until an exit condition is satisfied)

I'm planning to sync 2 folders from 2 dyfferent servers using a cronjob scheduled to run every hour. The script that is to be scheduled will check if a previous instance is already running, and if not, continue with processing. so, the first stage is to sync these folders. Daily (or more often), the second server will have 1-2 thousands...

What tools must a C++ programmer be familiar with when programming in industry rather than recreationally?

I'm interested in the differences in work flow, code management, tools you might be expected to be familiar with etc. Not stuff like "your code will need more rigorous testing", or "your code will need to be more readable/maintainable" or "getting paid"! These are obvious I think. Also, I don't really want a list of the pros and cons ...

What is meant by CPU Utilization of a process and How can it be decreased?

What is meant by CPU Utilization of a process? How to measure it? What are the means for reducing it? I have always been confused with this concept. I have tried to measure the CPU used by using 'top' command in the Linux. But, what I notice is, when there are no other user process running, then my process seem to spike up and take ...

Is there hard limit to the number of threads that can exist in a .NET process ?

Possible Duplicate: Maximum number of threads in a .NET app? Is there a limit on the number of threads we can create in a .NET application ? I am assuming that the number of threads that can be created is limited by the amount of memory available since the threads' stack needs to be allocated. Please correct me if I am wrong. ...

multi-threading question for large batch process

We have a batch process consisting of about 5 calculations that happens on each row of data (20 million rows total). Our production server will have around 24 processors with decent CPUs. Performance is critical for us. Assuming that our algorithms are pretty efficient, what would be the best way to achieve maximum time performance fo...

How can I fire and forget a process in Perl?

Can somebody please tell me how to fire-and-forget a process in Perl? I've already looked at ruby: how to fire and forget a subprocess? for doing the same in Ruby. ...

Any tool(s) for knowing the layout (segments) of running process in Windows?

I've always been curious about How exactly the process looks in memory? What are the different segments(parts) in it? How exactly will be the program (on the disk) & process (in the memory) are related? My previous question: http://stackoverflow.com/questions/1966920/more-info-on-memory-layout-of-an-executable-program-process In m...

getting a program to return immediately at the command line so it's not tied to the shell that launched it

Hi everyone, Some programs return immediately when launched from the command line, Firefox for example. Most utilities (and all the programs I've written) are tied to the shell that created them. If you control-c the command line, the program's dead. What do you have to add to a program or a shell script to get the return-immediately b...

Is it safe to kill a replicating MySQL-process which is 'copying to tmp table'?

I'm having a problem on a master MySQL (5.0, Linux) server: I tried to add a comment to a table row, which translates into an ALTER TABLE command. Now the process is stuck on 'copy to tmp table', copying the 100'000'000+ rows. Disk IO usage is uncomfortably high. Since the master is using replication, I'm unsure if I can kill this proce...

Kill other bash daemons from the same script

I am having a hell of a time trying to write a "kill all other daemon processes" function for use within a bash daemon. I do not ever want more than one daemon running at once. Any suggestions? This is what I have: #!/bin/bash doService(){ while do something sleep 15 done } kil...

Process.waitFor(), threads, and InputStreams

In pseudocode, here's what I'm doing: Process proc = runtime.exec(command); processOutputStreamInThread(proc.getInputStream()); processOutputStreamInThread(proc.getErrorStream()); proc.waitFor() However, sometimes processOutputStreamInThread doesn't see any output and sometimes it does. Roughly, the method creates a BufferedInputStre...

start gdb using a pid

In general i see the process's pid which is running in the background and start dbx on that process using the command dbx -a <pid> similarly how could i do it using gdb? ...

How to terminate child processes when a c# console application is aborted?

I have a console application that spawns other win32 processes using WMI ManagementClass.I have a requirement when a user kills the console application through proc explorer or by pressing ctrl+c ,the application should terminate all the child processes it created.What is the best way to achive this? ...

when i running the below code iam getting handle is invalid it takes a string and pass it to remote batch file

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Diagnostics; using System.Security; namespace SampleProject { public partial class Form1 : Form { public Form1() { ...

Is there any Scala built-in class for capturing an external process's output?

Since Scala has so many cool stuff I was thinking it may have something that makes capturing a process's output easy. I know the Java way of doing that, but I thought about asking for another way. ...

Start process from stream

I have a memory stream that contains a PDF file. Is it possible to view the PDF without saving it to the hard disk ? Process.Start() only takes a path and not a stream. Thank you ...

java killing process after a period of time

hi, my code goes like this: Runtime rt = Runtime.getRuntime(); // cmd == "cmd.exe /C java =Xms2M =Xmx16M Sth" Process proc = rt.exec(cmd); Now i want to kill this process after a second, and get his output and error into a string variables. How to do that ? In my case: I have a infinitive loop in compi...

Process.Exited not always firing

If I run the following code : Process myProcess = new System.Diagnostics.Process(); myProcess.StartInfo.FileName = "notepad.exe"; myProcess.EnableRaisingEvents = true; myProcess.Exited += new System.EventHandler(Process_OnExit); myProcess.Start(); public static void Process_OnExit(object sender, EventArgs e) { // Delete the file o...

Running external subprocesses and reading return code

I'm creating a python script to sort a lot of images (game screenshots). I found a way to do that in imagemagick : I know that, if a specific square of the image is the same as the reference crop, then the image is of category one. If not, I check for another crop and another category, and if that doesn't fit either, I put the image in ...

spawning process on erlang cluster

If I spawn a new process on a busy node in an erlang cluster and other nodes are idle will the process automatically be spawned on one of the free nodes? Update: I found another question similar to this one too: http://stackoverflow.com/questions/662131/using-erlang-how-should-i-distribute-load-amongst-a-cluster ...