Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.

Questions tagged [stdio]

Filter by
Sorted by
Tagged with
0 votes
1 answer
356 views

I am trying to run Plarium Play with wine, but have encountered an odd issue. When trying to launch it from a regular desktop entry, I get this JavaScript error: This does not happen if I launch from ...
TheLabCat's user avatar
  • 133
-1 votes
1 answer
154 views

Recently I've discovered how /dev/kvm doesn't seem to implement functionality for read() or write(), and any attempt to invoke them always results in Error 22 (Invalid argument). I'm trying to avoid ...
Tcll's user avatar
  • 201
1 vote
1 answer
579 views

When I have a long running Bash pipeline of commands, and I often can't see any signs of life due to I/O buffering. I found online that buffering can be disabled using stdbuf. An example shown here ...
user2153235's user avatar
0 votes
1 answer
201 views

#include <stdio.h> #include <stdlib.h> #define MAXLEN 1024 void reverse(FILE *, FILE *); int main(int argc, char ** argv) { ... reverse(fptr, stdout); ... return 0; } void ...
arka's user avatar
  • 253
1 vote
1 answer
298 views

#include <stdio.h> #include <unistd.h> int main(void) { printf("If I had more time, \n"); write(STDOUT_FILENO, "I would have written you a shorter letter.\n", 43); ...
arka's user avatar
  • 253
0 votes
0 answers
117 views

I'm using EDK2 to write a System Management Mode (SMM) driver. I think it uses "Pure C", given the fact that I'm not able to use standard C library like stdio. Even if I #include <stdio.h&...
Allan Almeida's user avatar
0 votes
0 answers
16 views

man cat shows the following example: cat f - g Output f's contents, then standard input, then g's contents. How do you escape the standard input and proceed to output the 2nd ...
MattP's user avatar
  • 111
1 vote
1 answer
540 views

I want every pipe to be unbuffered, so I don't have to type stdbuf -oL for every piped command. When concocting commands with multiple pipes, it would be nice if there was a environment variable or ...
Aaron Frantisak's user avatar
0 votes
2 answers
323 views

I am seeking to automate ssh password based logins (and a series of actions after logging in). I am aware that the ssh password prompt bypasses STDIN. To that end I put together a quick expect script. ...
symcbean's user avatar
  • 6,359
3 votes
1 answer
794 views

For a bash script project, I write human-readable log info to stdout/stderr. Additionally, I want to write formatted metrics to a third stream that will be discarded by default but can be redirected ...
Mazzen's user avatar
  • 33
1 vote
1 answer
249 views

The fread(3) and fwrite(3) have an extra parameter for a variable number of items. So a typical write often has a hardcoded count when all it has is a char buffer to begin with e.g. fwrite(data, len, ...
natevw's user avatar
  • 194
1 vote
2 answers
308 views

Say I have a simple Node.js server like: const http = require('http'); const server = http.createServer((req,res) => res.end('foobar')) server.listen(3000, () => { console.log(JSON....
user avatar
3 votes
2 answers
1k views

I have this: nohup_ntrs(){ nohup_file="$HOME/teros/nohup/stdio.log" mkdir -p "$(dirname "$nohup_file")"; echo " ------------- BEGIN $(date) -------------- " >> "$nohup_file" nohup "$@" &...
Alexander Mills's user avatar
0 votes
0 answers
38 views

So if I am in my terminal and run: $ my_proc | grep foo in my_prof I know it's part of a pipeline because stdout is not attached to the terminal but to grep. On the other hand, if I just run this: $ ...
user avatar
1 vote
1 answer
101 views

I have written a set of programs with the intent of using a radio transmitter-receiver (NRF24L01) to connect two devices as if they were connected via a serial interface. Currently, i am able to ...
fisherdog1's user avatar
4 votes
1 answer
91 views

If I have: node foo.js | node bar.js is there a way to determine if there is a queue in between them that's building up? in other words if the producer is outpacing the consumer w.r.t. stdio?
Alexander Mills's user avatar
8 votes
3 answers
12k views

This is about the behaviour of the backspace (\b) character.  I have the following C program: int main() { printf("Hello\b\b"); sleep(5); printf("h\n"); return 0; } The output on my ...
forumulator's user avatar
9 votes
3 answers
7k views

I have a simple pipeline: node foo.js | node bar.js bar.js will read from stdin to get data from foo.js. But what I want to do is ensure that bar.js gets one of the last messages from foo.js before ...
Alexander Mills's user avatar