process

How do I set the working directory of the parent process?

Programming environment assumed: Linux, GCC As the title reveals it, we are writing a Unix-style shell utility U that is supposed to be invoked (in most cases) from bash. How exactly could U change the working directory of bash (or parent in general)? P.S. the shell utility chdir succeeds in doing exactly the same, thus there must be ...

Team Foundation Build under Mono

Hello, I'm currently looking at which build server we should run up for a multi-platform development (targeting .NET on Windows and Mono on Windows/SUSE). We use TFS (2010 RC) for all other aspects of the ALM, and we need to get continuous integration in place. I'm drawn to TFS because of its integration with the rest of the ALM, and ...

script process in timeout

I'm running a PHP script... and with an indefinite range the script stops working but the process continues running poll([{fd=5, events=POLLIN|POLLERR|POLLHUP}], 1, 3000) = 0 (Timeout) poll([{fd=5, events=POLLIN|POLLPRI|POLLERR|POLLHUP}], 1, 0) = 0 (Timeout) poll([{fd=5, events=POLLIN|POLLERR|POLLHUP}], 1, 3000) = 0 (Timeout) poll([{fd=...

Will while(true) in a process of real time priority hang OS?

Will an application with an infinite loop hang the operating system if the application process has real time priority? Should I expect the same behavior on Linux, Windows and Mac OS? ...

executing a process on a remote machine with sysinternals psexec

Hi there I'm working on an Asp.net\c# application I'm trying to execute a process in a remote machine using system.Diagnostics.process and sysinternals psexec here's my code example ProcessStartInfo startInfo = new ProcessStartInfo("psexec"); startInfo.Arguments = string.Format(CultureInfo.CurrentCulture, @"\\machineNAme c:\someDir...

C sprintf causing a segmentation fault.

Hello, I am trying to pass in arguments to the a parent file that is supposed to create a child process for each pair of arguments. The child processes will add up each pair and return their sum to the parent process. If there is an odd number of arguments passed in, I add a 0 to the end of the argv array to make it even. This keeps hap...

WINSDK: Determining whether an arbitrary pid identifies a running process on Windows

Attempting to implement a poor man's test of whether a process is still running or not (essentially an equivalent of the trivial kill(pid, 0).) Hoped to be able to simply call OpenProcess with some minimal desired access then test for either GetLastError() == ERROR_INVALID_PARAMETER or GetExitCodeProcess(...) != STILL_ACTIVE. Nice try....

Writing data to InputStream of grep program invoked in java

I'm trying to process data obtained from a run of diff to an instance of GNU grep in a java program. I've managed to get the output of diff using the Process object's outputStream, but I'm currently having programs sending this data to the standard input of grep (through another Process object created in Java). Running Grep with the inpu...

Why can't I use killall with the new name given to a child process with execvp() on Linux?

Hi, Assume I have an executable called 'exe' which spawns a child process. This child process needs to become a daemon and we need to change its name. Next I want to use killall to send a signal to this process using the new name, but I need to use the old name. The order of events is as follows: start 'exec' fork -> exit if parent d...

Issue logging stdout from curl with .net (C#)

Hi, I'm trying to run curl as a process and capture the output from the command window. I have tried both running curl directly as a process and also running cmd and then writing commands to the command prompt. However, the output from curl itself is not being returned (verbose mode is on), although I sometimes get what looks like an ...

Do pthread Mutexs work across threads if in shared memory?

I found this: http://stackoverflow.com/questions/2284730/fast-interprocess-synchronization-method I used to believe that a pThread mutex can only be shared between two thraeds in the same address space. The question / answers there seems to imply: If I have two separate proceses A & B. They ahve a shared memory region M. I can put a p...

java process and inputstream

Hi! I develop an eclipse plugin and I use process running within this. I create an process and after I read its inputsream, but while the process and the inputstream are running, my eclipse platform can't answer for anything. So I would like to do a solution, when eclipse doesn't freeze. I think I should do this with java threads. If so...

How to get window title of a program reduced in taskar ?

With C#, i use this code to list main window processes titles Process[] ProcessArray = Process.GetProcesses(); try { foreach (Process proc in ProcessArray) { Console.WriteLine(proc.MainWindowTitle); } } catch (Exception ex) { Console.WriteLine(ex.Message); } but this doesn't work to see mainwindowtitle of processes...

Detect when other process is shutdown OSX

I need a way to determine from a Cocoa app if a given process name is running. One idea I had was to use NSTask and poll using ps aux | grep processName. Is there a better solution? ...

Java Process "The pipe has been ended" problem

I am using Java Process API to write a class that receives binary input from the network (say via TCP port A), processes it and writes binary output to the network (say via TCP port B). I am using Windows XP. The code looks like this. There are two functions called run() and receive(): run is called once at the start, while receive is ca...

JAMES Mailet development process

I'm starting a project that involves writing mailets for Apache James. As far as I can tell, the only way to test a change in my code (on Windows) is through the following steps: Compile the mailet code Build a jar file containing the mailet Copy the jar file into the apps/james/SAR-INF/lib directory Start JAMES from run.bat Run test S...

ASP.NET MVC and Strings doesn't give me compile time errors.

I'm a big fan of compilation errors. I find the a lot easier to fix than runtime bugs. I currently using the ASP.NET MVC framework and I find it has a lot of room for typos that the compiler won't catch. For Example if I want to return the view Data from the Index action. public ActionResult Index() { return View("Data"); } can...

Multi dimensonal output GPML?

I would use a multi dimensional gaussian modell for regression. Rasmussen has a book with an algoritm, but it is only for one dimension output. Any idea to modify it? ...

Starting an application in OS X with low priority

Hello. I would like to setup my Eve Online application to start with lowest priority every time I open it. Is it possible, and how? I am using Mac OS X 10.6.2... Thanks for any help! ...

PHP Launch script after background process completes?

I am converting a PDF with PDF2SWF and Indexing with XPDF.. with exec.. only this requires the execution time to be really high. Is it possible to run it as background process and then launch a script when it is done converting? ...