For child processes, the wait() and waitpid() functions can be used to suspends execution of the current process until a child has exited. But this function can not be used for non-child processes.
Is there another function, which can wait for exit of any process ?
...
I have the pid of a running process in freebsd.
How do I obtain its current directory?
...
In Windows Vista, I am unable to drag/drop files onto my application's window because it is running as a high integrity level process. I need to run it as high, but I also need to be able to accept dropped files from low/medium integrity level processes like Windows Explorer. I believe it is UIPI that is blocking the drag/drop operation....
This has been asked before but I can't find a definitive answer, in code.
I open a process, ProcessA (with PID 1234). This process opens a child process, ProcessAB (PID 5678).
After I'm done I terminate ProcessA but I still have the lingering of ProcessAB.
How do I terminate the whole process tree? What I mean, how do I make sure that ...
I know how to launch a process with Admin privileges from a process using:
proc.StartInfo.UseShellExecute = true;
proc.StartInfo.Verb = "runas";
where proc is a System.Diagnostics.Process. But how does one do the opposite?
If the process you're in is already elevated, how do you launch the new process without admin privileges? Mor...
My team has been progressively adopting more and more lightweight methodologies, moving from Scrum to Lean/Kanban where there is less and less formal process. At some point we will be back to Cowboy Coding; indeed I fear we may already be on the border line.
Where can the line be drawn between a very lightweight Lean and Agile process a...
I'm interested in beginning to follow the PSP, even if it isn't the full process at first. And I might not even like it because of its rigid structure, as I learned in a previous question. I think that it will make me a better engineer, or at least let me find out more about my strengths and weaknesses so I can develop better habits. How...
I'm in a WindowsForm (c# .net 3.5) and on click of a button launch another external application (also .net 3.5) using Process.Start() and understand when it is available after i have launched it.
ProcessStartInfo psInfo = new ProcessStartInfo(@"MyApplication.exe");
psInfo.RedirectStandardOutput = true;
psInfo.RedirectStandardError =...
Hi,
I'm writing c/c++ code on Windows using Visual Studio. I want to know how to calculate the start time of my process effectively. Can I just use gettimeofday()? I've found the following code from google but I don't understand what it's doing really :
int gettimeofday(struct timeval *tv, struct timezone *tz)
{
FILETIME ft;
uns...
Hi all,
I'm in the process of providing a Web UI as an alternative to our current desktop UI for our C/S enterprise application.
When developing the client-side in our desktop version, UI developers could connect to any server so they only needed the client-side environment.
When developing a Web UI (Client-side JavaScript in the brow...
There are many new concepts to learn for a typical asp.net webform developer who is happy with their event driven, drag and drop world where the code behind is abstraction enough.
What is the best way to introduce the concept of mvc, unit testing, loose coupling, dependency injection and continuous integration whilst still maintaining e...
Hi, I'm having a strange problem with the following code, I'm writing a game launcher in VB.NET:
Dim gameProcess As Process = New Process()
gameProcess.StartInfo.UseShellExecute = False
gameProcess.StartInfo.FileName = TextBox2.Text
gameProcess.Start()
Debug.Print("Game started")
gameProcess.WaitForExit()
Debug.Print("Game stopped")
T...
The code below is outdated in python 3.0 by being replaced by subprocess.getstatusoutput().
import commands
(ret, out) = commands.getstatusoutput('some command')
print ret
print out
The real question is what's the multiplatform alternative to this command from Python because the above code does fail ugly under Windows because getstat...
We have written an application that sits in the tray controlling OpenVPN as an extension to a bigger application.
If you run openvpn.exe on command line, you can press F4 to close it. We need to do send the same keypress from C#, but you can only send string values to StandardInput.
We have been forced to kill OpenVpn to close it, and...
I'm a python newbie, so sorry for the simple question.
I'm trying to port a shell script to the much more readable python version. The original shell script starts several processes (utilities, monitors, etc.) in the background with "&". How can I achieve the same effect in python? I'd like these processes not to die when the python scr...
C# .NET 3.5
I have a console application that is being called by another application on the computer. This console app runs continuously, and listens for data on stdin from the "parent" process.
However, when the parent is stopped or killed, the console app that it started continues. Under normal circumstances, it sits and idles wa...
Hi,
I've got truncated parameters when passing very long file paths. I need to start a program and pass it everything via command params - sometimes it just truncates the command. It does it globally - so it's not only a problem for each parameter but for whole.
edit:
The problem is probably the limit on the command line length as monk...
Is the following allowed by the app store review process?
- (NSString *) platform
{
size_t size;
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
char *machine = malloc(size);
sysctlbyname("hw.machine", machine, &size, NULL, 0);
NSString *platform = [NSString stringWithCString:machine encoding: NSUTF8StringEncoding];
...
I'm looking to modernize our somewhat archaic process of receiving forms and entering them into our system. I've managed to convert our tracking system (where the forms are entered) to c# .net from classic ASP, so any solution should be based on something I could do using .net so I can integrate the two.
First, I'll lay out the current ...
Why the api Process.Start fails if it is called from a mapped drive. Steps to do create a project which calls Process.Start() on a simple exe. Map this folder as another drive letter access the same launching application via the mapped drive. When it is accessed via mapped drive it fails with an error message System can not find the path...