From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,32c594a83e2d8db X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,32c594a83e2d8db X-Google-Attributes: gid1164f8,public X-Google-Thread: 114b0c,32c594a83e2d8db X-Google-Attributes: gid114b0c,public X-Google-ArrivalTime: 1993-10-07 14:37:54 PST Xref: gmd.de comp.os.vms:32100 comp.sys.dec:10647 comp.sys.hp:25804 Newsgroups: comp.os.vms,comp.sys.dec,comp.sys.hp Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!mdisea!mothost!lmpsbbs!cbergren From: cbergren@comm.mot.com (Craig Bergren) Subject: Re: Move from VMS to Open VMS or to HP-UX? Advice sought! Organization: Motorola Land Mobile Products Sector Date: Thu, 7 Oct 1993 18:25:40 GMT Message-ID: <1993Oct7.182540.3827@lmpsbbs.comm.mot.com> Followup-To: comp.client-server,comp.os.vms,comp.sys.dec,comp.sys.hp X-Newsreader: TIN [version 1.2 PL1] References: <28vscu$8br@agate.berkeley.edu> <1993Oct7.023037.18596@gordian.com> <1993Oct7.134043.14581@ncsa.uiuc.edu> Sender: news@lmpsbbs.comm.mot.com (Net News) Nntp-Posting-Host: 145.1.117.40 Jeffrey L. Sue (jsue@ncsa.uiuc.edu) wrote: > Another thing I've noticed is that a child process in Unix doesn't > seem to inherit any of the parent process' environment variables. Well > heck! I can spawn a subprocess on VMS such that symbols, logicals & > keypad definitions don't get copied to the subprocess' environment... and > guess what! That spawn works *extremely* quickly, even on a 6000-410! > Maybe I'm not doing something quite right on the Unix side to copy the > environment variables from the parent process. All I know is that if > I use "!" to create a subprocess, when using this newsreader (or even > mail) on the Unix system, my parent process' environment variables do > not get copied. The difference in speed of doing this on a Unix system > compared to a VAX 6000-410 isn't even measurable to me (and I'm using my > trusty-dusty, neo-atomic, laser time displacement mechanism that has > precision down to 1.0342454 x 10^-435983745 of a second ;-). When one forks a child process in Unix one inherits all these goodies from the parent: real, effective, and saved user ID real, effective, and saved group ID list of supplementary group IDs (see getgroups(2)) process group ID environment file descriptors close-on-exec flags (see exec(2)) signal handling settings (SIG_DFL, SIG_IGN, address) signal mask (see sigvector(2)) profiling on/off status (see profil(2)) command name in the accounting record (see acct(4)) nice value (see nice(2)) all attached shared memory segments (see shmop(2)) current working directory root directory (see chroot(2)) file mode creation mask (see umask(2)) file size limit (see ulimit(2)) real-time priority (see rtprio(2)) There are variations on the exec function which can replace the inherited environment with a new one for execed process. I think this is how a shell "exports" environment strings to its children. Maybe the fork/exec shell escape for your programs use this variation to wipe out the environment. -- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ! The views I hold are not mine, nor those of my employer. ! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++