Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

# OS_NS_unistd.h File Reference

`#include "ace/config-all.h"`
`#include "ace/os_include/os_unistd.h"`
`#include "ace/Time_Value.h"`
`#include "ace/os_include/os_stdio.h"`
`#include "ace/ACE_export.h"`
`#include "ace/OS_NS_unistd.inl"`

Include dependency graph for OS_NS_unistd.h:

This graph shows which files directly or indirectly include this file:

## Namespaces
namespace | ACE_OS
## Defines
#define | ACE_EXPORT_MACRO ACE_Export
#define | ACE_INLINE inline
## Functions
ACE_NAMESPACE_INLINE_FUNCTION int | access (const char *path, int amode)
ACE_NAMESPACE_INLINE_FUNCTION int | access (const wchar_t *path, int amode)
ACE_NAMESPACE_INLINE_FUNCTION unsigned int | alarm (u_int secs)
ACE_NAMESPACE_INLINE_FUNCTION long | allocation_granularity (void)
ACE_Export int | argv_to_string (ACE_TCHAR **argv, ACE_TCHAR *&buf, int substitute_env_args=1)
ACE_NAMESPACE_INLINE_FUNCTION int | chdir (const char *path)
ACE_NAMESPACE_INLINE_FUNCTION int | chdir (const wchar_t *path)
ACE_NAMESPACE_INLINE_FUNCTION int | rmdir (const char *path)
ACE_NAMESPACE_INLINE_FUNCTION int | rmdir (const wchar_t *path)
ACE_NAMESPACE_INLINE_FUNCTION int | close (ACE_HANDLE handle)
ACE_NAMESPACE_INLINE_FUNCTION ACE_HANDLE | dup (ACE_HANDLE handle)
ACE_NAMESPACE_INLINE_FUNCTION int | dup2 (ACE_HANDLE oldfd, ACE_HANDLE newfd)
ACE_Export int | execl (const char *path, const char *arg0,...)
ACE_Export int | execle (const char *path, const char *arg0,...)
ACE_Export int | execlp (const char *file, const char *arg0,...)
ACE_NAMESPACE_INLINE_FUNCTION int | execv (const char *path, char *const argv[])
ACE_NAMESPACE_INLINE_FUNCTION int | execve (const char *path, char *const argv[], char *const envp[])
ACE_NAMESPACE_INLINE_FUNCTION int | execvp (const char *file, char *const argv[])
ACE_NAMESPACE_INLINE_FUNCTION int | fsync (ACE_HANDLE handle)
ACE_NAMESPACE_INLINE_FUNCTION int | ftruncate (ACE_HANDLE, off_t)
ACE_NAMESPACE_INLINE_FUNCTION char * | getcwd (char *, size_t)
ACE_NAMESPACE_INLINE_FUNCTION wchar_t * | getcwd (wchar_t *, size_t)
ACE_NAMESPACE_INLINE_FUNCTION gid_t | getgid (void)
ACE_NAMESPACE_INLINE_FUNCTION gid_t | getegid (void)
ACE_NAMESPACE_INLINE_FUNCTION int | getopt (int argc, char *const *argv, const char *optstring)
ACE_NAMESPACE_INLINE_FUNCTION long | getpagesize (void)
ACE_NAMESPACE_INLINE_FUNCTION pid_t | getpgid (pid_t pid)
ACE_NAMESPACE_INLINE_FUNCTION pid_t | getpid (void)
ACE_NAMESPACE_INLINE_FUNCTION pid_t | getppid (void)
ACE_NAMESPACE_INLINE_FUNCTION uid_t | getuid (void)
ACE_NAMESPACE_INLINE_FUNCTION uid_t | geteuid (void)
ACE_NAMESPACE_INLINE_FUNCTION int | hostname (char *name, size_t maxnamelen)
ACE_NAMESPACE_INLINE_FUNCTION int | hostname (wchar_t *name, size_t maxnamelen)
ACE_NAMESPACE_INLINE_FUNCTION int | isatty (int handle)
ACE_NAMESPACE_INLINE_FUNCTION int | isatty (ACE_HANDLE handle)
ACE_NAMESPACE_INLINE_FUNCTION off_t | lseek (ACE_HANDLE handle, off_t offset, int whence)
ACE_Export long | num_processors (void)
| Get the number of CPUs configured in the machine.
ACE_Export long | num_processors_online (void)
| Get the number of CPUs currently online.
ACE_NAMESPACE_INLINE_FUNCTION int | pipe (ACE_HANDLE handles[])
ACE_Export ssize_t | pread (ACE_HANDLE handle, void *buf, size_t nbyte, off_t offset)
ACE_Export ssize_t | pwrite (ACE_HANDLE handle, const void *buf, size_t nbyte, off_t offset)
ACE_NAMESPACE_INLINE_FUNCTION ssize_t | read (ACE_HANDLE handle, void *buf, size_t len)
ACE_NAMESPACE_INLINE_FUNCTION ssize_t | read (ACE_HANDLE handle, void *buf, size_t len, ACE_OVERLAPPED *)
ACE_Export ssize_t | read_n (ACE_HANDLE handle, void *buf, size_t len, size_t *bytes_transferred=0)
ACE_NAMESPACE_INLINE_FUNCTION ssize_t | readlink (const char *path, char *buf, size_t bufsiz)
ACE_NAMESPACE_INLINE_FUNCTION void * | sbrk (ptrdiff_t brk)
ACE_NAMESPACE_INLINE_FUNCTION int | setgid (gid_t)
ACE_NAMESPACE_INLINE_FUNCTION int | setegid (gid_t)
ACE_NAMESPACE_INLINE_FUNCTION int | setpgid (pid_t pid, pid_t pgid)
ACE_NAMESPACE_INLINE_FUNCTION int | setregid (gid_t rgid, gid_t egid)
ACE_NAMESPACE_INLINE_FUNCTION int | setreuid (uid_t ruid, uid_t euid)
ACE_NAMESPACE_INLINE_FUNCTION pid_t | setsid (void)
ACE_NAMESPACE_INLINE_FUNCTION int | setuid (uid_t)
ACE_NAMESPACE_INLINE_FUNCTION int | seteuid (uid_t)
ACE_NAMESPACE_INLINE_FUNCTION int | sleep (u_int seconds)
ACE_NAMESPACE_INLINE_FUNCTION int | sleep (const ACE_Time_Value &tv)
ACE_Export int | string_to_argv (ACE_TCHAR *buf, int &argc, ACE_TCHAR **&argv, int substitute_env_args=1)
ACE_NAMESPACE_INLINE_FUNCTION void | swab (const void *src, void *dest, ssize_t n)
ACE_NAMESPACE_INLINE_FUNCTION long | sysconf (int)
ACE_NAMESPACE_INLINE_FUNCTION long | sysinfo (int cmd, char *buf, long count)
ACE_NAMESPACE_INLINE_FUNCTION int | truncate (const ACE_TCHAR *filename, off_t length)
ACE_NAMESPACE_INLINE_FUNCTION u_long | ualarm (u_long usecs, u_long interval=0)
ACE_NAMESPACE_INLINE_FUNCTION u_long | ualarm (const ACE_Time_Value &tv, const ACE_Time_Value &tv_interval=ACE_Time_Value::zero)
ACE_NAMESPACE_INLINE_FUNCTION int | unlink (const char *path)
ACE_NAMESPACE_INLINE_FUNCTION int | unlink (const wchar_t *path)
ACE_NAMESPACE_INLINE_FUNCTION ssize_t | write (ACE_HANDLE handle, const void *buf, size_t nbyte)
ACE_NAMESPACE_INLINE_FUNCTION ssize_t | write (ACE_HANDLE handle, const void *buf, size_t nbyte, ACE_OVERLAPPED *)
ACE_Export ssize_t | write_n (ACE_HANDLE handle, const void *buf, size_t len, size_t *bytes_transferred=0)

