Category "file-descriptor"

getchar() keeps returning EOF even after subsequent calls but read() system calls seem to "clear" the stdin. What are the reasons behind this?

char buff[1]; int main() { int c; c = getchar(); printf("%d\n", c); //output -1 c = getchar(); printf("%d\n", c); // output -1 int re

Can I delete a UDS Socket file using "rm" command

If a process was abruptly stopped by using "kill" command and due to that it wouldn't delete the UDS sockets that were created by that process. In such cases, c

Unable to clone Git repo: Invalid file descriptor

I'm trying to clone a Git repository. At work we're making use of a proxy with authentication. The commands I execute to set up the proxy settings: git config -

Duplicate IO with file descriptors

I would like to route a file descriptor to multiple places at the same time. For instance I would like every command in my script to print stdout to /dev/ps/9

Linux script executing from C++ code with execv fails

I've a very basic Linux script (/home/scripts/script.sh): #!/bin/bash echo 'a' | /bin/netcat -vv 10.10.10.1 3333 echo "done" > /tmp/result When I try to r