Skip to main content

Questions tagged [stdin]

Standard input (stdin, file descriptor 0) is the input stream to a program.

0 votes
0 answers
44 views

getline() in C is not receiving input

I am trying to build a simple shell and im having a huge problem with receiving input from the stdin. For whatever reason when i call getline(), the program gets stuck there and it can't progress. ...
Percy's user avatar
  • 1
-1 votes
1 answer
73 views

C# code, SendKeys.Send gets "Access denied..." error occasionally [duplicate]

I have a C# code, in which I need to run a very old vendor binary to ASCII conversion program, here is relevant part of my code: C# code with SendKeys.Send "Access denied..." These codes are ...
gdu000's user avatar
  • 1
0 votes
1 answer
42 views

How to properly escape/quote the output so it's treated as an escaped input? [duplicate]

I've been trying to create a set of aliases or functions, that I can use in conjunction with file operating commands. The idea is to have 1, 2, 3 functions/aliases that will return latest, second-to-...
Mirek's user avatar
  • 397
0 votes
0 answers
35 views

Read a single char value to stdin without pressing enter on keybard in C in mac os [duplicate]

I am using mac os with xcode-select version 2406 I am trying to find a way to Read a char value to STDIN without pressing enter or return key on keyboard in C. I know on windows we have getch function ...
Pritam's user avatar
  • 7
1 vote
1 answer
62 views

Piping input into running Python script

Maybe this is the wrong approach, so feel free to redirect. I am trying to asynchronously pipe input into a python script. The idea is that I have a background Python script do some long initial setup ...
BrettOC's user avatar
  • 69
3 votes
1 answer
202 views

Reading and Writing more than 4096 bytes to and from STDIN [closed]

I'm trying to implement a here document like the one used in bash (in C), but I noticed that I can't give it a line that's longer than 4096 bytes, I looked it up and It was because of the max size of ...
Anass Abidar's user avatar
0 votes
0 answers
30 views

How to read piped input and use Console.ReadLine() in the same C# program?

I am trying to create a program that must accept piped input, and be able to request more input from the user afterwards. The problem is that after I read the piped input, I can no longer use Console....
Adrian's user avatar
  • 41
2 votes
0 answers
38 views

Writes to child subprocess.Popen.stdin don't work from within process group?

From within a Python script, I'm launching an executable in a subprocess (for anyone interested: it's the terraria server). # script.py server_process = subprocess.Popen("my_executable arg1 arg2&...
pipsqueaker117's user avatar
4 votes
2 answers
382 views

How can I read a single line user input with Bun.js?

Bun.js has a useful native API to read periodical user input: const prompt = "Type something: "; process.stdout.write(prompt); for await (const line of console) { console.log(`You typed: ${...
Mir-Ismaili's user avatar
1 vote
1 answer
96 views

Communicating Java and Python processes freeze after a while when using readline() but not input()

I have a Java program that needs to process a long series of input strings. To do this it goes through each string, passes it to a Process (a Python script), gets the result from the Process's ...
Zyxl's user avatar
  • 115
0 votes
1 answer
49 views

Redirecting stdout with execvp

This code basically a small part of the binary tree with nodes being processes, and it should traverse the tree inorder way passing num1 to left subtree etc. This one just creates a left child and ...
Özgür Çavuşoğlu's user avatar
0 votes
0 answers
64 views

tar extract zip archive from file or STDIN - discrepancy

Training to download and extract archive (zip archive, created by 7z) by curl --output - "https://host.com/archive.zip" | tar -f - -C %dest_dir% but archive extract is incomplete. Some ...
user2956477's user avatar
  • 1,318
0 votes
2 answers
156 views

Why is STDIN open by default for programs running in SystemD?

I have an if-statement at the top of a C main method, which checks if STDIN is open. If it is open, the program prints an error and exits. This is mainly for documentation reasons. I don't want ...
Seán Healy's user avatar
0 votes
0 answers
66 views

Is it possible to listen for console input from a C# Windows Application?

I have a .NET Core 3.0 Windows application that was interfacing with Chrome native-messaging stdin, however after .NET 8 migration, the application no longer has console stdin access. (Note: it was ...
codenamezero's user avatar
  • 2,950
0 votes
1 answer
49 views

Executing sed via execvp makes other pipes blocked

I am playing around with fork/pipe/dup/execvp concepts and came out with a little problem: I made a test main to execute sort and manually send some numbers via pipe bound to STDIN and it works as ...
StormByte's user avatar
  • 1,299

15 30 50 per page