FreeBSD & setproctitle() info-advise

bill davidsen davidsen at tmr.com
Wed Jul 17 17:54:11 UTC 2002


In article <20020715211502.K677 at cyclonus.mozone.net>,
 <inn-workers at 2bb49e3f.mozone.net> wrote:
| 
| On Tue, Jul 16, 2002 at 11:57:54AM +0900, Katsuhiro Kondou wrote:
| > } news 80998  0.0  0.4  3644 1576  ??  INs   5:12PM   0:00.00 nnrpd:  nnrpd: accepting connections (nnrpd)
| > 
| > My note book runs FreeBSD4.3, and it shows;
| > 
| >   184   648   639   0   2  4  2928 1384 select SN    ??    0:00.01 nnrpd: localhost help (nnrpd)
| > 
| > Was setproctitle() changed to like yours recently?
| 
| mine do the same exact thing:
| 
| 53916  0.0  0.1  2208  564  ??  INs   9:27PM   0:03.08 nnrpd:  nnrpd: accepting connections (nnrpd)
| 
| but it's ONLY for the listening daemon it appears.  The others appear fine.
| 
| Here's the diffs, to save you some editing ;)

I would rather see "nnrpd:" dropped everywhere and the TITLEset add it
on o/s which don't do it for you. Just putting the title in as an arg is
fine, but some systems will not tell you it's nnrpd, and thus you want
to add that info. Better to have a single o/s check in the macro def.
 
| --- nnrpd.c.old	Mon Jul 15 21:12:10 2002
| +++ nnrpd.c	Mon Jul 15 21:12:32 2002
| @@ -1120,7 +1120,7 @@
|  	/* Arrange to toggle tracing. */
|  	(void)xsignal(SIGHUP, ToggleTrace);
|   
| -	TITLEset("nnrpd: accepting connections");
| +	TITLEset("accepting connections");
|   	
|  	listen(lfd, 128);	
|  
| @@ -1148,7 +1148,7 @@
|  	} while (pid != 0);
|  
|  	/* child process starts here */
| -	TITLEset("nnrpd: connected");
| +	TITLEset("connected");
|  	close(lfd);
|  	dup2(fd, 0);
|  	close(fd);
| 


-- 
bill davidsen <davidsen at tmr.com>
  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.


More information about the inn-workers mailing list