summaryrefslogtreecommitdiff
path: root/libphobos/libdruntime/core/sys/linux/unistd.d
blob: 548870268dbf43c0cf27114c82894ede6205206c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
module core.sys.linux.unistd;

public import core.sys.posix.unistd;

version (linux):
extern(C):
nothrow:
@nogc:

// Additional seek constants for sparse file handling
// from Linux's unistd.h, stdio.h, and linux/fs.h
// (see http://man7.org/linux/man-pages/man2/lseek.2.html)
enum {
    /// Offset is relative to the next location containing data
    SEEK_DATA = 3,
    /// Offset is relative to the next hole (or EOF if file is not sparse)
    SEEK_HOLE = 4
}

/// Prompt for a password without echoing it.
char* getpass(const(char)* prompt);

// Exit all threads in a process
void exit_group(int status);

/// Close all open file descriptors greater or equal to `lowfd`
void closefrom(int lowfd);