<!-- Copyright (C) 2003 Red Hat, Inc. -->
|
<!-- Copyright (C) 2003 Red Hat, Inc. -->
|
<!-- This material may be distributed only subject to the terms -->
|
<!-- This material may be distributed only subject to the terms -->
|
<!-- and conditions set forth in the Open Publication License, v1.0 -->
|
<!-- and conditions set forth in the Open Publication License, v1.0 -->
|
<!-- or later (the latest version is presently available at -->
|
<!-- or later (the latest version is presently available at -->
|
<!-- http://www.opencontent.org/openpub/). -->
|
<!-- http://www.opencontent.org/openpub/). -->
|
<!-- Distribution of the work or derivative of the work in any -->
|
<!-- Distribution of the work or derivative of the work in any -->
|
<!-- standard (paper) book form is prohibited unless prior -->
|
<!-- standard (paper) book form is prohibited unless prior -->
|
<!-- permission is obtained from the copyright holder. -->
|
<!-- permission is obtained from the copyright holder. -->
|
<HTML
|
<HTML
|
><HEAD
|
><HEAD
|
><TITLE
|
><TITLE
|
>Process Environment [POSIX Section 4]</TITLE
|
>Process Environment [POSIX Section 4]</TITLE
|
><meta name="MSSmartTagsPreventParsing" content="TRUE">
|
><meta name="MSSmartTagsPreventParsing" content="TRUE">
|
<META
|
<META
|
NAME="GENERATOR"
|
NAME="GENERATOR"
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
"><LINK
|
"><LINK
|
REL="HOME"
|
REL="HOME"
|
TITLE="eCos Reference Manual"
|
TITLE="eCos Reference Manual"
|
HREF="ecos-ref.html"><LINK
|
HREF="ecos-ref.html"><LINK
|
REL="UP"
|
REL="UP"
|
TITLE="POSIX Standard Support"
|
TITLE="POSIX Standard Support"
|
HREF="posix-standard-support.html"><LINK
|
HREF="posix-standard-support.html"><LINK
|
REL="PREVIOUS"
|
REL="PREVIOUS"
|
TITLE="POSIX Standard Support"
|
TITLE="POSIX Standard Support"
|
HREF="posix-standard-support.html"><LINK
|
HREF="posix-standard-support.html"><LINK
|
REL="NEXT"
|
REL="NEXT"
|
TITLE="Files and Directories [POSIX Section 5]"
|
TITLE="Files and Directories [POSIX Section 5]"
|
HREF="posix-files-and-directories.html"></HEAD
|
HREF="posix-files-and-directories.html"></HEAD
|
><BODY
|
><BODY
|
CLASS="SECT1"
|
CLASS="SECT1"
|
BGCOLOR="#FFFFFF"
|
BGCOLOR="#FFFFFF"
|
TEXT="#000000"
|
TEXT="#000000"
|
LINK="#0000FF"
|
LINK="#0000FF"
|
VLINK="#840084"
|
VLINK="#840084"
|
ALINK="#0000FF"
|
ALINK="#0000FF"
|
><DIV
|
><DIV
|
CLASS="NAVHEADER"
|
CLASS="NAVHEADER"
|
><TABLE
|
><TABLE
|
SUMMARY="Header navigation table"
|
SUMMARY="Header navigation table"
|
WIDTH="100%"
|
WIDTH="100%"
|
BORDER="0"
|
BORDER="0"
|
CELLPADDING="0"
|
CELLPADDING="0"
|
CELLSPACING="0"
|
CELLSPACING="0"
|
><TR
|
><TR
|
><TH
|
><TH
|
COLSPAN="3"
|
COLSPAN="3"
|
ALIGN="center"
|
ALIGN="center"
|
>eCos Reference Manual</TH
|
>eCos Reference Manual</TH
|
></TR
|
></TR
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="10%"
|
WIDTH="10%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
><A
|
><A
|
HREF="posix-standard-support.html"
|
HREF="posix-standard-support.html"
|
ACCESSKEY="P"
|
ACCESSKEY="P"
|
>Prev</A
|
>Prev</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="80%"
|
WIDTH="80%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
>Chapter 31. POSIX Standard Support</TD
|
>Chapter 31. POSIX Standard Support</TD
|
><TD
|
><TD
|
WIDTH="10%"
|
WIDTH="10%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
><A
|
><A
|
HREF="posix-files-and-directories.html"
|
HREF="posix-files-and-directories.html"
|
ACCESSKEY="N"
|
ACCESSKEY="N"
|
>Next</A
|
>Next</A
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><HR
|
><HR
|
ALIGN="LEFT"
|
ALIGN="LEFT"
|
WIDTH="100%"></DIV
|
WIDTH="100%"></DIV
|
><DIV
|
><DIV
|
CLASS="SECT1"
|
CLASS="SECT1"
|
><H1
|
><H1
|
CLASS="SECT1"
|
CLASS="SECT1"
|
><A
|
><A
|
NAME="POSIX-PROCESS-ENVIRONMENT">Process Environment [POSIX Section 4]</H1
|
NAME="POSIX-PROCESS-ENVIRONMENT">Process Environment [POSIX Section 4]</H1
|
><DIV
|
><DIV
|
CLASS="SECT2"
|
CLASS="SECT2"
|
><H2
|
><H2
|
CLASS="SECT2"
|
CLASS="SECT2"
|
><A
|
><A
|
NAME="AEN13011">Functions Implemented</H2
|
NAME="AEN13011">Functions Implemented</H2
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
>int uname( struct utsname *name );
|
>int uname( struct utsname *name );
|
time_t time( time_t *tloc );
|
time_t time( time_t *tloc );
|
char *getenv( const char *name );
|
char *getenv( const char *name );
|
int isatty( int fd );
|
int isatty( int fd );
|
long sysconf( int name );</PRE
|
long sysconf( int name );</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="SECT2"
|
CLASS="SECT2"
|
><H2
|
><H2
|
CLASS="SECT2"
|
CLASS="SECT2"
|
><A
|
><A
|
NAME="AEN13014">Functions Omitted</H2
|
NAME="AEN13014">Functions Omitted</H2
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
>pid_t getpid( void );
|
>pid_t getpid( void );
|
pid_t getppid( void );
|
pid_t getppid( void );
|
uid_t getuid( void );
|
uid_t getuid( void );
|
uid_t geteuid( void );
|
uid_t geteuid( void );
|
gid_t getgid( void );
|
gid_t getgid( void );
|
gid_t getegid( void );
|
gid_t getegid( void );
|
int setuid( uid_t uid );
|
int setuid( uid_t uid );
|
int setgid( gid_t gid );
|
int setgid( gid_t gid );
|
int getgroups( int gidsetsize, gid_t grouplist[] );
|
int getgroups( int gidsetsize, gid_t grouplist[] );
|
char *getlogin( void );
|
char *getlogin( void );
|
int getlogin_r( char *name, size_t namesize );
|
int getlogin_r( char *name, size_t namesize );
|
pid_t getpgrp( void );
|
pid_t getpgrp( void );
|
pid_t setsid( void );
|
pid_t setsid( void );
|
int setpgid( pid_t pid, pid_t pgid );
|
int setpgid( pid_t pid, pid_t pgid );
|
char *ctermid( char *s);
|
char *ctermid( char *s);
|
char *ttyname( int fd ); // TBA
|
char *ttyname( int fd ); // TBA
|
int ttyname_r( int fd, char *name, size_t namesize); // TBA
|
int ttyname_r( int fd, char *name, size_t namesize); // TBA
|
clock_t times( struct tms *buffer ); // TBA</PRE
|
clock_t times( struct tms *buffer ); // TBA</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="SECT2"
|
CLASS="SECT2"
|
><H2
|
><H2
|
CLASS="SECT2"
|
CLASS="SECT2"
|
><A
|
><A
|
NAME="AEN13017">Notes</H2
|
NAME="AEN13017">Notes</H2
|
><P
|
><P
|
></P
|
></P
|
><UL
|
><UL
|
><LI
|
><LI
|
><P
|
><P
|
>The fields of the <SPAN
|
>The fields of the <SPAN
|
CLASS="emphasis"
|
CLASS="emphasis"
|
><I
|
><I
|
CLASS="EMPHASIS"
|
CLASS="EMPHASIS"
|
>utsname</I
|
>utsname</I
|
></SPAN
|
></SPAN
|
>
|
>
|
structure are initialized as follows:
|
structure are initialized as follows:
|
<TABLE
|
<TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
> sysname “eCos”
|
> sysname “eCos”
|
nodename “” (gethostname() is currently not available)
|
nodename “” (gethostname() is currently not available)
|
|
|
release Major version number of the kernel
|
release Major version number of the kernel
|
version Minor version number of the kernel
|
version Minor version number of the kernel
|
machine “” (Requires some config tool changes)
|
machine “” (Requires some config tool changes)
|
</PRE
|
</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
>
|
>
|
</P
|
</P
|
><P
|
><P
|
> The sizes of these strings are defined by
|
> The sizes of these strings are defined by
|
CYG_POSIX_UTSNAME_LENGTH and
|
CYG_POSIX_UTSNAME_LENGTH and
|
CYG_POSIX_UTSNAME_NODENAME_LENGTH. The
|
CYG_POSIX_UTSNAME_NODENAME_LENGTH. The
|
latter defaults to the value of the former, but may also
|
latter defaults to the value of the former, but may also
|
be set independently to accommodate a longer node name.
|
be set independently to accommodate a longer node name.
|
</P
|
</P
|
></LI
|
></LI
|
><LI
|
><LI
|
><P
|
><P
|
> The <SPAN
|
> The <SPAN
|
CLASS="emphasis"
|
CLASS="emphasis"
|
><I
|
><I
|
CLASS="EMPHASIS"
|
CLASS="EMPHASIS"
|
>time()</I
|
>time()</I
|
></SPAN
|
></SPAN
|
> function is currently
|
> function is currently
|
implemented in the C library.
|
implemented in the C library.
|
</P
|
</P
|
></LI
|
></LI
|
><LI
|
><LI
|
><P
|
><P
|
>A set of environment strings may be defined at configuration
|
>A set of environment strings may be defined at configuration
|
time with the CYGDAT_LIBC_DEFAULT_ENVIRONMENT
|
time with the CYGDAT_LIBC_DEFAULT_ENVIRONMENT
|
option. The application may also define an environment by direct
|
option. The application may also define an environment by direct
|
assignment to the <SPAN
|
assignment to the <SPAN
|
CLASS="strong"
|
CLASS="strong"
|
><B
|
><B
|
CLASS="EMPHASIS"
|
CLASS="EMPHASIS"
|
>environ</B
|
>environ</B
|
></SPAN
|
></SPAN
|
>
|
>
|
variable.
|
variable.
|
</P
|
</P
|
></LI
|
></LI
|
><LI
|
><LI
|
><P
|
><P
|
> At present <SPAN
|
> At present <SPAN
|
CLASS="emphasis"
|
CLASS="emphasis"
|
><I
|
><I
|
CLASS="EMPHASIS"
|
CLASS="EMPHASIS"
|
>isatty()</I
|
>isatty()</I
|
></SPAN
|
></SPAN
|
> assumes that
|
> assumes that
|
any character device is a tty and that all other devices are not
|
any character device is a tty and that all other devices are not
|
ttys. Since the only kind of device that eCos currently supports
|
ttys. Since the only kind of device that eCos currently supports
|
is serial character devices, this is an adequate
|
is serial character devices, this is an adequate
|
distinction.
|
distinction.
|
</P
|
</P
|
></LI
|
></LI
|
><LI
|
><LI
|
><P
|
><P
|
> All system variables supported by sysconf will yield a
|
> All system variables supported by sysconf will yield a
|
value. However, those that are irrelevant to eCos will
|
value. However, those that are irrelevant to eCos will
|
either return the default minimum defined in
|
either return the default minimum defined in
|
<TT
|
<TT
|
CLASS="FILENAME"
|
CLASS="FILENAME"
|
><limits.h></TT
|
><limits.h></TT
|
>,
|
>,
|
or zero.
|
or zero.
|
</P
|
</P
|
></LI
|
></LI
|
></UL
|
></UL
|
></DIV
|
></DIV
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="NAVFOOTER"
|
CLASS="NAVFOOTER"
|
><HR
|
><HR
|
ALIGN="LEFT"
|
ALIGN="LEFT"
|
WIDTH="100%"><TABLE
|
WIDTH="100%"><TABLE
|
SUMMARY="Footer navigation table"
|
SUMMARY="Footer navigation table"
|
WIDTH="100%"
|
WIDTH="100%"
|
BORDER="0"
|
BORDER="0"
|
CELLPADDING="0"
|
CELLPADDING="0"
|
CELLSPACING="0"
|
CELLSPACING="0"
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="posix-standard-support.html"
|
HREF="posix-standard-support.html"
|
ACCESSKEY="P"
|
ACCESSKEY="P"
|
>Prev</A
|
>Prev</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="34%"
|
WIDTH="34%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="ecos-ref.html"
|
HREF="ecos-ref.html"
|
ACCESSKEY="H"
|
ACCESSKEY="H"
|
>Home</A
|
>Home</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="posix-files-and-directories.html"
|
HREF="posix-files-and-directories.html"
|
ACCESSKEY="N"
|
ACCESSKEY="N"
|
>Next</A
|
>Next</A
|
></TD
|
></TD
|
></TR
|
></TR
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="top"
|
VALIGN="top"
|
>POSIX Standard Support</TD
|
>POSIX Standard Support</TD
|
><TD
|
><TD
|
WIDTH="34%"
|
WIDTH="34%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="posix-standard-support.html"
|
HREF="posix-standard-support.html"
|
ACCESSKEY="U"
|
ACCESSKEY="U"
|
>Up</A
|
>Up</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="top"
|
VALIGN="top"
|
>Files and Directories [POSIX Section 5]</TD
|
>Files and Directories [POSIX Section 5]</TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></DIV
|
></DIV
|
></BODY
|
></BODY
|
></HTML
|
></HTML
|
|
|