Skip to main content

Questions tagged [stdin]

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

stdin
912 questions with no upvoted or accepted answers
8 votes
1 answer
900 views

Piping local stdin to 'heroku run' - mustn't write to stdout? 4k stdout buffer?

I'm using thor to write command-line tasks (in a rails 3 app) and trying to pipe input to them over heroku, e.g. cat somefile.csv | heroku run thor sometask works great on my local machine cat ...
Tim Diggins's user avatar
  • 4,444
5 votes
1 answer
2k views

Python Warning: Input is not a terminal (fd=0)

I'm trying to create a terminal-based application in Python 3 that is executed within another program (clion). At first I was using prompt-toolkit, but simple input does the same. Every time I run the ...
Tom's user avatar
  • 125
5 votes
1 answer
981 views

non-blocking stdin using selectors

Playing around with non-blocking console input, using Python's selectors in combination with sys.stdin, there is something I do not understand: Suppose I want to exit a loop when a user presses Enter, ...
djvg's user avatar
  • 13.5k
5 votes
0 answers
202 views

How to read from stdin and write to stdout of WindowsProcess in Pharo/Squeak?

I found a way how to run a command in Windows 10 asynchronously and now I am trying to communicate with it via its stdin, stdout. I did it from Python - I ran python.exe process, sent it a string like ...
RandomB's user avatar
  • 3,645
5 votes
0 answers
413 views

What is wrong with /dev/stdin in an ubuntu docker container with -v used?

I have the following Dockerfile on Mac OS X. Then I built a docker image. $ cat Dockerfile FROM ubuntu $ docker build -t ubtsrv1 . $ docker image ls -a |grep ubtsrv1 ubtsrv1 latest ...
user1424739's user avatar
  • 13.1k
5 votes
1 answer
761 views

reading from stdin without blocking

I'm writing a python application that needs to explicitly parse all the keyboard input. Therefore I wrote a little loop that keeps reading from stdin. This works fine, however, the stdin.read(1) ...
Matthias Verstraete's user avatar
5 votes
0 answers
604 views

Can I detect whether a pipe's reader end is being read?

I have a pipe; the reader end is connected to a child process's STDIN, and the parent process has the writer end. Is there a way for the parent to detect whether or not its child is actually reading (...
bandie's user avatar
  • 173
5 votes
0 answers
449 views

How to prevent backspace with Nodejs readline (readable stdin)

I wrote a simple programe to manage command line user interface. To do so, I use Nodejs Readline API to read the process.stdin Stream. My problem is that if a user start typing, then press backspace,...
Simon Boudrias's user avatar
5 votes
1 answer
2k views

Separate stdin and stdout file in Eclipse

The launch configuration dialog is Am I right that if one needs the input from a file then output also goes into a file? Why it must be the same file? I do not see any option to have two separate ...
Val's user avatar
  • 10.9k
4 votes
0 answers
204 views

Read stdin from a NodeJS app deployed to Heroku?

I'm working on a NodeJS server application (NodeJS/Express/Socket.io). It also uses readline to provide a debug console that grabs commands from stdin. It works fine now, but I suddenly realized that ...
IceMetalPunk's user avatar
  • 5,546
4 votes
0 answers
225 views

isatty() is always returning 1 from eshell (emacs)

Why isatty never identifies that my program is using redirected stdin when using emacs? This is my code: int val = isatty(STDIN_FILENO); std::cout << val << std::endl; If I launch my ...
rph's user avatar
  • 911
4 votes
0 answers
494 views

after forking a process, stdin is null (when configured as pipe)

I'm writing a node js application that supposed to fork another nodejs application. I want to be able to fetch output from that forked nodejs application in real time. var maxLogintime = req.query['...
ufk's user avatar
  • 31.7k
4 votes
2 answers
2k views

Edit text which printed on stdout from stdin in c/c++

I have the following problem: How I can print text in my program, so that I can edit it? For example, program print to stdout: C:\\BlaBlaBla\file.txt And I can push backspace, that edit this text: ...
Konstantin Dedov's user avatar
4 votes
0 answers
892 views

Redirect process input and use shell execute

Is it possible to redirect just stdin but also allow stdout to be written to the console? I have a process which starts child processes and needs to read the output of those processes, but also ...
kschieck's user avatar
  • 1,437
4 votes
0 answers
755 views

Python - nonblocking write to subprocess.PIPE?

I' developing with python for a Raspberry Pi video application. I modified a c-program that plays full hd movies to take input from a FIFO. Like so: $ ./hello_video.bin test.h264 < .my_fifo $ ...
superno's user avatar
  • 51

15 30 50 per page
1
2 3 4 5
61