|
Is there a way for a child process in Python to detect if the parent process has died?
Started by Evan Fosmark on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
If your Python process is running under....
Unless you have a way.
You might get away with reading your parent process' ID very early in your process immediately, and even before your process got to execute its first instruction.
|
|
I'm using CreateProcess to exec Notepad.exe, but the process parent of notepad is my own AP. When I closed my own AP, the process parent of notepad became to explorer. How would I do to put explorer as process parent for this new opened process?
Started by Yigang Wu on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
You can combine, some in formation about the launching....
Then here is an article that talks about launching a non-child process.
However, from what process.
There is no built in way to set explorer.exe as the parent process right away.
|
|
How can I get the file name of process from a process handle? I'm using Win32 C++ (Visual C++ Express Edition).
Thanks.
Answer Snippets (Read the full thread at stackoverflow):
process handle (WinXP, Server 2k3 or later), as does QueryFullProcessImageName for Vista and 2k8.
|
Ask your Facebook Friends
|
There is any way to run another process with ordinary rights from a process running as administrator? From a process with elevated rights I want to start a process with ordinary rights like it were started from explorer. I tried impersonation but I didn...
Started by Alex on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Interfaces and without having to mess around with process tokens or code/DLL injection..
|
|
I have a bunch of mini-server processes running. They're in the same process group as a FastCGI server I need to stop. The FastCGI server will kill everything in its process group, but I need those mini-servers to keep running.
Can I change the process...
Started by Schwern on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Also, keep in mind that you can't change the process group id to one from another session, and that you have to do the call to change the process group either from within the process that you want....
And process group leaders.
|
|
Hi, can someone tell me how i can capture a running process in c# using the process class if i already know the handle?
Id rather not have not have to enumerate the getrunning processes method either. pInvoke is ok if possible.
Started by Grant on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Apparently, it doesn't like you requesting the handle of process ID 0 , hence the extra condition , but process IDs are represented by....
Process .
In plain C#, it looks like you have to loop through them all:
// IntPtr myHandle = .. .
|
|
Writing my own toy shell, and have run into a bump trying to implement job control.
I am setting the process group of the child, both in the child and the parent with setpgid. My wait call is:
pid = waitpid(-pid, &status, 0)
However, waitpid returns -...
Started by Kyle Brandt on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The child inherits the parent's pid as group by default blocks until the next child terminates and then returns the process ID and status of that child..
You don't have to set the process group ID.
|
|
I have a process that spawns a helper process. Sometimes I need to debug start-up failures in the second process.
On Windows, I would use Image File Execution Options , or ntsd -o . However, I have no idea how to do this with gdb on OS X.
Started by jeffamaphone on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
There is a setting called follow-fork-mode that controls which....
Instead, run your parent process from within gdb or attach to the running process before it forks the helper off.
I don't think that you can have gdb launch in the same manner .
|
|
Launching a screen session with a background process using -d -m causes the screen session to terminate when the process exits.
Is there any way to get the screen session to stick around after the process exits, but still launch it without any user interaction...
Started by fields on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at serverfault):
If your process can source whichever of /etc/profile the process is complete, you will see whatever output it creates as it occurs and have a shell prompt the process to detach itself from....
It running after the script is finished.
|
|
Hi I am trying to run a process in c# using the Process class.
Process p1 = new process(); p1.startinfo.filename = "xyz.exe"; p1.startinfo.arguments = //i am building it based on user's input. p1.start();
So based on user input i am building the argument...
Started by FatDaemon on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Process test = new Process(); test.StartInfo.FileName = "cmd"; test.StartInfo.Arguments = @"/C any normal process....
The much easier way would be to do just use cmd as your process.
On the Process/ProcessStartInfo classes...
|