How does Sendmail know how it was invoked?

Don Hinton don.hinton at vanderbilt.edu
Sat Aug 4 15:30:43 PDT 2007


> I don't think that's right. As I understand it, the argv argument to
> execve() is passed-on directly as the child processes arguments, and
> the parent can write whatever it likes into argv[0] - it's only
> convention that it's a filename. So mailwrapper passes its own
> argv[0] as sendmail's argv[0]. And so sendmail behaves as if it had been
> invoked as mailq or whatever.

You're exactly right.  I misread the man file and did a little test to confirm 
it. 

thanks...
don
-- 
Don Hinton <don.hinton at vanderbilt.edu> or <hintonda at gmail.com>
Institute for Software Integrated Systems (ISIS), Vanderbilt University
tel: 615.480.5667 or 615.870.9728


More information about the freebsd-questions mailing list