eCos Reference Manual
Prev | Chapter 31. POSIX Standard Support | Next

# Process Environment [POSIX Section 4]

## Functions Implemented

    int uname( struct utsname *name );
    time_t time( time_t *tloc );
    char *getenv( const char *name );
    int isatty( int fd );
    long sysconf( int name );

## Functions Omitted

    pid_t getpid( void );
    pid_t getppid( void );
    uid_t getuid( void );
    uid_t geteuid( void );
    gid_t getgid( void );
    gid_t getegid( void );
    int setuid( uid_t uid );
    int setgid( gid_t gid );
    int getgroups( int gidsetsize, gid_t grouplist[] );
    char *getlogin( void );
    int getlogin_r( char *name, size_t namesize );
    pid_t getpgrp( void );
    pid_t setsid( void );
    int setpgid( pid_t pid, pid_t pgid );
    char *ctermid( char *s);
    char *ttyname( int fd );                             // TBA
    int ttyname_r( int fd, char *name, size_t namesize); // TBA
    clock_t times( struct tms *buffer );                 // TBA

## Notes

- The fields of the utsname structure are initialized as follows:

      	    sysname	“eCos”
      	    nodename	“”	(gethostname() is currently not available)

      	    release		Major version number of the kernel
      	    version   		Minor version number of the kernel
      	    machine	“” 	(Requires some config tool changes)

  The sizes of these strings are defined by CYG_POSIX_UTSNAME_LENGTH and CYG_POSIX_UTSNAME_NODENAME_LENGTH. The latter defaults to the value of the former, but may also be set independently to accommodate a longer node name.

- The time() function is currently implemented in the C library.

- A set of environment strings may be defined at configuration time with the CYGDAT_LIBC_DEFAULT_ENVIRONMENT option. The application may also define an environment by direct assignment to the environ variable.

- At present isatty() assumes that any character device is a tty and that all other devices are not ttys. Since the only kind of device that eCos currently supports is serial character devices, this is an adequate distinction.

- All system variables supported by sysconf will yield a value. However, those that are irrelevant to eCos will either return the default minimum defined in `<limits.h>`, or zero.

Prev | Home | Next
POSIX Standard Support | Up | Files and Directories [POSIX Section 5]