- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- inetd and $PATH variable
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2003 10:29 AM
06-03-2003 10:29 AM
inetd and $PATH variable
We are using inetd to start a server process.
This server process will fork() and create a child process. If I print $PATH in child process, it is empty :- (. Any idea?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2003 10:53 AM
06-03-2003 10:53 AM
Re: inetd and $PATH variable
ie:
/usr/sbin/ping
instead of
ping
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2003 10:55 AM
06-03-2003 10:55 AM
Re: inetd and $PATH variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2003 10:58 AM
06-03-2003 10:58 AM
Re: inetd and $PATH variable
I think I may know why... but would like some more info
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2003 11:00 AM
06-03-2003 11:00 AM
Re: inetd and $PATH variable
i.e.
#script starts
PATH=$PATH:/bla/bla:/bla/bal
#rest of script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2003 11:11 AM
06-03-2003 11:11 AM
Re: inetd and $PATH variable
Because this is c, he need to do a series of putenv() function calls.
e.g.
putenv("PATH=/usr/bin:/usr/local/bin");
This would apply to all environemnt variables not just PATH.
The programmer must also take care that the string arguments supplied to putenv() do not go "out of scope" and thus become undefined. Subsequent references to the env vars then result in absolute chaos.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2003 12:15 PM
06-03-2003 12:15 PM
Re: inetd and $PATH variable
started, will it have any value for PATH variable ? Will it inherit PATH set to root user ? like for Ex:
PATH=/usr/bin:/usr/local/bin
If it is, i guess process started by inetd will inherit the PATH variable values and child process or child's child process will have same value for PATH as above.
In my case I am not assigning any value to PATH
variable. I want to use existing value but nothing is assigned to PATH. It is BLANK?
I will check by restarting inetd.
Thanx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2003 12:19 PM
06-03-2003 12:19 PM
Re: inetd and $PATH variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2003 12:35 PM
06-03-2003 12:35 PM
Re: inetd and $PATH variable
TZ and LANG - everything else is NULL.
If you want PATH (or anything else) set then you, the programmer, must explicitly set it either in your parent before the fork() or in the child.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2003 12:43 PM
06-03-2003 12:43 PM
Re: inetd and $PATH variable
Bill Hassell, sysadmin