[lldb-dev] [Bug 24976] New: Data from SBProcess::PutSTDIN appears in SBProcess::GetSTDOUT
via lldb-dev
lldb-dev at lists.llvm.org
Mon Sep 28 11:30:51 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24976
Bug ID: 24976
Summary: Data from SBProcess::PutSTDIN appears in
SBProcess::GetSTDOUT
Product: lldb
Version: 3.6
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: lldb-dev at lists.llvm.org
Reporter: berykubik at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 14953
--> https://llvm.org/bugs/attachment.cgi?id=14953&action=edit
Python script with PutSTDIN and GetSTDOUT test
When I use the function SBProcess::PutSTDIN to put data into process' STDIN,
the entered data then appears when I get the process' STDOUT.
I attached C++ test program which reads a string (x) and then outputs "stdout:
<x>" and a python script that shows that the stdout contains both "stdout: <x>"
and x. The sleep is there to wait for the program to output data.
// C++ program:
#include <iostream>
using namespace std;
int main(int argc, char** argv)
{
string a;
cin >> a;
cout << "stdout: " << a << endl;
return 0;
}
After I run this program with input "test", it should output "stdout: test".
But when I put "test" to the process via PutSTDIN, the GetSTDOUT contains both
"test" and "stdout: test".
Am I doing something wrong?
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20150928/043772d8/attachment.html>
More information about the lldb-dev
mailing list