## Detailed Description

Id
  OS_NS_unistd.h,v 1.16 2006/01/09 14:37:25 jwillemsen Exp

Author:
  Douglas C. Schmidt <schmidt@cs.wustl.edu>

  Jesper S. M|ller<stophph@diku.dk>

  and a cast of thousands...

Originally in OS.h.

## Define Documentation

#define ACE_EXPORT_MACRO ACE_Export

#define ACE_INLINE inline

## Function Documentation

ACE_INLINE int ACE_OS::access | ( | const wchar_t * | path,
|  | int | amode
| ) |

ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE int ACE_OS::access | ( | const char * | path,
|  | int | amode
| ) |

ACE_INLINE u_int ACE_OS::alarm | ( | u_int | secs | ) |

ACE_INLINE long ACE_OS::allocation_granularity | ( | void |  | ) |

ACE_BEGIN_VERSIONED_NAMESPACE_DECL int ACE_OS::argv_to_string | ( | ACE_TCHAR ** | argv,
|  | ACE_TCHAR *& | buf,
|  | int | substitute_env_args = `1`
| ) |

ACE_INLINE int ACE_OS::chdir | ( | const wchar_t * | path | ) |

ACE_INLINE int ACE_OS::chdir | ( | const char * | path | ) |

ACE_INLINE int ACE_OS::close | ( | ACE_HANDLE | handle | ) |

