Date: Sat, 26 Jun 1999 22:17:22 +0800 From: Peihan Wang <peihanw@mx.cei.gov.cn> To: freebsd-questions@FreeBSD.ORG Subject: char* getenv(const char*) (3) Message-ID: <3774E0F2.66FECA2D@mx.cei.gov.cn>
next in thread | raw e-mail | index | archive | help
I am writing a simple program which calling lib function getenv(). But there is something I can not explain. The code char * cp = getenv("PATH"); works fine, while other two usage cp = getenv("PPID"); cp = getenv("PIPESTATUS"); just return NULL. Under shell(bash2.01), I type $ set ... PATH=/sbin:/usr/sbin:/bin:/usr/bin.... PIPESTATUS=([0]="0") PPID=258 ... $ echo $PPID 258 $ echo $PIPESTATUS 0 Why getenv does not work with PPID & PIPESTATUS ? How shell obtain these info ? Thanx. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3774E0F2.66FECA2D>