descriptor « windows « C File Q&A

Home
C File Q&A
1.array
2.binary
3.delete
4.Development
5.directory
6.fgets
7.fopen
8.fprintf
9.fscanf
10.fwrite
11.header
12.include
13.input
14.LINE
15.linux
16.open
17.output
18.pointer
19.read
20.size
21.string
22.struct
23.Text
24.windows
25.write
C File Q&A » windows » descriptor 

1. Duplicate file descriptor with its own file offset    stackoverflow.com

How can one create a new file descriptor from an existing file descriptor such that the new descriptor does not share the same internal file structure/entry in the file table? Specifically ...

2. Detect NUL file descriptor (isatty is bogus)    stackoverflow.com

The following C file gives a bogus result when NUL is piped to it:

int main()
{
  printf("_isatty = %d\n", _isatty(0));
}
the result is:
C:\Users\Edward\Dev\nulltest> test.exe < NUL
_isatty = 64
I'm pretty sure NUL (aka ...

3. On Windows/mingw, what is the equivalent of `fcntl(fd, F_GETFL) | O_ACCMODE`?    stackoverflow.com

I am compiling a program on Windows with Mingw. How can I get the access mode for an open file descriptor?

4. Is there way to make file descriptor non blocking in windows?    stackoverflow.com

I want to port my code from linux to windows. It is something like this:

void SetNonBlocking( int filehandle )
{
    int fhFlags;

    fhFlags = fcntl(filehandle,F_GETFL);
  ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.