ACE_INLINE ACE_HANDLE ACE_OS::dup | ( | ACE_HANDLE | handle | ) |

ACE_INLINE int ACE_OS::dup2 | ( | ACE_HANDLE | oldfd,
|  | ACE_HANDLE | newfd
| ) |

int ACE_OS::execl | ( | const char * | path,
|  | const char * | arg0,
|  |  | ...
| ) |

int ACE_OS::execle | ( | const char * | path,
|  | const char * | arg0,
|  |  | ...
| ) |

int ACE_OS::execlp | ( | const char * | file,
|  | const char * | arg0,
|  |  | ...
| ) |

ACE_INLINE int ACE_OS::execv | ( | const char * | path,
|  | char *const | argv[]
| ) |

ACE_INLINE int ACE_OS::execve | ( | const char * | path,
|  | char *const | argv[],
|  | char *const | envp[]
| ) |

ACE_INLINE int ACE_OS::execvp | ( | const char * | file,
|  | char *const | argv[]
| ) |

pid_t ACE_OS::fork | ( | const ACE_TCHAR * | program_name | ) |

| Forks and exec's a process in a manner that works on Solaris and NT. argv[0] must be the full path name to the executable.

ACE_INLINE pid_t ACE_OS::fork | ( | void |  | ) |

| Forks and exec's a process in a manner that works on Solaris and NT. argv[0] must be the full path name to the executable.

pid_t ACE_OS::fork_exec | ( | ACE_TCHAR * | argv[] | ) |

| Forks and exec's a process in a manner that works on Solaris and NT. argv[0] must be the full path name to the executable.

ACE_INLINE int ACE_OS::fsync | ( | ACE_HANDLE | handle | ) |

ACE_INLINE int ACE_OS::ftruncate | ( | ACE_HANDLE | ,
|  | off_t |
| ) |

ACE_INLINE wchar_t * ACE_OS::getcwd | ( | wchar_t * | ,
|  | size_t |
| ) |

ACE_INLINE char * ACE_OS::getcwd | ( | char * | ,
|  | size_t |
| ) |

ACE_INLINE gid_t ACE_OS::getegid | ( | void |  | ) |

ACE_INLINE uid_t ACE_OS::geteuid | ( | void |  | ) |

ACE_INLINE gid_t ACE_OS::getgid | ( | void |  | ) |

ACE_INLINE int ACE_OS::getopt | ( | int | argc,
|  | char *const * | argv,
|  | const char * | optstring
| ) |

ACE_INLINE long ACE_OS::getpagesize | ( | void |  | ) |

ACE_INLINE pid_t ACE_OS::getpgid | ( | pid_t | pid | ) |

ACE_INLINE pid_t ACE_OS::getpid | ( | void |  | ) |

ACE_INLINE pid_t ACE_OS::getppid | ( | void |  | ) |

ACE_INLINE uid_t ACE_OS::getuid | ( | void |  | ) |

ACE_NAMESPACE_INLINE_FUNCTION int hostname | ( | wchar_t * | name,
|  | size_t | maxnamelen
| ) |

ACE_NAMESPACE_INLINE_FUNCTION int hostname | ( | char * | name,
|  | size_t | maxnamelen
| ) |

ACE_INLINE int ACE_OS::isatty | ( | ACE_HANDLE | handle | ) |

ACE_INLINE int ACE_OS::isatty | ( | int | handle | ) |

ACE_INLINE off_t ACE_OS::lseek | ( | ACE_HANDLE | handle,
|  | off_t | offset,
|  | int | whence
| ) |

long ACE_OS::num_processors | ( | void |  | ) |

| Get the number of CPUs configured in the machine.

long ACE_OS::num_processors_online | ( | void |  | ) |

| Get the number of CPUs currently online.

ACE_INLINE int ACE_OS::pipe | ( | ACE_HANDLE | handles[] | ) |

ssize_t ACE_OS::pread | ( | ACE_HANDLE | handle,
|  | void * | buf,
|  | size_t | nbyte,
|  | off_t | offset
| ) |

ssize_t ACE_OS::pwrite | ( | ACE_HANDLE | handle,
|  | const void * | buf,
|  | size_t | nbyte,
|  | off_t | offset
| ) |

