file-descriptor Questions

5

I am getting this error when I configured a job to do stop and start of tomcat server: Process leaked file descriptors. See http://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build...
Invocate asked 10/6, 2013 at 12:58

2

Given the fact that public file paths will generally not be available in Android Q with scoped storage, I am attempting to figure out how to make my FFmpeg audio decoder work with file descriptors,...
Syncopation asked 10/8, 2019 at 20:50

6

Solved

What I want to do redirect stdout and stderr to one or more files from inside c++ Why I need it I am using an external, precompiled third-party library that produces a ridiculous amount of output, ...
Bailey asked 6/8, 2013 at 17:0

2

Solved

I am trying to understand flags and modes of file descriptors. The man page for fcntl - manipulate file descriptor int fcntl(int fd, int cmd); states: File descriptor flags The followin...
Reentry asked 20/5, 2020 at 9:44

2

Solved

I mean to use fdopen FILE *fdopen(int fd, const char *mode); In man pages, it is stated that "The mode of the stream (one of the values "r", "r+", "w", "w+", "a", "a+") must be compatible with t...
Stephniestepladder asked 20/5, 2020 at 9:15

1

Solved

I am dealing with file status flags. Among test I performed, I found #include <stdio.h> #include "fcntl.h" int main() { const int flag = O_RDONLY; printf( "*** Flag O_RDONLY = %5d\n", fla...
Galvanism asked 20/5, 2020 at 22:1

1

There are a few related concepts out there, namely file pointer, stream and file descriptor. I know that a file pointer is a pointer to the data type FILE (declared in e.g. FILE.h and struct_FILE.h...
Increasing asked 20/5, 2020 at 10:53

8

Solved

(Note: This is not a question of how to flush a write(). This is the other end of it, so to speak.) Is it possible to empty a file descriptor that has data to be read in it without having to read(...
Cunha asked 17/12, 2009 at 19:56

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

2

console.log uses process.stdout.write to write to file descriptor (fd) 1 and console.error uses process.stderr.write to write to file descriptor (fd) 2 How can I create a new file descriptor 3?...
Wood asked 25/4, 2020 at 22:39

10

Solved

I'm developing a video streaming application and I'm getting stuck when calling set setDataSource with a FileDescriptor. I want my application to play the video as it is being downloaded, so once I...
Symmetrize asked 25/1, 2011 at 15:10

3

Solved

I am getting a bad file descriptor when trying to append to a logging file within my go routine. write ./log.log: bad file descriptor The file exists and has 666 for permissions. At first I thou...
Baca asked 22/11, 2015 at 4:46

2

Solved

In Node.js, is there any way of getting the current offset of a file descriptor or stream? Presently, it is possible to set the offset of a file descriptor, but there seems to be no way to get it. ...
Bunt asked 15/2, 2020 at 9:38

2

Solved

What is the default behaviour when you open a file with access mode O_WRONLY or O_RDWR. Is the file opened in append mode or truncate mode? From the man pages: The argument flags must include on...
Talon asked 23/1, 2020 at 20:25

3

Solved

I have a machine running node.js (v0.1.32) with a tcp server (tcp.createServer) and a http server (http.createServer). The http server is hit by long polling requests (lasting 50 sec each) from a c...
Kursk asked 9/7, 2010 at 16:5

9

Solved

How are file descriptors and file pointers related? When is it appropriate to use each?
Pinnule asked 11/3, 2010 at 9:2

5

Solved

How can I figure out if a file descriptor is currently in use in Bash? For example, if I have a script that reads, writes, and closes fd 3, e.g. exec 3< <(some command here) ... cat &l...
Theater asked 12/1, 2017 at 1:42

2

I am looking for type of a file descriptor without the possibility of blocking in the kernel. I am aware I can use fstat(2) but fstat will also get me all sorts of metadata information (access time...
Esmerolda asked 12/10, 2019 at 11:0

3

my question: in Linux (and in FreeBsd, and generally in UNIX) is it possible/legal to read single file descriptor simultaneously from two threads? I did some search but found nothing, although a l...
Chingchinghai asked 20/2, 2011 at 14:52

2

I've seen a lot of C code that tries to close all file descriptors between calling fork() and calling exec...(). Why is this commonly done and what is the best way to do it in my own code, as I've ...
Mazel asked 18/6, 2019 at 13:41

4

Solved

Can someone tell me why this does not work? I'm playing around with file descriptors, but feel a little lost. #!/bin/bash echo "This" echo "is" >&2 echo "a" >&3 echo "test." >&amp...
Vicennial asked 16/8, 2011 at 17:1

3

Solved

If I open the same file twice, will it give an error, or will it create two different file descriptors? For example a = open("teste.txt", O_RDONLY); b = open("teste.txt", O_RDONLY);
Thunderstruck asked 27/6, 2013 at 21:23

3

Solved

Editor's note: This question is for a version of Rust prior to 1.0. Some answers have been updated to cover Rust 1.0 or up, but not all. I am writing a systemd socket activated service in Rust....
Large asked 27/12, 2014 at 7:45

2

Solved

I need to write to file descriptor 3. I have been searching for it but the documentation is quite poor. The only thing that I have found is the use of libc library and the fdopen method, but I have...
Rostellum asked 25/2, 2019 at 0:32

2

Solved

I have an open file descriptor which I want to duplicate in order to perform reading and seeking through both of them independently. I looked at the int dup(int old_fd) syscall. The problem is ...
Theism asked 16/2, 2019 at 20:14

© 2022 - 2025 — McMap. All rights reserved.