fdopen Questions

2

Solved

in C, I can write to file descriptor 3 like this: $ cat write.c #include <unistd.h> int main(void) { write(3, "written in fd 3\n", 16); } Then I can call the program and redirect fd 3 t...
Hoopoe asked 1/5, 2020 at 2:12

1

Solved

I am using fusepy and I need to convert a file descriptor back in to a file object so that I can obtain the original file path From the fusepy examples, when a file is created, a file descriptor i...
Antisepsis asked 3/10, 2019 at 11:38

1

Solved

Is it possible to write a program that's able to take another application's open file descriptors and just pass along their contents without any conversion? Let's say App A has an open FD to some ...
Hay asked 7/5, 2018 at 16:45

4

Solved

I'm currently writing a server application on Linux x86_64 using <sys/socket.h>. After accepting a connection via accept(), I use fdopen() to wrap the retrieved socket into a FILE* stream. W...
Umlaut asked 21/4, 2012 at 2:25

6

Solved

tempfile.mkstemp() returns: a tuple containing an OS-level handle to an open file (as would be returned by os.open()) and the absolute pathname of that file, in that order. How do I convert th...
Prerequisite asked 3/10, 2008 at 19:41

3

Solved

I would like to have a FILE* type to use fprintf. I need to use fdopen to get a FILE* instead of open that returns an int. But can we do the same with fdopen and open? (I never used fdopen) I woul...
Douglas asked 27/2, 2013 at 11:13

2

I want to create a file descriptor in C whose value i will specify in code. I have a integer variable which specifies the value of file descriptor to be created. For example i may need a file descr...
Spendthrift asked 9/5, 2011 at 10:55
1

© 2022 - 2024 — McMap. All rights reserved.