Linux blocked on file read on exit, need select

cy via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Mar 20 21:38:58 PDT 2016


I don't know, but you could always just use fcntl if you already 
can assume you're on Linux.

extern (C) int fcntl(int, int, int);

C keeps the constants under lock and key of course, so you have 
to specify them manually. But you could write a C program to 
print them out, or generate D code I suppose.

const int F_SETFL = 4
const int F_GETFL = 3
const int O_NONBLOCK = 2048
fcntl(fd,F_SETFL,O_NONBLOCK | fcntl(fd,F_GETFL,42));

not tested or anything.



More information about the Digitalmars-d-learn mailing list