Page 1 of 1

So schreiben Sie über seinen Dateideskriptor in ein interaktives Programm

Posted: 02 Feb 2025, 07:34
by Anonymous
Ich habe ein interaktives Programm, das bis zur Eingabe '1' ist.

Code: Select all

#include 
#include 

int main() {
std::string input;

while (true) {
std::cout > input;

if (input == "1") {
break;
}

std::cout 
echo 5 > /proc/pid/fd/0
echo hello > /proc/pid/fd/0
echo "hey\n" > /proc/pid/fd/0
echo 'hi\xA0' > /proc/pid/fd/0
< /code>
Selbst wenn ich das Programmterminal als aktive Shell bringe, tut es nichts. In das Terminal selbst tippt?
Danke