ACE_INLINE ssize_t ACE_OS::read | ( | ACE_HANDLE | handle,
|  | void * | buf,
|  | size_t | len,
|  | ACE_OVERLAPPED * |
| ) |

ACE_INLINE ssize_t ACE_OS::read | ( | ACE_HANDLE | handle,
|  | void * | buf,
|  | size_t | len
| ) |

ssize_t ACE_OS::read_n | ( | ACE_HANDLE | handle,
|  | void * | buf,
|  | size_t | len,
|  | size_t * | bytes_transferred = `0`
| ) |

| Receive <len> bytes into <buf> from <handle> (uses the <ACE_OS::read> call, which uses the <read> system call on UNIX and the <readfile> call on Win32). If errors occur, -1 is returned. If EOF occurs, 0 is returned. Whatever data has been read will be returned to the caller through<bytes_transferred>.

ACE_INLINE ssize_t ACE_OS::readlink | ( | const char * | path,
|  | char * | buf,
|  | size_t | bufsiz
| ) |

ACE_INLINE int ACE_OS::rmdir | ( | const wchar_t * | path | ) |

ACE_INLINE int ACE_OS::rmdir | ( | const char * | path | ) |

ACE_INLINE void * ACE_OS::sbrk | ( | ptrdiff_t | brk | ) |

ACE_INLINE int ACE_OS::setegid | ( | gid_t |  | ) |

ACE_INLINE int ACE_OS::seteuid | ( | uid_t |  | ) |

ACE_INLINE int ACE_OS::setgid | ( | gid_t |  | ) |

ACE_INLINE int ACE_OS::setpgid | ( | pid_t | pid,
|  | pid_t | pgid
| ) |

ACE_INLINE int ACE_OS::setregid | ( | gid_t | rgid,
|  | gid_t | egid
| ) |

ACE_INLINE int ACE_OS::setreuid | ( | uid_t | ruid,
|  | uid_t | euid
| ) |

ACE_INLINE pid_t ACE_OS::setsid | ( | void |  | ) |

ACE_INLINE int ACE_OS::setuid | ( | uid_t |  | ) |

ACE_INLINE int ACE_OS::sleep | ( | const ACE_Time_Value & | tv | ) |

ACE_INLINE int ACE_OS::sleep | ( | u_int | seconds | ) |

int ACE_OS::string_to_argv | ( | ACE_TCHAR * | buf,
|  | int & | argc,
|  | ACE_TCHAR **& | argv,
|  | int | substitute_env_args = `1`
| ) |

ACE_INLINE void ACE_OS::swab | ( | const void * | src,
|  | void * | dest,
|  | ssize_t | n
| ) |

ACE_INLINE long ACE_OS::sysconf | ( | int |  | ) |

ACE_INLINE long ACE_OS::sysinfo | ( | int | cmd,
|  | char * | buf,
|  | long | count
| ) |

ACE_INLINE int ACE_OS::truncate | ( | const ACE_TCHAR * | filename,
|  | off_t | length
| ) |

ACE_INLINE u_long ACE_OS::ualarm | ( | const ACE_Time_Value & | tv,
|  | const ACE_Time_Value & | tv_interval = `ACE_Time_Value::zero`
| ) |

ACE_INLINE u_long ACE_OS::ualarm | ( | u_long | usecs,
|  | u_long | interval = `0`
| ) |

ACE_INLINE int ACE_OS::unlink | ( | const wchar_t * | path | ) |

ACE_INLINE int ACE_OS::unlink | ( | const char * | path | ) |

ACE_INLINE ssize_t ACE_OS::write | ( | ACE_HANDLE | handle,
|  | const void * | buf,
|  | size_t | nbyte,
|  | ACE_OVERLAPPED * |
| ) |

ACE_INLINE ssize_t ACE_OS::write | ( | ACE_HANDLE | handle,
|  | const void * | buf,
|  | size_t | nbyte
| ) |

ssize_t ACE_OS::write_n | ( | ACE_HANDLE | handle,
|  | const void * | buf,
|  | size_t | len,
|  | size_t * | bytes_transferred = `0`
| ) |

| Send <len> bytes from <buf> to <handle> (uses the <ACE_OS::write> calls, which is uses the <write> system call on UNIX and the <writefile> call on Win32). If errors occur, -1 is returned. If EOF occurs, 0 is returned. Whatever data has been transmitted will be returned to the caller through <bytes_transferred>.