processes

what are queue access concurrency solutions?

I am trying to find out the difficulty of implementing a queue system. I know how to implement a basic queue, so i'll explain a little about what i'm after with some background: I will be implementing a queue where messages will be placed, this will come from several users, the messages will be scheduled to be posted at user defined tim...

Problem executing excel from C# Application

I want to open a file from a Class in C# using a Process, located in a directoy I asked the user. ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.FileName = "EXCEL.EXE"; startInfo.Arguments = Here goes the directory I asked Process.Start(startInfo); The problem, is that when the location of the file indicated by the us...

Real-time intercepting of stdout from another process in Python

I'd like to run a system process, intercept the output, and modify it real-time, line by line, in a Python script. My best attempt, which waits for the process to complete before printing, is: #!/usr/bin/env python import subprocess cmd = "waitsome.py" proc = subprocess.Popen(cmd, shell=True, bufsize=256, stdout=subprocess.PIPE) for l...

How do i start Process iteratively in VB.NET? or change argument dynamically

i have used following code to repeat a process creation/close iteratively dim vProcessInfo as new ProcessInfo For i= 1 to 100 dim p as new Process vProcessInfo.Arguments = "some"+i.toString() p.StartInfo = vProcessInfo p.Start() p.WaitForExit() p.Close() Next i the above code worked for me successfully. but it takes too much time for ...

Utility to view threads in a Java process

I've got a java application on a windows machine which pins the CPU from time to time. Would like to run a utility to get an idea of how many threads etc that application is creating. Is there such a utility? ...

How do I check if a process is alive in Python on Linux?

I have a process id in Python. I know I can kill it with os.kill(), but how do I check if it is alive ? Is there a built-in function or do I have to go to the shell? ...

Timers in Services

Hi all, we have recently added a new feature to our software - preview generation for documents that are uploaded and stored on the server. We did this the following way: The user uploads a document; Once the user opens the document information card, the preview for the recently uploaded document is issued (the info regarding the prev...

How to terminate all [grand]child processes using C# on WXP (and newer MSWindows)

Question: How can I determine all processes in the child's Process Tree to kill them? I have an application, written in C# that will: Get a set of data from the server, Spawn a 3rd party utility to process the data, then Return the results to the server. This is working fine. But since a run consumes a lot of CPU and may take as lo...

How To Enumerate Processes From VB 6 on Win 2003?

I've got some old VB6 code part of which enumerates the running processes on the machine via a call to CreateToolhelpSnapshot. I'm attempting to run this code on Win 2003 R2 and I have reason to be a little suspicious of the list of processes that it's returning. I found this article which leads me to think I might need to use a differ...

Will a task be completed faster if it is the active window?

Hey everyone, I have heard a myth that a job will finish faster if it is kept as the active window, and not in the background or minimized. Is there any truth to this? Does the CPU put precedence to tasks where this happens? Thanks, ...

How to troubleshoot PHP processes

I've built a script in PHP for a small shop that does a few things. Initiate a DB connection, and query the DB a couple times. Read/Write Sessions Make a request to PayPal PDT with fsockopen() parse the results save the order to db After some testing, the server stopped loading. Support let me know that there were 20 PHP processes runn...

process.start() hangs when called from VS Addin

I'm playing about with an addin to Visual Studio 2005 that calls an external process. When I run the code outside of the addin - i.e. in a standalone project it works fine. However when I call it as part of a addin the Process.Start() call is made but then nothing happens, the subsequent lines of code are never reached. I have tried ru...

How to measure continuity of process?

Recently i faced with such problem - what is the continuity and how it can be measured? Usually, this term is used simultaneously with Accessibility. For example - our server was accessible for 22 hours this day, then accessibility equals 22/24 = 91.6%. But how to measure continuity? ...

process connecting to another process to gather profile information?

Are there any built-in mechanisms in .Net that would allow us to write two programs, A and B. A is a process with special hooks onto which B attaches itself. This would allow B to gather whatever information those hooks provided. In particular, it would be nice to be able to dial into another of our process and gather suchs metrics li...

Execute a process and return its standard output in VC++

What's the easiest way to execute a process, wait for it to finish, and then return its standard output as a string? Kinda like backtics in Perl. Not looking for a cross platform thing. I just need the quickest solution for VC++. Any ideas? ...

How to check if some process is running in task manager with python

I have one function in python which should start running when some process (eg. proc.exe) showed up in tasks manager. How can I monitor processes running in tasks manager with python? ...

Problem with Process.Start() method.

I have a child.exe which takes command line arguments. I need to start that child.exe from another parent.exe application and need to pass different command line arguments to that child.exe. I tried with the following code. Process process = new Process(); process.StartInfo.FileName = @"R:\bin\child.exe"; process.StartIn...

Counting the total of same running processes in C++

Hello there, I'm looking for a way to detect the # of running processes that has same process name. In example, I ran notepad three times. notepad.exe notepad.exe notepad.exe So it will return 3. I currently have these code to detect a running process, but not counting its running process quantity. #include <iostream> #include <win...

What is the SIGKILL permissions policy?

What is the SIGKILL permissions policy? I assume I can't kill something of the kernel, or of some other user, while running on non-root, but I haven't found any document about this. ...

N processes and M types of processes - enter and exit cs

i was asked to write: enter function and exit function for the following case: there are N processes and M types of processes (N>>M) tere is a critical section in which all processes with the same type can enter. for example: if type A is in cs, type B cannot enter cs. but all processes with type A can enter. i can use only mutex and "...