I have a binary that I’m debugging remotely, one way for me to send input to that file is throw when I do the above the input is been received by the binary but I can’t simulate a keypress, and that causes me to switch to that binary and press enter every time. here is an example when you run
Tag: file-descriptor
What is the size in bits of a file descriptor in an x64 system running Ubuntu 19.10?
What is the size in bits of a file descriptor such as standard input and standard output, is it a 32-bit integer? Answer If you are talking about the actual file descriptors returned by (and used for) Linux syscalls, then take a look at the manpage for open etc. as @JonathanLeffler suggests. For instance: The return value of open() is
What is the difference between closing [close(3)] and clearing [fd_clr(3)] a file descriptor?
I am having problems with an automated software testing, which is blaming use of freed resource when I use fd_clr(3) after using close(3) in a fd. Is there something wrong with doing this? Answer FD_CLR() only changes a local fd_set, which is a C data structure to store info about a list of file descriptors. close() is a system call
Is there a way to convert stdin/stdout fds into one fd?
I want to process SSL from stdin, and send SSL out stdout, but OpenSSL accepts only one file descriptor in the set fd call: Is there a way to combine the stdin and stdout file descriptors into one? I realize I can make a process that just reads from stdin/out and writes to the file descriptor, but I was trying
where is file descriptor stored in process memory?
When a function A is called from a point of execution, internally it is a JMP statement to the address pointing to function A. So the current point of execution is saved onto the stack, the PC loads the address of the called function A and continues. To get back to the point of execution after the function call, the
How can I redirect the output of a process file write?
I have a legacy app running that sends its output to log files. Rather than tail and manage those log files, I want to capture the output before it hits the disk and send it off elsewhere on the network (using syslog, or fluentd, or logstash, etc.). Is there any way I can capture the output without changing the application
Get storage device block size from name/descriptor of a file on that device
Suppose that I have file name or an open file decriptor for a text file that resides on a storage device (hard disk, usb flash, dvd, etc.). How can I get block size of that device from file name/descriptor in Linux programmatically in C. I know about ioctl system call, but it accepts an open descriptor for device special file,
Why does bash behave differently, when it is called as sh?
I have an ubuntu machine with default shell set to bash and both ways to the binary in $PATH: But when I try to call a script that uses the inline file descriptor (that only bash can handle, but not sh) both calls behave differently: The example-script I am referring to looks like that the real one is a little
What could cause “bad file descriptor” in multithreaded environment?
This question is somehow similar to Bad file descriptor but it’s not the same at all. I know this is “bad question” (“too localized” maybe), but I can’t figure it out and I’m now out of any ideas. Introduction I have a manager thread, that starts 75 other threads. Each of these threads do a lot of things, so I’ll
Check the open FD limit for a given process in Linux
I recently had a Linux process which “leaked” file descriptors: It opened them and didn’t properly close some of them. If I had monitored this, I could tell – in advance – that the process was reaching its limit. Is there a nice, Bash or Python way to check the FD usage ratio for a given process in a Ubuntu