*BSD News Article 3631


Return to BSD News archive

From: notes@hpuslma.STL.MSR.HP.COM (Notes Administrator)
Date: Sun, 9 Aug 1992 01:56:15 GMT
Subject: Re: ELM and News Ports
Message-ID: <10690@hpuslma.STL.MSR.HP.COM>
Organization: Hewlett Packard St. Louis, Mo.
Path: sserve!manuel!munnari.oz.au!mips!mips!sdd.hp.com!wupost!hpuslma!notes
Newsgroups: comp.unix.bsd
References: <2439@nic.cerf.net>
Lines: 34

/ hpuslma:comp.unix.bsd / greggb@nic.cerf.net (Gregg Brekke) /  1:45 am  Aug  1, 1992 /
> greggb@nic.cerf.net writes:
> Problem With Elm...  After getting it to compile by editing almost every
> source file to either #define or #undef some of 386bsd's functions, it
> compiled.  The problem is that when I go to send a message with it, the 
> command line information gets sent to the program, but the /tmp/elm* file
> doesn't get appended to the header.  ELM only creates a minimal header 
> from the command line so 'elm joe@abc.edu' will get passed to ELM so joe
> will get a blank message.  If anyone else has looked at the problem, it
> seems to be in mailmsg2.c.  I just can't quite figure out where it is
> messing up... permissions, location, string copy?

I had the same problem.  It turned out to be a problem with the command
line passed to the system_call() function.  The sprintf generates a line that
looks like:

"( (/usr/sbin/sendmail -oi -oem \"root\" ; rm -f /tmp/snd.#) & ) < /tmp/snd.#"

I believe there is an interaction with the first level sub-shell and the 
sendmail process.  After starting the second level sub-shell in the background,
the parent shell is incrementing the file pointer.  (Just a guess)

I fixed the problem by re-arranging the sprintf call to generate a command
line that looks like:

"( (/usr/sbin/sendmail -oi -oem \"root\" < /tmp/snd.# ; rm -f /tmp/snd.#) & )"

I hope this helps,

Bill Nestor
WDN and Associates, Limited
St. Louis, MO
(no current email address)