Re: what reason causes echo some date after command line snmpd &

Fulko Hew <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
2010/4/7 Dave Shield <[email protected]>

> 2010/4/7 黎明傲子 <[email protected]>:
> > successful,but if I enter the command line snmpd &,always some date
> appears,
> > like
> > # snmpd -f &
> > 36
> > I want to know why this happened,
>
> The charcter '&' means that you are running this command as a
> "background process".  The number that is displayed is the
> "process ID" of this process.
>
> This is a standard mechanism of most Unix shells.
> Any good book on Unix will explain about it.
> It's not particular to the Net-SNMP agent.
>
> > In addition,if I enter the command line
> > # snmpd -c /etc/snmpd.conf -f &
> > 39
> > # ps
> > .......................................................
> > 51   S0 Z      0K     0K  8.3 snmpd
>
> I'm surprised at this output - I'd expect it to display "51"
> instead of "39"
>

I'm not.  Although I haven't looked at net-snmpd's daemonizing code,
any application thats going to operate as a  (well behaved) daemon
is supposed to perform (at least) 2 fork() calls to 'detatch itself from
the controlling terminal', etc.

Fulko

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.