Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2005/1120/3

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


Remove unused code.
 [jmk] --rw-rw-r-- M 154268 glenda sys 5642 Nov 20 11:15 sys/src/cmd/ip/ping.c
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/ip/ping.c:168,174 - 
	/n/sourcesdump/2005/1121/plan9/sys/src/cmd/ip/ping.c:168,174
	  }
	  
	  void
	- rcvr(int fd, int msglen, int interval, int nmsg, int senderpid)
	+ rcvr(int fd, int msglen, int interval, int nmsg)
	  {
	  	uchar buf[64*1024+512];
	  	Icmp *ip;
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/ip/ping.c:231,238 - 
	/n/sourcesdump/2005/1121/plan9/sys/src/cmd/ip/ping.c:231,236
	  {
	  	int fd;
	  	int msglen, interval, nmsg;
	- 	int pid;
	- 	char err[ERRMAX];
	  
	  	nsec();		/* make sure time file is already open */
	  
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/ip/ping.c:286,297 - 
	/n/sourcesdump/2005/1121/plan9/sys/src/cmd/ip/ping.c:284,294
	  
	  	print("sending %d %d byte messages %d ms apart\n", nmsg, msglen, interval);
	  
	- 	pid = getpid();
	  	switch(rfork(RFPROC|RFMEM|RFFDG)){
	  	case -1:
	  		fprint(2, "%s: can't fork: %r\n", argv0);
	  	case 0:
	- 		rcvr(fd, msglen, interval, nmsg, pid);
	+ 		rcvr(fd, msglen, interval, nmsg);
	  		exits(0);
	  	default:
	  		sender(fd, msglen, interval, nmsg);


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.