dup2
multi pipes in C hang
I am trying to implement program that will run multiple chains of shell commands: --> cmd3 --> cmd4 -->[详细]
2023-03-29 11:05 分类:问答Multiple pipes in C
I want to implement multi pipes in c so I can do something like this, where ||| means duplicate the stdin to N pipe commands):[详细]
2023-03-22 16:28 分类:问答data disappearing in a (TCP) socket
I have got this mostly-prototypical TCP socket server that accepts a connection and then runs a user-specified program to talk to the other side. The mysterious thing is that write() is called, and re[详细]
2023-03-12 20:37 分类:问答Are STDIN_FILENO and STDOUT_FILENO read only in c?
fd = open(\"/dev/null\", O_RDWR); if (fd == -1) { ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, \"open(\\\"/dev/null\\\") failed\");[详细]
2023-03-10 02:25 分类:问答Writing to file descriptor
In the following snippet i am redirecting the output of the ls command to input of wc -l which works perfectly .Now i also want to redirect the output of ls command to a file named \"beejoutput.txt\"[详细]
2023-03-05 14:23 分类:问答dup2 to redirect stdout and stderr to another file descriptor
i havea call like this. int fd[2]; pipe(fd) 开发者_StackOverflow and then dup2(fd[WRITE],STDOUT_FILENO)[详细]
2023-02-20 05:42 分类:问答trouble pipeline three commands "dmesg|sort|more" c++
I have successfully piped the output of one command into the input of another and then show the output of the second command to the screen.[详细]
2023-01-20 02:05 分类:问答Can popen() make bidirectional pipes like pipe() + fork()?
I\'m implementing piping on a simulated file system in C++ (with mostly C).It needs to run commands in the host shell but perform the piping itself on the simulated file system.[详细]
2023-01-19 15:53 分类:问答Using dup2 for piping
How do I use dup2 to perform the following command? ls 开发者_Python百科-al | grep alpha | more A Little example with the first two commands. You need to create a pipe with the pipe() function that w[详细]
2023-01-14 05:29 分类:问答C: Got stuck with dup2() :-(
I have prepared a program which emulates shell (cmd) interface using pipes. There are two versions of the program:[详细]
2023-01-03 21:57 分类:问答