external-process

Is there a good way to stream the results from an external process into a Visual Studio output pane?

与世无争的帅哥 提交于 2020-01-13 11:26:13
问题 I have a custom output pane set up in a VsPackage similar to the following: ///-------------------------------------------------------------------------------- /// <summary>This property gets the custom output pane.</summary> ///-------------------------------------------------------------------------------- private Guid _customPaneGuid = Guid.Empty; private IVsOutputWindowPane _customPane = null; private IVsOutputWindowPane customPane { get { if (_customPane == null) { IVsOutputWindow

Communicating with C++ process from Java

半腔热情 提交于 2020-01-07 04:30:29
问题 First, I saw a few Q's about this issue in the site, but didn't see any answer that solve my problem. I have a program written in Java and it calls a cmd program written in C++. (this is an assumption since I don't have the actual source) I know the expected I/O of the C++ program, in the cmd it is two lines of output and then it waits for string input. I know that the first output line of the program is through error stream, and I receive it properly (this is expected), but I don't get the

How to run interactive python script using apache common exec?

感情迁移 提交于 2019-12-24 02:25:24
问题 I am trying to run a python script using Apache Commons exec.I need to pass some values to python script as python script in an interactive one.How to do it? My attempt was to set values in parent process's input stream.But it's not working for me. My code so far: String line = "python /home/abhijeet/test.py"; CommandLine cmdLine = CommandLine.parse(line); byte buf[]="4".getBytes(); InputStream io=new ByteArrayInputStream(buf); DefaultExecuteResultHandler resultHandler = new

Call popen with environment

这一生的挚爱 提交于 2019-12-23 20:10:53
问题 In my Lua program i have to catch output from an external program. This external program needs certain environment variables. So i do this: e = "" e = e .. "A=100;" e = e .. "B=Hi;" e = e .. "C=Test;" file = io.popen(e .. "/bin/aprogr") Obviously the argument for popen() may pass the limit (if any) if the environment is large. Is there any other way to pass the environment to the external program ? 回答1: There is an os.spawn function in the ExtensionProposal API. You can use it as follows:

Debugging when my code is started by external program with Process.Start()

只谈情不闲聊 提交于 2019-12-21 05:42:05
问题 Suppose I have a C# WinForms application and it is started by external program simply by using Process.Start(MyModule.exe) . I've tried to debug my code by using My project properties -> Debug -> Start Action -> Start external program (with setting proper Working directory of course). My enother attempt was Debug -> Attach to process UPDATE: Both my module and external program use one resource. So external program releases it, then calls Process.Start(), waits for my process to exit ans then

Haskell: How to timeout a function that runs an external command

邮差的信 提交于 2019-12-20 17:39:10
问题 I call an external program inside a function. Now i would like to timeout this function and not just the external program. But after the function times out, the external program is still running on my computer (i'm using debian) until it finishes its computation, after that its thread still remains in the process table as a subthread of my main program until the main program terminates. Here are two minimal examples which illustrates what i would like to do. The first uses unsafePerformIO,

Starting from Excel (VBA): Launch an external interactive program, and in there launch commands and read their output : is this possible?

坚强是说给别人听的谎言 提交于 2019-12-20 04:07:26
问题 Currently I'm doing the following for analysing a memory leak: I open both dumps, using Windbg. I launch heap_stat script, a Python-based script for making a summary of the objects, used in the heap. I copy the results of both heap_stat scripts, and paste them in an Excel sheet, where the results are analysed. I'd like to automate this, starting from the final Excel sheet, using VBA, as follows: Start two instances of an external program ( Windbg.exe ) and open both dumps with them. In those

ProcessBuilder vs Runtime.exec()

只谈情不闲聊 提交于 2019-12-18 04:48:10
问题 I'm trying to create a frontend app in Java to handle batch SVG conversions using Inkscape's command line feature. I'm taking and updating the code from https://sourceforge.net/projects/conversionsvg/. The way the original developer handled calling Inkscape by Runtime.getRuntime().exec(String) . The issue I'm running into is some inconsistencies between using methodA and methodB. I created a simple java test project to demonstrate the different actions being performed. CallerTest.java package

Nodejs Child Process: write to stdin from an already initialised process

雨燕双飞 提交于 2019-12-17 22:13:16
问题 I am trying to spawn an external process phantomjs using node's child_process and then send information to that process after it was initialized, is that possible? I have the following code: var spawn = require('child_process').spawn, child = spawn('phantomjs'); child.stdin.setEncoding = 'utf-8'; child.stdout.pipe(process.stdout); child.stdin.write("console.log('Hello from PhantomJS')"); But the only thing I got on the stdout is the initial prompt for phantomjs console. phantomjs> So it seems

Oracle Triggers Query

僤鯓⒐⒋嵵緔 提交于 2019-12-14 03:23:03
问题 Lets consider a Table STUD and a ROW-Level TRIGGER is implemented over INSERT query.. My scenario goes like this, whenever a row is inserted, a trigger is fired and it should access some script file which is placed in the hard disk, and ultimately should print the result. So, is this thing is possible? and if yes, then this thing should exist in dynamic form, i.e. if we change the content of script file, then the oracle should reflect those changes as well. I have tried doing this for java