Back to index

glibc  2.9
Defines | Typedefs | Functions | Variables
unistd.h File Reference
#include <features.h>
#include <bits/posix_opt.h>
#include <bits/types.h>
#include <stddef.h>
#include <bits/confname.h>

Go to the source code of this file.

Defines

#define _POSIX_VERSION   200112L
#define _POSIX2_VERSION   200112L
#define _POSIX2_C_BIND   200112L
#define _POSIX2_C_DEV   200112L
#define _POSIX2_SW_DEV   200112L
#define _POSIX2_LOCALEDEF   200112L
#define _XOPEN_VERSION   4
#define _XOPEN_XCU_VERSION   4
#define _XOPEN_XPG2   1
#define _XOPEN_XPG3   1
#define _XOPEN_XPG4   1
#define _XOPEN_UNIX   1
#define _XOPEN_CRYPT   1
#define _XOPEN_ENH_I18N   1
#define _XOPEN_LEGACY   1
#define STDIN_FILENO   0 /* Standard input. */
#define STDOUT_FILENO   1 /* Standard output. */
#define STDERR_FILENO   2 /* Standard error output. */
#define __ssize_t_defined
#define __need_size_t
#define __need_NULL
#define R_OK   4 /* Test for read permission. */
#define W_OK   2 /* Test for write permission. */
#define X_OK   1 /* Test for execute permission. */
#define F_OK   0 /* Test for existence. */
#define SEEK_SET   0 /* Seek from beginning of file. */
#define SEEK_CUR   1 /* Seek from current position. */
#define SEEK_END   2 /* Seek from end of file. */

Typedefs

typedef __ssize_t ssize_t

Functions

