On Sunday, July 22, 2012 11:45:26 PM UTC-4, BILL wrote:
> On Linux, ps -ef |grep sendmail, it returns something like this:
>
> root 1920 1 0 10:13 ? 00:00:00 sendmail: accepting connections
> smmsp 19211 1 0 10:13 ? 00:00:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
>
> I know the "sendmail: accepting connections" is for displaying purpose. Do we have a way to retrive the real arguments for a running process if the arg[0] is set to something else in the end of the program?
> Thanks.
Someone in the sendmail group replied:
cat `grep '^O PidFile=' /etc/mail/se*cf | sed -e 's/^.*=//'`
as sendmail keep a PidFile to record the actually command the arguments. Now the question becomes a more OS-related... if the arg[] is set to a displaying title (which will be what ps -ef shows), and the program doesn't keep a PidFile, do we still have the info somewhere in the kernel?