- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Environment variables of daemon processes
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
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
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
11-26-2013 07:04 AM
11-26-2013 07:04 AM
Environment variables of daemon processes
Folks'ses,
we have a strange problem here on HP-UX B.11.31: we have a daemon process, started by rc which in turn starts another process upon receiving some input over the network.
For some strange reason this 2nd process no longer has any reasonable environment set up, esp. PATH seems to be gone.
It used to work without a problem by now something has gone amiss.
Can anyone help identify the change that might cause this strange behaviour?
Thanx
PS: I'm not the admin I only use the box and the admins say they didn't change anything (as usual ;)
- Tags:
- environment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2013 12:51 PM
11-26-2013 12:51 PM
Re: Environment variables of daemon processes
>no longer has any reasonable environment set up
Why would you expect anything in the environment for a demon? You should be using absolute paths.
Can you dump the environment for your first process and check what's missing for the second.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2013 11:10 PM
11-26-2013 11:10 PM
Re: Environment variables of daemon processes
Thanx Dennis, for your answer.
- I'm expecting something because it used to work (I'm currently taking over long established software);
- I did dump the environment in the 2nd process and its PATH variable only contains /sbin.
Using absolute paths is an option, I know, but the software is supposed to run on HP-UX, SUN, AIX, ... so I'm not sure if it is such a good idea...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2013 12:10 AM
11-27-2013 12:10 AM
Re: Environment variables of daemon processes
>I did dump the environment in the 2nd process
Anything besides PATH? What about the first process?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2013 12:13 AM
11-27-2013 12:13 AM
Re: Environment variables of daemon processes
DDFA=0 DHCPV6CLNTD_ARGS='' DHCPV6D=0 DHCPV6SRVRD_ARGS='' ERASE=^H ERRNO=2 FCEDIT=/usr/bin/ed IFS=' ' INETD=1 INETD_ARGS='' INIT_STATE=3 LANG=C LINENO=1 MAILCHECK=600 MROUTED=0 MROUTED_ARGS='' NTPDATE_SERVER='' OPTARG OPTIND=1 PATH=/sbin PPID=3093 PRE_U95=true PS2='> ' PS3='#? ' PS4='+ ' PWD=/sam/dev5bdevn/courier RANDOM=16935 RWHOD=0 SECONDS=0 SENDMAIL_RECVONLY=0 SENDMAIL_SENDONLY=0 SENDMAIL_SERVER=1 SENDMAIL_SERVER_NAME='' SHELL=/usr/bin/sh SNMP_HPUNIX_START=1 SNMP_IPv6_START=1 SNMP_MASTER_START=1 SNMP_MIB2_START=1 SNMP_NAA_START=0 SNMP_TRAPDEST_START=1 SSLSOCKET=7 TERM=unknown TMOUT=0 TZ=GMT XNTPD=1 XNTPD_ARGS='' _=/sam/dev5bdevn/courier/rc_tcpip
don't have acces to the 1st process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2013 12:32 AM
11-27-2013 12:32 AM
Re: Environment variables of daemon processes
Since the rc(1m) scripts have to run without /usr mounted, I would think that PATH=/sbin is reasonable.
What other path components do you think you need?
If you want more, you will have to set them yourself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2013 12:59 AM
11-27-2013 12:59 AM
Re: Environment variables of daemon processes
I would need at least /usr/bin, because the process does, amongst many other things, a system("cp -r .."); which fails now.
The confusing thing though is, that it used to work, and "nobody changed anything".