process

security - Process.execute() on android

Given i have compiled linux exe file in my resources/raw directory. Can i execute it using Process.execute("./resources/raw/filename") or i have to have special permissions (like ROOT or smth) ? ...

C# System.Diagnostics.Process: how to exit a process if it takes more than, say, 10 seconds?

I tried the following code: p = StartProcess("some_process.exe"); DateTime startTime = DateTime.Now; p.Start(); while (!p.HasExited) { executeTime = (DateTime.Now - startTime).Milliseconds; if (executeTime > 10000) // 10 seconds { Console.Write("Test \"" + inputTest + "\" failed: takes more than 10 seconds"); ...

c# run 2 (or more) process in diffirent timing?

Hello, how to run different tasks in different process? in my case I will have 2 tasks one runs every 1 mint the other will run every 10 mints the point is each one is totally independent from the other how to make them work within the same program? cheers ...

Get Java Runtime Process running in background

Hi there I'm writing a java application where I require to run a process in background throughout the lifetime of the running application. Here's what I have: Runtime.getRuntime().exec("..(this works ok).."); Process p = Runtime.getRuntime().exec("..(this works ok).."); InputStream is = p.getInputStream(); InputStreamReader isr = new...

accessing files created by java runtime process

I'm running a windows program from within java: String command = "cmd /C start "+fileName+".bat"; Runtime rt = Runtime.getRuntime(); Process pr = rt.exec(command, null, new File(currWD)); int exitValue = pr.waitFor(); The program completes successfully (exitValue == 0) and creates a file "fileName" in the worki...

Failed to start service Error 1920

Hi, I encountered an issue on running a service. Error description is: Error 1920.Service ABCD Service (ABC_ABCDEF) failed to start. Verify that you have sufficient privileges to start system services My configuration was run the service using "Local System account". If I switched this to "NT AUTHORITY\NetworkService" then the service...

Python: Setting sys.stdout to a wx.TextCtrl with Process/Thread leads to crashes

I've got a wx-gui that's piping stdout/stderr to two different text-controls. In the program I'm creating a process to run some data-crunching code, and I have a thread that joins the process and changes the global state when the process is finished. import multiprocessing as mp from threading import Thread t = Thread(target=self.joi...

spawning console sub process with different output

Hi, I have a console application written in c# which starts a new process. This new process is also a console application. The problem is that whole child process output goes to parent console window and i don't want it to. It doesn't matter if it creates a new console window or not, I don't need it. Edit: Process p = new Process(); p...

ShellEx: Starting Excel minimized or hidden

Using the following code I can run Excel from within C#: System.Diagnostics.Process p = new System.Diagnostics.Process(); p.StartInfo.FileName = "cmd.exe"; p.Start(); Can I make Excel start hidden or minimized using any command line parameters? (Edit: Tried p.StartInfo.WindowStyle and it had no effect.) I need to start Excel without...

Windows: Child Process with Redirected Input and Output

Hello, I'm trying to create a Child Process with Redirected Input and Output (as described here - http://msdn.microsoft.com/en-us/library/ms682499(VS.85).aspx). For the people that don't want to bother reading the source code on that page, the author is using anonymous pipes to redirect the child's input and output. The parent proc...

Changing a process name in runtime.

For A.EXE PE file, if the program runs as test mode, I would like to change the process name to "A_TEST.exe". And if the program runs as safe mode, I want to change to "A_SAFE.exe" The file name must be same(A.EXE). Is it possible? ...

Python subprocess how to determine if child process hangs?

Hello, How do I know is there my child process got hang while operating? ...

Why doesn't fork() create multiple processes, or does it?

We had a school exercise today to create multiple processes. Our problem was not the code itself neither the understanding of fork(). The problem me and my mate had were why it didn't create 4 processes of our code as shown below: #include <stdlib.h> #include <stdio.h> #include <sys/types.h> //kod int child1(); int child2(); int ma...

Modeling business procces, which techniques are there?

I'm not sure if this is the right place to ask this question but here goes. I'm currently looking into some different techniques to model a business proces. I need to find a suitable option for my company which develops all kind of web applications. What i have found so far: UML, specificly the activity diagrams Flow charts Windows ...

"Max open files" for working process

Hello all. Is it possible to increase "Max open files" parameter for working process ? I mean this parameter: cat /proc/<pid>/limits | grep files Thanks for your advices ...

Add-in makes Excel crash when starting minimized

I start Excel from within my C# WinForms application using Process.Start(...) (this has a reason). I want to start it in background, without distracting the user, so I try to start it minimized or hidden. In both cases, I experience a very weird behavior: After some seconds, Excel restores the window (even makes it visible if it's hidde...

Recording command line input and output on linux with C

Basically I want to do a program almost like a keylogger. The thing is that I as network admin sometimes I don't remember what I did to a machine on certain case, or same times I make howto's and tutorials for linux. I want to record what have i done. So basically the idea of this program is: you type the name of the program, (I call it...

Process management in .NET

So i have a helper process written in C++ and I open it, feed it arguments, and it feeds my program back information through the standardoutput stream. PS. I don't have the source for the helper process exe. If my application were to be terminated from the task manager, or for some reason crash, how could I ensure that my helper exe is...

Find queries from Process ID (MySQL 5.1.x)

I have a sleeping MySQL process and it crashed my MySQL. I cannot find it through SLOW LOG. I know its process ID. How can I retrieve query behind this process ID? Thank you, ...

Parent process doesn't complete after child is terminated in C

I'm having trouble with a process forking exercise. I want to fork a child process and have it hang after announcing it has been forked, and wait for a signal to terminate, after which the parent process must announce it is terminating and then exit. I can get the processes forked and have the parent wait for the hanging child to be k...