The mysterious error message

Chris Sylvain cgs at umd5
Wed Nov 26 02:08:32 AEST 1986


[]
If anyone's mail gets bounced back, it's because the account-name here
has changed (see below).

The consensus of opinion is the environment is getting trashed. I'm going
to have to see what I can do with "dbx". It's strange that the environment
is getting trashed when I don't pass **envp to the program, and I never
attempt to do anything to the environment via a system() call.
Since I've received a note that I'm not the only one to have noticed this,
I'm including the following response I received for everyone's benefit:

> From: trwrb!ljp at ucbvax.Berkeley.EDU (Laura J. Pearlman)
> Organization: TRW EDS, Redondo Beach, CA
>
> Perhaps something in your .cshrc or .login file is doing something
> unexpected to your environment.  Why don't you try typing "/bin/sh"
> from the terminal, to see whether you get the same error, or typing
> "printenv" from the terminal to see whether you get something
> unusual?
>
As I stated in my original posting, everything works fine and as
expected when I type the command line in system() to either csh or sh.

>
> If that doesn't turn out to be it, you might be accidentally
> overwriting envp in your program somewhere -- you could try
> printing out your environment in your program at the point
> where you normally call system(3)...
>
>		-- Laura Pearlman
>		...{ucbvax,hplabs!decvax}!trwrb!ljp

Don't think I could overwrite **envp (see above). Also the code I'm
using generates no complaints from lint (the first thing I did when
I started having problems). Also, the code had previously worked fine
under 2.9BSD and Ultrix V1.2 ...
I've tried to do system("printenv"), but that too generates the error.
So, I'm left with poking around with "dbx" until I find out what is
going on.
Thanks to everyone who responded so far.

-- 
--==---==---==--
.. And hast thou slain the Jabberwock? ..

ARPA: cgs at umd5.UMD.EDU     BITNET: cgs%umd5 at umd2
UUCP: ..!seismo!umd5.umd.edu!cgs



More information about the Comp.unix.questions mailing list