1 <!-- Copyright (C) 2003 Red Hat, Inc. -->
2 <!-- This material may be distributed only subject to the terms -->
3 <!-- and conditions set forth in the Open Publication License, v1.0 -->
4 <!-- or later (the latest version is presently available at -->
5 <!-- http://www.opencontent.org/openpub/). -->
6 <!-- Distribution of the work or derivative of the work in any -->
7 <!-- standard (paper) book form is prohibited unless prior -->
8 <!-- permission is obtained from the copyright holder. -->
12 >Process Environment [POSIX Section 4]</TITLE
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="eCos Reference Manual"
20 HREF="ecos-ref.html"><LINK
22 TITLE="POSIX Standard Support"
23 HREF="posix-standard-support.html"><LINK
25 TITLE="POSIX Standard Support"
26 HREF="posix-standard-support.html"><LINK
28 TITLE="Files and Directories [POSIX Section 5]"
29 HREF="posix-files-and-directories.html"></HEAD
40 SUMMARY="Header navigation table"
49 >eCos Reference Manual</TH
57 HREF="posix-standard-support.html"
65 >Chapter 31. POSIX Standard Support</TD
71 HREF="posix-files-and-directories.html"
85 NAME="POSIX-PROCESS-ENVIRONMENT">Process Environment [POSIX Section 4]</H1
91 NAME="AEN13011">Functions Implemented</H2
100 >int uname( struct utsname *name );
101 time_t time( time_t *tloc );
102 char *getenv( const char *name );
103 int isatty( int fd );
104 long sysconf( int name );</PRE
114 NAME="AEN13014">Functions Omitted</H2
123 >pid_t getpid( void );
124 pid_t getppid( void );
125 uid_t getuid( void );
126 uid_t geteuid( void );
127 gid_t getgid( void );
128 gid_t getegid( void );
129 int setuid( uid_t uid );
130 int setgid( gid_t gid );
131 int getgroups( int gidsetsize, gid_t grouplist[] );
132 char *getlogin( void );
133 int getlogin_r( char *name, size_t namesize );
134 pid_t getpgrp( void );
135 pid_t setsid( void );
136 int setpgid( pid_t pid, pid_t pgid );
137 char *ctermid( char *s);
138 char *ttyname( int fd ); // TBA
139 int ttyname_r( int fd, char *name, size_t namesize); // TBA
140 clock_t times( struct tms *buffer ); // TBA</PRE
150 NAME="AEN13017">Notes</H2
156 >The fields of the <SPAN
163 structure are initialized as follows:
172 > sysname “eCos”
173 nodename “” (gethostname() is currently not available)
175 release Major version number of the kernel
176 version Minor version number of the kernel
177 machine “” (Requires some config tool changes)
185 > The sizes of these strings are defined by
186 CYG_POSIX_UTSNAME_LENGTH and
187 CYG_POSIX_UTSNAME_NODENAME_LENGTH. The
188 latter defaults to the value of the former, but may also
189 be set independently to accommodate a longer node name.
200 > function is currently
201 implemented in the C library.
206 >A set of environment strings may be defined at configuration
207 time with the CYGDAT_LIBC_DEFAULT_ENVIRONMENT
208 option. The application may also define an environment by direct
209 assignment to the <SPAN
228 any character device is a tty and that all other devices are not
229 ttys. Since the only kind of device that eCos currently supports
230 is serial character devices, this is an adequate
236 > All system variables supported by sysconf will yield a
237 value. However, those that are irrelevant to eCos will
238 either return the default minimum defined in
241 ><limits.h></TT
254 SUMMARY="Footer navigation table"
265 HREF="posix-standard-support.html"
283 HREF="posix-files-and-directories.html"
293 >POSIX Standard Support</TD
299 HREF="posix-standard-support.html"
307 >Files and Directories [POSIX Section 5]</TD