Mikhail Glushenkov
2009-Jul-17 02:48 UTC
[LLVMdev] [PATCH 2/2] Make Program::ExecuteNoWait return a process ID.
Hi Daniel, Daniel Dunbar <daniel <at> zuster.org> writes:> > Ultimately I think a better API would be to provide a generic class > which represents an executed operating system process, and includes > operations to wait for its completion, redirect its IO, communicate > with it, etc. This would be a big improvement over the current > monolithic function.I agree, but my application needs access to the process ID. So if I'll start implementing such class, it'll have a getPID() method or similar :)
Daniel Dunbar
2009-Jul-17 16:44 UTC
[LLVMdev] [PATCH 2/2] Make Program::ExecuteNoWait return a process ID.
On Thu, Jul 16, 2009 at 7:48 PM, Mikhail Glushenkov<foldr at codedgers.com> wrote:> Hi Daniel, > > Daniel Dunbar <daniel <at> zuster.org> writes: > >> >> Ultimately I think a better API would be to provide a generic class >> which represents an executed operating system process, and includes >> operations to wait for its completion, redirect its IO, communicate >> with it, etc. This would be a big improvement over the current >> monolithic function. > > I agree, but my application needs access to the process ID. So if > I'll start implementing such class, it'll have a getPID() > method or similar :)Do you have to have it? You can't use the pid (assigned from as a number) without going through another llvm::sys interface, so why should it be exposed? I don't personally care too much -- and favor pragmatism -- but it is counter to the documented design of the system library: http://llvm.org/docs/SystemLibrary.html - Daniel> _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Mikhail Glushenkov
2009-Jul-17 21:01 UTC
[LLVMdev] [PATCH 2/2] Make Program::ExecuteNoWait return a process ID.
Daniel Dunbar <daniel <at> zuster.org> writes:> > Do you have to have it? You can't use the pid (assigned from as a > number) without going through another llvm::sys interface, so why > should it be exposed?I need to invoke an external program (gcore), which takes PID as argument. On Windows I do something platform-specific, but that also requires access to PID. I'm currently rewriting this patch to also remove the duplication between ExecuteAndWait and ExecuteNoWait.> I don't personally care too much -- and favor pragmatism -- but it is > counter to the documented design of the system library: > http://llvm.org/docs/SystemLibrary.htmlA one-line GetPid() method is not so dangerous IMO.
Seemingly Similar Threads
- [LLVMdev] [PATCH 2/2] Make Program::ExecuteNoWait return a process ID.
- [LLVMdev] [PATCH 2/2] Make Program::ExecuteNoWait return a process ID.
- [LLVMdev] [PATCH 2/2] Make Program::ExecuteNoWait return a process ID.
- [LLVMdev] [PATCH 1/2] Trailing whitespace.
- [LLVMdev] Criticism of garbage collection support in LLVM