int access (__const char *__name, int __type) __THROW __nonnull((1))
__off_t lseek (int __fd, __off_t __offset, int __whence) __THROW
int close (int __fd)
ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur
ssize_t write (int __fd, __const void *__buf, size_t __n) __wur
int pipe (int __pipedes[2]) __THROW __wur
unsigned int alarm (unsigned int __seconds) __THROW
unsigned int sleep (unsigned int __seconds)
int pause (void)
int chown (__const char *__file, __uid_t __owner, __gid_t __group) __THROW __nonnull((1)) __wur
int chdir (__const char *__path) __THROW __nonnull((1)) __wur
char * getcwd (char *__buf, size_t __size) __THROW __wur
int dup (int __fd) __THROW __wur
int dup2 (int __fd, int __fd2) __THROW
int execve (__const char *__path, char *__const __argv[], char *__const __envp[]) __THROW __nonnull((1))
int execv (__const char *__path, char *__const __argv[]) __THROW __nonnull((1))
int execle (__const char *__path, __const char *__arg,...) __THROW __nonnull((1))
int execl (__const char *__path, __const char *__arg,...) __THROW __nonnull((1))
int execvp (__const char *__file, char *__const __argv[]) __THROW __nonnull((1))
int execlp (__const char *__file, __const char *__arg,...) __THROW __nonnull((1))
void _exit (int __status) __attribute__((__noreturn__))
long int pathconf (__const char *__path, int __name) __THROW __nonnull((1))
long int fpathconf (int __fd, int __name) __THROW
long int sysconf (int __name) __THROW
__pid_t getpid (void) __THROW
__pid_t getppid (void) __THROW
__pid_t getpgrp (void) __THROW
__pid_t __getpgid (__pid_t __pid) __THROW
int setpgid (__pid_t __pid, __pid_t __pgid) __THROW
__pid_t setsid (void) __THROW
__uid_t getuid (void) __THROW
__uid_t geteuid (void) __THROW
__gid_t getgid (void) __THROW
__gid_t getegid (void) __THROW
int getgroups (int __size, __gid_t __list[]) __THROW __wur
int setuid (__uid_t __uid) __THROW
int setgid (__gid_t __gid) __THROW
__pid_t fork (void) __THROW
char * ttyname (int __fd) __THROW
int ttyname_r (int __fd, char *__buf, size_t __buflen) __THROW __nonnull((2)) __wur
int isatty (int __fd) __THROW
int link (__const char *__from, __const char *__to) __THROW __nonnull((1
int unlink (__const char *__name) __THROW __nonnull((1))
int rmdir (__const char *__path) __THROW __nonnull((1))
__pid_t tcgetpgrp (int __fd) __THROW
int tcsetpgrp (int __fd, __pid_t __pgrp_id) __THROW
char * getlogin (void)

Variables

char ** __environ
int __wur

Define Documentation

#define __need_NULL

Definition at line 196 of file unistd.h.

#define __need_size_t

Definition at line 195 of file unistd.h.

Definition at line 192 of file unistd.h.

#define _POSIX2_C_BIND   200112L

Definition at line 44 of file unistd.h.

#define _POSIX2_C_DEV   200112L

Definition at line 48 of file unistd.h.

#define _POSIX2_LOCALEDEF   200112L

Definition at line 56 of file unistd.h.

#define _POSIX2_SW_DEV   200112L

Definition at line 52 of file unistd.h.

#define _POSIX2_VERSION   200112L

Definition at line 40 of file unistd.h.

#define _POSIX_VERSION   200112L

Definition at line 34 of file unistd.h.

#define _XOPEN_CRYPT   1

Definition at line 79 of file unistd.h.

#define _XOPEN_ENH_I18N   1

Definition at line 83 of file unistd.h.

#define _XOPEN_LEGACY   1

Definition at line 86 of file unistd.h.

#define _XOPEN_UNIX   1

Definition at line 76 of file unistd.h.

#define _XOPEN_VERSION   4

Definition at line 64 of file unistd.h.

#define _XOPEN_XCU_VERSION   4

Definition at line 68 of file unistd.h.

#define _XOPEN_XPG2   1

Definition at line 71 of file unistd.h.

#define _XOPEN_XPG3   1

Definition at line 72 of file unistd.h.

#define _XOPEN_XPG4   1

Definition at line 73 of file unistd.h.

#define F_OK   0 /* Test for existence. */

Definition at line 255 of file unistd.h.

#define R_OK   4 /* Test for read permission. */

Definition at line 252 of file unistd.h.

#define SEEK_CUR   1 /* Seek from current position. */

Definition at line 283 of file unistd.h.

#define SEEK_END   2 /* Seek from end of file. */

Definition at line 284 of file unistd.h.

#define SEEK_SET   0 /* Seek from beginning of file. */

Definition at line 282 of file unistd.h.

#define STDERR_FILENO   2 /* Standard error output. */

Definition at line 183 of file unistd.h.

#define STDIN_FILENO   0 /* Standard input. */

Definition at line 181 of file unistd.h.

#define STDOUT_FILENO   1 /* Standard output. */

Definition at line 182 of file unistd.h.

#define W_OK   2 /* Test for write permission. */

Definition at line 253 of file unistd.h.

#define X_OK   1 /* Test for execute permission. */

Definition at line 254 of file unistd.h.


Typedef Documentation

typedef __ssize_t ssize_t

Definition at line 191 of file unistd.h.


Function Documentation

Definition at line 28 of file __getpgid.c.

{
  return __pgrpsys (4, pid);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void _exit ( int  __status)

Definition at line 33 of file _exit.c.

{
  /* status is ignored */
  Bsp_cleanup();
}

Here is the call graph for this function:

int access ( __const char *  __name,
int  __type 
)

Here is the caller graph for this function:

unsigned int alarm ( unsigned int  __seconds)

Definition at line 30 of file alarm.c.

{
  __set_errno (ENOSYS);
  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int chdir ( __const char *  __path)

Here is the caller graph for this function:

int chown ( __const char *  __file,
__uid_t  __owner,
__gid_t  __group 
)

Here is the caller graph for this function:

int close ( int  __fd)
int dup ( int  __fd)

Here is the caller graph for this function:

int dup2 ( int  __fd,
int  __fd2 
)

Here is the caller graph for this function:

int execl ( __const char *  __path,
__const char *  __arg,
  ... 
)
int execle ( __const char *  __path,
__const char *  __arg,
  ... 
)
int execlp ( __const char *  __file,
__const char *  __arg,
  ... 
)
int execv ( __const char *  __path,
char *__const  __argv[] 
)
int execve ( __const char *  __path,
char *__const  __argv[],
char *__const  __envp[] 
)

Here is the caller graph for this function:

int execvp ( __const char *  __file,
char *__const  __argv[] 
)
__pid_t fork ( void  )

Here is the caller graph for this function:

long int fpathconf ( int  __fd,
int  __name 
)

Here is the caller graph for this function:

char* getcwd ( char *  __buf,
size_t  __size 
)

Here is the caller graph for this function:

__gid_t getegid ( void  )
__uid_t geteuid ( void  )
__gid_t getgid ( void  )
int getgroups ( int  __size,
__gid_t  __list[] 
)

Here is the caller graph for this function:

char* getlogin ( void  )

Definition at line 26 of file getlogin.c.

{
  __set_errno (ENOSYS);
  return NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

__pid_t getpgrp ( void  )

Definition at line 24 of file getpgrp.c.

{
  return __getpgid (0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

__pid_t getpid ( void  )

Definition at line 10 of file restest2.c.

{
  pid_t (*f)(void);
  f = (pid_t (*)(void)) dlsym (RTLD_NEXT, "getpid");
  if (f == NULL)
    error (EXIT_FAILURE, 0, "dlsym (RTLD_NEXT, \"getpid\"): %s", dlerror ());
  return (pid2 = f()) + 26;
}

Here is the call graph for this function:

Here is the caller graph for this function:

__pid_t getppid ( void  )

Here is the caller graph for this function:

__uid_t getuid ( void  )
int isatty ( int  __fd)

Here is the caller graph for this function:

int link ( __const char *  __from,
__const char *  __to 
)

Here is the caller graph for this function:

__off_t lseek ( int  __fd,
__off_t  __offset,
int  __whence 
)

Here is the caller graph for this function:

long int pathconf ( __const char *  __path,
int  __name 
)

Here is the caller graph for this function:

int pause ( void  )

Definition at line 27 of file pause.c.

{
  __set_errno (ENOSYS);
  return -1;
}

Here is the caller graph for this function:

int pipe ( int  __pipedes[2])

Here is the caller graph for this function:

ssize_t read ( int  __fd,
void *  __buf,
size_t  __nbytes 
)

Definition at line 35 of file unistd.h.

{
  if (__bos0 (__buf) != (size_t) -1)
    {
      if (!__builtin_constant_p (__nbytes))
       return __read_chk (__fd, __buf, __nbytes, __bos0 (__buf));

      if (__nbytes > __bos0 (__buf))
       return __read_chk_warn (__fd, __buf, __nbytes, __bos0 (__buf));
    }
  return __read_alias (__fd, __buf, __nbytes);
}

Here is the call graph for this function:

int rmdir ( __const char *  __path)

Here is the caller graph for this function:

int setgid ( __gid_t  __gid)

Here is the caller graph for this function:

int setpgid ( __pid_t  __pid,
__pid_t  __pgid 
)

Here is the caller graph for this function:

__pid_t setsid ( void  )

Here is the caller graph for this function:

int setuid ( __uid_t  __uid)

Here is the caller graph for this function:

unsigned int sleep ( unsigned int  __seconds)

Here is the caller graph for this function:

long int sysconf ( int  __name)

Here is the caller graph for this function:

__pid_t tcgetpgrp ( int  __fd)

Definition at line 26 of file tcgetpgrp.c.

{
  int pgrp;

  if (__ioctl (fd, TIOCGPGRP, &pgrp) < 0)
    return (pid_t) -1;
  return (pid_t) pgrp;
}

Here is the caller graph for this function:

int tcsetpgrp ( int  __fd,
__pid_t  __pgrp_id 
)

Definition at line 26 of file tcsetpgrp.c.

{
  return __ioctl (fd, TIOCSPGRP, &pgrp_id);
}
char* ttyname ( int  __fd)

Definition at line 29 of file ttyname.c.

{
  __set_errno (ENOSYS);
  return NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int ttyname_r ( int  __fd,
char *  __buf,
size_t  __buflen 
)

Here is the caller graph for this function:

int unlink ( __const char *  __name)
ssize_t write ( int  __fd,
__const void *  __buf,
size_t  __n 
)

Variable Documentation

char** __environ

Definition at line 72 of file libc-start.c.

Definition at line 769 of file unistd.h.