Following: [Summary]: Some details of startup/stop/restart script for sendmail(8.9.1)

From: Irene A. Shilikhina <irene_at_alpha.iae.nsk.su>
Date: Thu, 05 Nov 1998 17:40:56 +0600 (NSK)

Recently I summarized that on my system the ps output (for "ps auxww|grep
sendmail" or "ps -e|grep sendmail") was four characters shorter than that
my four correspondents had (a part of my previous summary is under my
signature).

As it occured, no mystery... Having a look to sources, I'm able to tell
something about why it takes place. Furthermore, perhaps the most surprising
is that my correspondents also see in your output *not entire* string liable
to printing! Here it is:

                /* wait for a connection */
                setproctitle("accepting connections on port %d",
                             ntohs(port));

But IT'S NOT A BUG! The matter is the following. In the sources, there is a
module called conf.c containing two functions - setproctitle and
initsetproctitle.

From the beginning, argv[0] contains, as usually, only the name of the image
file (i.e. "sendmail"). In order to include in it additional information
about what part of the sendmail is executed in the process, the function
initsetproctitle(argc, argv, envp) in the special buffer makes some cooking
with all args giving more place for "process title" (in argv[0]) which we
see in the "command" field of the ps output.
What size of the buffer remains for such extra information, hardly depends
on many circumstances, in particular, on the size of the environment array
and a certain system as well (a lot of system h-files included). Thus, for
different versions and configurations of DU it's rather possible to have a
different rest of that buffer... It's why we may see the strings of different
length.
So, the ps output depends not only on "ps" itself, but also on what the
program executed in this process does with its arguments.

Now, I'm rather happy... :-)

Thanks,
Irene
*************************************************************************
* *
* Irene A. Shilikhina e-mail: irene_at_alpha.iae.nsk.su *
* System administrator, *
* Institute of Automation & Electrometry, *
* Siberian Branch of Russian Academy of Sciences, *
* Novosibirsk, Russia *
* http://www.iae.nsk.su/~irene *
*************************************************************************
* * *
* Good intentions pave a path to * Every cloud has a silver lining. *
* the hell. * *
* * *
*************************************************************************

On Thu, 5 Nov 1998, Irene A. Shilikhina wrote:

> So, what remains without possible explanation is that IN MY SYSTEM the ps
> command output (both /bin/ps and simply ps, with different flags!) has the
> "command" field trancated... :
> >/bin/ps auxww|grep sendmail
> root 8554 0.0 0.4 2.10M 248K ?? S Oct 29 0:25.00
> sendmail: accepting connectio
> >ps -e|grep sendmail
> 8554 ?? I 0:25.00 sendmail: accepting connectio
>
> The remark by Charles M. Richmond:
>
>Of more interest is the shortness of the ps -e output.
>Sendmail 8.9.0 gives:
>
>sendmail: accepting connections o
>
>While your output is:
>
>sendmail: accepting connectio
>
>Presumably this bug can be fixed in the 8.9.1 source if you really do not
>want change the script.
Received on Thu Nov 05 1998 - 11:44:18 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:38 NZDT