svn commit: r359354 - stable/12/share/man/man3

Mateusz Piotrowski 0mp at FreeBSD.org
Fri Mar 27 09:57:37 UTC 2020


Author: 0mp (doc,ports committer)
Date: Fri Mar 27 09:57:27 2020
New Revision: 359354
URL: https://svnweb.freebsd.org/changeset/base/359354

Log:
  MFC 358954:
  
  CMSG_DATA.3: Fix formatting of printf escape sequences
  
  Escape sequences like "\n" have to be escaped twice in examples in our
  mdoc(7)-based manual pages in order to be displayed properly. The problem
  is that otherwise they are interpreted by mdoc(7), which results in:
  
      printf("parent: received '%s'0, buf);
  
  being shown to the user instead of:
  
      printf("parent: received '%s'\n", buf);
  
  Approved by:	bcr (mentor)
  Differential Revision:	https://reviews.freebsd.org/D24056

Modified:
  stable/12/share/man/man3/CMSG_DATA.3
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/share/man/man3/CMSG_DATA.3
==============================================================================
--- stable/12/share/man/man3/CMSG_DATA.3	Fri Mar 27 09:55:53 2020	(r359353)
+++ stable/12/share/man/man3/CMSG_DATA.3	Fri Mar 27 09:57:27 2020	(r359354)
@@ -2,7 +2,7 @@
 .\" Public domain, July 3, 2005
 .\"
 .\" $FreeBSD$
-.Dd November 1, 2018
+.Dd March 13, 2020
 .Dt CMSG_DATA 3
 .Os
 .Sh NAME
@@ -142,7 +142,7 @@ main()
 			    cmsg->cmsg_level == SOL_SOCKET &&
 			    cmsg->cmsg_type == SCM_RIGHTS) {
 				hellofd[1] = *(int *)CMSG_DATA(cmsg);
-				printf("child: sending '%s'\n", buf);
+				printf("child: sending '%s'\\n", buf);
 				if (write(hellofd[1], buf, HELLOLEN) == -1)
 				    err(EX_IOERR, "failed to send 'hello'");
 			}
@@ -166,7 +166,7 @@ main()
 
 		if (read(hellofd[0], buf, HELLOLEN) == -1)
 			err(EX_IOERR, "faild to receive 'hello'");
-		printf("parent: received '%s'\n", buf);
+		printf("parent: received '%s'\\n", buf);
 		break;
 	}
 


More information about the svn-src-stable mailing list