]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
ioctl_console.2, ioctl_getfsmap.2, ioctl_iflags.2, ioctl_list.2, ioctl_ns.2, kcmp...
authorMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 18 Aug 2017 19:37:55 +0000 (21:37 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Sat, 19 Aug 2017 11:47:26 +0000 (13:47 +0200)
The preferred form is

    .PP/.IP
    .in +4n
    .EX
    <code>
    .EE
    .in
    .PP/.IP

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
129 files changed:
man2/ioctl_console.2
man2/ioctl_getfsmap.2
man2/ioctl_iflags.2
man2/ioctl_list.2
man2/ioctl_ns.2
man2/kcmp.2
man2/kexec_load.2
man2/keyctl.2
man2/link.2
man2/mmap.2
man2/modify_ldt.2
man2/msgctl.2
man2/poll.2
man2/query_module.2
man2/quotactl.2
man2/recv.2
man2/recvmmsg.2
man2/sched_setscheduler.2
man2/seccomp.2
man2/select.2
man2/semctl.2
man2/semop.2
man2/send.2
man2/set_thread_area.2
man2/setns.2
man2/shmctl.2
man2/shmget.2
man2/sigaction.2
man2/sysinfo.2
man2/timer_create.2
man2/timerfd_create.2
man2/uname.2
man2/unshare.2
man2/userfaultfd.2
man2/ustat.2
man2/utimensat.2
man2/vmsplice.2
man2/wait.2
man3/adjtime.3
man3/backtrace.3
man3/bswap.3
man3/btree.3
man3/clock_getcpuclockid.3
man3/confstr.3
man3/dbopen.3
man3/dl_iterate_phdr.3
man3/dlinfo.3
man3/duplocale.3
man3/encrypt.3
man3/end.3
man3/endian.3
man3/err.3
man3/errno.3
man3/fmemopen.3
man3/fopencookie.3
man3/frexp.3
man3/fts.3
man3/ftw.3
man3/getaddrinfo.3
man3/getaddrinfo_a.3
man3/getcontext.3
man3/getgrouplist.3
man3/getifaddrs.3
man3/getipnodebyname.3
man3/getnameinfo.3
man3/getopt.3
man3/getprotoent_r.3
man3/getpwent_r.3
man3/getrpcent.3
man3/getservent_r.3
man3/getttyent.3
man3/getumask.3
man3/glob.3
man3/gnu_get_libc_version.3
man3/hash.3
man3/hsearch.3
man3/inet.3
man3/inet_pton.3
man3/insque.3
man3/isalpha.3
man3/makecontext.3
man3/mallopt.3
man3/mbstowcs.3
man3/mcheck.3
man3/memchr.3
man3/mq_getattr.3
man3/mq_open.3
man3/mtrace.3
man3/newlocale.3
man3/ntp_gettime.3
man3/offsetof.3
man3/posix_openpt.3
man3/printf.3
man3/pthread_setname_np.3
man3/pthread_setschedparam.3
man3/rpc.3
man3/scanf.3
man3/sched_getcpu.3
man3/sem_wait.3
man3/setaliasent.3
man3/sigqueue.3
man3/sigvec.3
man3/stdarg.3
man3/strcat.3
man3/strcpy.3
man3/strftime.3
man3/strtol.3
man3/toupper.3
man3/ttyslot.3
man4/fuse.4
man4/loop.4
man4/st.4
man5/elf.5
man7/cgroup_namespaces.7
man7/cgroups.7
man7/feature_test_macros.7
man7/inode.7
man7/inotify.7
man7/keyrings.7
man7/man-pages.7
man7/math_error.7
man7/mount_namespaces.7
man7/mq_overview.7
man7/pthreads.7
man7/sched.7
man7/session-keyring.7
man7/udplite.7
man7/unix.7
man7/vdso.7

index d6f3ec1bc5e71736424cd102a0bd15f9c5f43937..f56901e1268ad922bd51a57670a61632c354ef08 100644 (file)
@@ -243,7 +243,7 @@ This call also invalidates the Unicode mapping.
 Sets screen font and associated rendering information.
 .I argp
 points to a
-
+.IP
 .in +4n
 .EX
 struct consolefontdesc {
@@ -256,7 +256,7 @@ struct consolefontdesc {
 };
 .EE
 .in
-
+.IP
 If necessary, the screen will be appropriately resized, and
 .B SIGWINCH
 sent to the appropriate processes.
@@ -834,16 +834,16 @@ without warning.
 situation as of kernel version 1.1.94;
 there are many minor and not-so-minor
 differences with earlier versions.)
-
+.PP
 Very often, ioctls are introduced for communication between the
 kernel and one particular well-known program (fdisk, hdparm, setserial,
 tunelp, loadkeys, selection, setfont, etc.), and their behavior will be
 changed when required by this particular program.
-
+.PP
 Programs using these ioctls will not be portable to other versions
 of UNIX, will not work on older versions of Linux, and will not work
 on future versions of Linux.
-
+.PP
 Use POSIX functions.
 .SH SEE ALSO
 .BR dumpkeys (1),
@@ -868,6 +868,6 @@ Use POSIX functions.
 .BR mapscrn (8),
 .BR resizecons (8),
 .BR setfont (8)
-
+.PP
 .IR /usr/include/linux/kd.h ,
 .I /usr/include/linux/vt.h
index aa17095967abd7dff79ddf6904530905a5ee8d34..2a3cf06c7a851dcb5d39857c2c437b18c337a660 100644 (file)
@@ -41,9 +41,9 @@ block, examine free space, or find known bad blocks, among other things.
 .PP
 The sole argument to this operation should be a pointer to a single
 .IR "struct fsmap_head" ":"
+.PP
 .in +4n
-.nf
-
+.EX
 struct fsmap {
     __u32 fmr_device;      /* Device ID */
     __u32 fmr_flags;       /* Mapping flags */
@@ -65,9 +65,9 @@ struct fsmap_head {
                                   the mapping search */
     struct fsmap fmh_recs[];   /* Returned records */
 };
-
-.fi
+.EE
 .in
+.PP
 The two
 .I fmh_keys
 array elements specify the lowest and highest reverse-mapping
index d54931be84043be347a9d489f4404ab82d882442..72458e573d7ea90f41c34b783e67ca056daa49d1 100644 (file)
@@ -33,9 +33,9 @@ that modify the semantics of files and directories.
 These flags can be retrieved and modified using two
 .BR ioctl (2)
 operations:
-
-.nf
+.PP
 .in +4n
+.nf
 int attr;
 fd = open("pathname", ...);
 
@@ -44,16 +44,16 @@ ioctl(fd, FS_IOC_GETFLAGS, &attr);  /* Place current flags
 attr |= FS_NOATIME_FL;              /* Tweak returned bit mask */
 ioctl(fd, FS_IOC_SETFLAGS, &attr);  /* Update flags for inode
                                        referred to by \(aqfd\(aq */
-.in
 .fi
-
+.in
+.PP
 The
 .BR lsattr (1)
 and
 .BR chattr (1)
 shell commands provide interfaces to these two operations,
 allowing a user to view and modify the inode flags associated with a file.
-
+.PP
 The following flags are supported
 (shown along with the corresponding letter used to indicate the flag by
 .BR lsattr (1)
index 5f4065f61a6c5afb6482e19c4a58b7544f0dd848..fc07aaf99c88f6f2f9c064cd901f699a32ec3f63 100644 (file)
@@ -111,9 +111,9 @@ any output value is stored via the argument.
 However,
 quite a few ioctls in fact return an output value.
 This is not yet indicated below.
-
+.PP
 // Main table.
-
+.PP
 // <include/asm-i386/socket.h>
 .TS
 l l l.
@@ -124,7 +124,7 @@ l l l.
 0x00008905     SIOCATMAR       int *
 0x00008906     SIOCGSTAMP      timeval *
 .TE
-
+.sp 1
 // <include/asm-i386/termios.h>
 .TS
 l l l l.
@@ -186,7 +186,7 @@ l l l.
 0x0000545A     TIOCSERGETMULTI struct serial_multiport_struct *
 0x0000545B     TIOCSERSETMULTI const struct serial_multiport_struct *
 .TE
-
+.sp 1
 // <include/linux/ax25.h>
 .TS
 l l l l.
@@ -201,7 +201,7 @@ l l l l.
 l l l.
 0x000089E6     SIOCAX25SETPARMS        const struct ax25_parms_struct *
 .TE
-
+.sp 1
 // <include/linux/cdk.h>
 .TS
 l l l.
@@ -210,7 +210,7 @@ l l l.
 0x00007316     STL_BSTOP       void
 0x00007317     STL_BRESET      void
 .TE
-
+.sp 1
 // <include/linux/cdrom.h>
 .TS
 l l l.
@@ -249,14 +249,14 @@ l l l l.
 0x00005315     CDROMREADCOOKED const struct cdrom_msf *        // MORE
 0x00005316     CDROMSEEK       const struct cdrom_msf *
 .TE
-
+.sp 1
 // <include/linux/cm206.h>
 .TS
 l l l.
 0x00002000     CM206CTL_GET_STAT       int
 0x00002001     CM206CTL_GET_LAST_STAT  int
 .TE
-
+.sp 1
 // <include/linux/cyclades.h>
 .TS
 l l l.
@@ -270,7 +270,7 @@ l l l.
 0x00435908     CYGETDEFTIMEOUT int *
 0x00435909     CYSETDEFTIMEOUT int
 .TE
-
+.sp 1
 // <include/linux/fd.h>
 .TS
 l l l.
@@ -302,7 +302,7 @@ l l l l.
 0x0000001E     FDRAWCMD        struct floppy_raw_cmd * // MORE // I-O
 0x00000028     FDTWADDLE       void
 .TE
-
+.sp 1
 // <include/linux/fs.h>
 .TS
 l l l l.
@@ -325,7 +325,7 @@ l l l l.
 0x80047601     FS_IOC32_GETVERSION     int *
 0x40047602     FS_IOC32_SETVERSION     int *
 .TE
-
+.sp 1
 // <include/linux/hdreg.h>
 .TS
 l l l l.
@@ -345,7 +345,7 @@ l l l l.
 0x00000325     HDIO_SET_NOWERR int
 0x00000326     HDIO_SET_DMA    int
 .TE
-
+.sp 1
 // <include/linux/if_eql.h>
 .TS
 l l l l.
@@ -356,13 +356,13 @@ l l l l.
 0x000089F4     EQL_GETMASTRCFG struct ifreq *  // MORE // I-O
 0x000089F5     EQL_SETMASTRCFG struct ifreq *  // MORE // I-O
 .TE
-
+.sp 1
 // <include/linux/if_plip.h>
 .TS
 l l l l.
 0x000089F0     SIOCDEVPLIP     struct ifreq *  // I-O
 .TE
-
+.sp 1
 // <include/linux/if_ppp.h>
 .TS
 l l l.
@@ -382,7 +382,7 @@ l l l.
 0x0000549E     PPPIOCRASYNCMAP const int *
 0x0000549F     PPPIOCSMAXCID   const int *
 .TE
-
+.sp 1
 // <include/linux/ipx.h>
 .TS
 l l l.
@@ -390,7 +390,7 @@ l l l.
 0x000089E1     SIOCAIPXPRISLT  const char *
 0x000089E2     SIOCIPXCFGDATA  struct ipx_config_data *
 .TE
-
+.sp 1
 // <include/linux/kd.h>
 .TS
 l l l.
@@ -451,7 +451,7 @@ l l l l.
 0x00004B4D     KDSETKEYCODE    const struct kbkeycode *
 0x00004B4E     KDSIGACCEPT     int
 .TE
-
+.sp 1
 // <include/linux/lp.h>
 .TS
 l l l.
@@ -467,14 +467,14 @@ l l l.
 0x0000060C     LPRESET void
 0x0000060D     LPGETSTATS      struct lp_stats *
 .TE
-
+.sp 1
 // <include/linux/mroute.h>
 .TS
 l l l l.
 0x000089E0     SIOCGETVIFCNT   struct sioc_vif_req *   // I-O
 0x000089E1     SIOCGETSGCNT    struct sioc_sg_req *    // I-O
 .TE
-
+.sp 1
 // <include/linux/msdos_fs.h> see
 .BR ioctl_fat (2)
 .TS
@@ -485,7 +485,7 @@ l l l l.
 0x40047211     FAT_IOCTL_SET_ATTRIBUTES        const __u32 *
 0x80047213     FAT_IOCTL_GET_VOLUME_ID __u32 *
 .TE
-
+.sp 1
 // <include/linux/mtio.h>
 .TS
 l l l.
@@ -495,7 +495,7 @@ l l l.
 0x80206D04     MTIOCGETCONFIG  struct mtconfiginfo *
 0x40206D05     MTIOCSETCONFIG  const struct mtconfiginfo *
 .TE
-
+.sp 1
 // <include/linux/netrom.h>
 .TS
 l l l l.
@@ -504,7 +504,7 @@ l l l l.
 0x000089E2     SIOCNRDECOBS    void
 0x000089E3     SIOCNRRTCTL     const int *
 .TE
-
+.sp 1
 // <include/uapi/linux/wireless.h>
 .br
 // This API is deprecated.
@@ -568,14 +568,14 @@ x00008b34 SIOCSIWENCODEEXT        struct iwreq *
 x00008b35      SIOCGIWENCODEEXT        struct iwreq *
 x00008b36      SIOCSIWPMKSA    struct iwreq *
 .TE
-
+.sp 1
 // <include/linux/sbpcd.h>
 .TS
 l l l.
 0x00009000     DDIOCSDBG       const int *
 0x00005382     CDROMAUDIOBUFSIZ        int
 .TE
-
+.sp 1
 // <include/linux/scc.h>
 .TS
 l l l l.
@@ -585,7 +585,7 @@ l l l l.
 0x00005473     TIOCSKISS       const struct ioctl_command *
 0x00005474     TIOCSCCSTAT     struct scc_stat *
 .TE
-
+.sp 1
 // <include/linux/scsi.h>
 .TS
 l l l.
@@ -597,16 +597,16 @@ l l l.
 l l l l.
 0x00005385     SCSI_IOCTL_PROBE_HOST   const int *     // MORE
 .TE
-
+.sp 1
 // <include/linux/smb_fs.h>
 .TS
 l l l.
 0x80027501     SMB_IOC_GETMOUNTUID     uid_t *
 .TE
-
+.sp 1
 // <include/uapi/linux/sockios.h> see
 .BR netdevice (7)
-
+.PP
 .TS
 l l l l.
 0x0000890B     SIOCADDRT       const struct rtentry *  // MORE
@@ -653,7 +653,7 @@ l l l l.
 0x00008970     SIOCGIFMAP      struct ifreq *  // I-O
 0x00008971     SIOCSIFMAP      const struct ifreq *
 .TE
-
+.sp 1
 // <include/linux/soundcard.h>
 .TS
 l l l.
@@ -803,14 +803,14 @@ l l l l.
 0xC0044D1E     SOUND_MIXER_WRITE_LOUD  int *   // I-O
 0xC0044DFF     SOUND_MIXER_WRITE_RECSRC        int *   // I-O
 .TE
-
+.sp 1
 // <include/linux/timerfd.h> see
 .BR timerfd_create (2)
 .TS
 l l l l.
 0x40085400     TFD_IOC_SET_TICKS       uint64_t *
 .TE
-
+.sp 1
 // <include/linux/umsdos_fs.h>
 .TS
 l l l l.
@@ -826,7 +826,7 @@ l l l l.
 0x000004DB     UMSDOS_DOS_SETUP        const struct umsdos_ioctl *
 0x000004DC     UMSDOS_RENAME_DOS       const struct umsdos_ioctl *
 .TE
-
+.sp 1
 // <include/linux/vt.h>
 .TS
 l l l.
@@ -842,12 +842,12 @@ l l l.
 0x00005609     VT_RESIZE       const struct vt_sizes *
 0x0000560A     VT_RESIZEX      const struct vt_consize *
 .TE
-
+.sp 1
 // More arguments.
 Some ioctl's take a pointer to a structure which contains additional
 pointers.
 These are documented here in alphabetical order.
-
+.PP
 .B CDROMREADAUDIO
 takes an input pointer
 .IR "const struct cdrom_read_audio\ *" .
@@ -855,7 +855,7 @@ The
 .I buf
 field points to an output buffer of length
 .IR "nframes\ * CD_FRAMESIZE_RAW" .
-
+.PP
 .BR CDROMREADCOOKED ,
 .BR CDROMREADMODE1 ,
 .BR CDROMREADMODE2 ,
@@ -916,7 +916,7 @@ is nonzero, then
 .I data
 points to an output buffer of length
 .IR length .
-
+.PP
 .B GIO_FONTX
 and
 .B PIO_FONTX
@@ -932,7 +932,7 @@ This is an output buffer for
 .B GIO_FONTX
 and an input buffer for
 .BR PIO_FONTX .
-
+.PP
 .B GIO_UNIMAP
 and
 .B PIO_UNIMAP
@@ -948,17 +948,17 @@ This is an output buffer for
 .B GIO_UNIMAP
 and an input buffer for
 .BR PIO_UNIMAP .
-
+.PP
 KDADDIO, KDDELIO, KDDISABIO, and KDENABIO enable or disable access to
 I/O ports.
 They are essentially alternate interfaces to 'ioperm'.
-
+.PP
 .B KDMAPDISP
 and
 .B KDUNMAPDISP
 enable or disable memory mappings or I/O port access.
 They are not implemented in the kernel.
-
+.PP
 .B SCSI_IOCTL_PROBE_HOST
 takes an input pointer
 .IR "const int\ *" ,
@@ -966,7 +966,7 @@ which is a length.
 It uses the same pointer as an output pointer to a
 .I char []
 buffer of this length.
-
+.PP
 .B SIOCADDRT
 and
 .B SIOCDELRT
@@ -989,7 +989,7 @@ field points to a buffer of length
 .I ifc_len
 bytes, into which the kernel writes a list of type
 .IR "struct ifreq []" .
-
+.PP
 .B SIOCSIFHWADDR
 takes an input pointer whose type depends on the protocol:
 .nf
@@ -1023,7 +1023,7 @@ is implicitly defined in
 
 .fi
 // Duplicate ioctls
-
+.PP
 This list does not include ioctls in the range
 .B SIOCDEVPRIVATE
 and
index 99388d80d767d8ff1a24037dea66cfa072ff1a2a..8946a10caacab2ae3f1d46e4e15c526459114612 100644 (file)
@@ -38,8 +38,8 @@ and
 .BR pid_namespaces (7)).
 The form of the calls is:
 .PP
-.nf
 .in +4n
+.nf
 new_fd = ioctl(fd, request);
 .fi
 .in
@@ -124,8 +124,8 @@ operation (available since Linux 4.11) can be used to discover
 the type of namespace referred to by the file descriptor
 .IR fd :
 .PP
-.nf
 .in +4n
+.nf
 nstype = ioctl(fd, NS_GET_NSTYPE);
 .fi
 .in
@@ -153,8 +153,8 @@ the owner user ID of a user namespace (i.e., the effective user ID
 of the process that created the user namespace).
 The form of the call is:
 .PP
-.nf
 .in +4n
+.nf
 uid_t uid;
 ioctl(fd, NS_GET_OWNER_UID, &uid);
 .fi
@@ -197,40 +197,40 @@ of this program.
 Trying to get the parent of the initial user namespace fails,
 since it has no parent:
 .PP
-.nf
 .in +4n
+.nf
 $ \fB./ns_show /proc/self/ns/user p\fP
 The parent namespace is outside your namespace scope
-.in
 .fi
+.in
 .PP
 Create a process running
 .BR sleep (1)
 that resides in new user and UTS namespaces,
 and show that the new UTS namespace is associated with the new user namespace:
 .PP
-.nf
 .in +4n
+.nf
 $ \fBunshare \-Uu sleep 1000 &\fP
 [1] 23235
 $ \fB./ns_show /proc/23235/ns/uts u\fP
 Device/Inode of owning user namespace is: [0,3] / 4026532448
 $ \fBreadlink /proc/23235/ns/user \fP
 user:[4026532448]
-.in
 .fi
+.in
 .PP
 Then show that the parent of the new user namespace in the preceding
 example is the initial user namespace:
 .PP
-.nf
 .in +4n
+.nf
 $ \fBreadlink /proc/self/ns/user\fP
 user:[4026531837]
 $ \fB./ns_show /proc/23235/ns/user p\fP
 Device/Inode of parent namespace is: [0,3] / 4026531837
-.in
 .fi
+.in
 .PP
 Start a shell in a new user namespace, and show that from within
 this shell, the parent user namespace can't be discovered.
@@ -238,15 +238,15 @@ Similarly, the UTS namespace
 (which is associated with the initial user namespace)
 can't be discovered.
 .PP
-.nf
 .in +4n
+.nf
 $ \fBPS1="sh2$ " unshare \-U bash\fP
 sh2$ \fB./ns_show /proc/self/ns/user p\fP
 The parent namespace is outside your namespace scope
 sh2$ \fB./ns_show /proc/self/ns/uts u\fP
 The owning user namespace is outside your namespace scope
-.in
 .fi
+.in
 .SS Program source
 \&
 .EX
index 60ed25e011cc53bdd625a7d0d24fab45a23df112..d7d8b6f6636f07e890fc0fb8fe457ff6f0ce0491 100644 (file)
@@ -328,8 +328,8 @@ The program tests different cases for the file descriptor pairs,
 as described in the program output.
 An example run of the program is as follows:
 .PP
-.nf
 .in +4n
+.nf
 $ \fB./a.out\fP
 Parent PID is 1144
 Parent opened file on FD 3
@@ -343,8 +343,8 @@ Child opened file on FD 4
 Child duplicated FD 3 to create FD 5
        Compare duplicated FDs in same process:
                kcmp(1145, 1145, KCMP_FILE, 3, 5) ==> same
-.in
 .fi
+.in
 .SS Program source
 \&
 .EX
index 5f9ad70f5f281b0eb5493fd4e81a6ccd1fd6e276..2ec15635d9f1bfde45cfd8193753d1b3f70a69da 100644 (file)
@@ -117,9 +117,9 @@ The
 argument is an array of
 .I kexec_segment
 structures which define the kernel layout:
+.PP
 .in +4n
-.nf
-
+.EX
 struct kexec_segment {
     void   *buf;        /* Buffer in user space */
     size_t  bufsz;      /* Buffer length in user space */
index 238e7d70869c01c4580c68adcf97c3f0375098ca..3e8779f451c7d1c806caa0ebd052332f14af028c 100644 (file)
@@ -1423,16 +1423,16 @@ serial numbers for three
 keys used in the Diffie-Hellman calculation,
 packaged in a structure of the following form:
 .IP
-.nf
 .in +4n
+.nf
 struct keyctl_dh_params {
     int32_t private; /* The local private key */
     int32_t prime; /* The prime, known to both parties */
     int32_t base;  /* The base integer: either a shared
                       generator or the remote public key */
 };
-.in
 .fi
+.in
 .IP
 Each of the three keys specified in this structure must grant the caller
 .I read
@@ -1708,22 +1708,22 @@ we use the example program shown in
 .BR request_key (2)
 to request a key.
 .PP
-.nf
 .in +4n
+.nf
 $ \fBcc \-o key_instantiate key_instantiate.c \-lkeyutils\fP
 $ \fBsudo mv /sbin/request\-key /sbin/request\-key.backup\fP
 $ \fBsudo cp key_instantiate /sbin/request\-key\fP
 $ \fB./t_request_key user mykey somepayloaddata\fP
 Key ID is 20d035bf
 $ \fBsudo mv /sbin/request\-key.backup /sbin/request\-key\fP
-.in
 .fi
+.in
 .PP
 Looking at the log file created by this program,
 we can see the command-line arguments supplied to our example program:
 .PP
-.nf
 .in +4n
+.nf
 $ \fBcat /tmp/key_instantiate.log \fP
 Time: Mon Nov  7 13:06:47 2016
 
@@ -1741,8 +1741,8 @@ Key description:      user;1000;1000;3f010000;mykey
 Auth key payload:     somepayloaddata
 Destination keyring:  256e6a6
 Auth key description: .request_key_auth;1000;1000;0b010000;20d035bf
-.in
 .fi
+.in
 .PP
 The last few lines of the above output show that the example program
 was able to fetch:
@@ -1779,13 +1779,13 @@ we can also see the newly created key with the name
 and ID
 .IR 20d035bf .
 .PP
-.nf
 .in +4n
+.nf
 $ \fBcat /proc/keys | egrep \(aqmykey|256e6a6\(aq\fP
 0256e6a6 I\-\-Q\-\-\-  194 perm 3f030000  1000  1000 keyring  _ses: 3
 20d035bf I\-\-Q\-\-\-    1 perm 3f010000  1000  1000 user     mykey: 16
-.in
 .fi
+.in
 .SS Program source
 \&
 .EX
index 7d5e6d34efce6ccc747b3e273935378e7256e9a4..26b2199b95457cd933a3485ad6259f3619f385df 100644 (file)
@@ -169,12 +169,12 @@ this can be used as an alternative to
 .BR AT_EMPTY_PATH ,
 like this:
 .IP
-.nf
 .in +4n
+.nf
 linkat(AT_FDCWD, "/proc/self/fd/<fd>", newdirfd,
        newname, AT_SYMLINK_FOLLOW);
-.in
 .fi
+.in
 .PP
 Before kernel 2.6.18, the
 .I flags
index 4b2c389dda894b52874b7b978898aeb101689a6d..62a1a4dc587ff0f8eed7b8060a62a94ccb383755 100644 (file)
@@ -262,12 +262,12 @@ field exposed by
 .IR /proc/meminfo .)
 Thus, the above two constants are defined as:
 .IP
-.nf
 .in +4n
+.nf
 #define MAP_HUGE_2MB    (21 << MAP_HUGE_SHIFT)
 #define MAP_HUGE_1GB    (30 << MAP_HUGE_SHIFT)
-.in
 .fi
+.in
 .IP
 The range of huge page sizes that are supported by the system
 can be discovered by listing the subdirectories in
index 256d83c2d4e9b6f641b14ba41cc0f9f5868a09cd..3b6eb03990258201bf55b1c1811a12ed325ec40f 100644 (file)
@@ -74,9 +74,9 @@ must equal the size of this structure.
 The
 .I user_desc
 structure is defined in \fI<asm/ldt.h>\fP as:
+.PP
 .in +4n
-.nf
-
+.EX
 struct user_desc {
     unsigned int  entry_number;
     unsigned long base_addr;
index 620c0145361bbefabc1072679735398774bc6552..97f3457f23c9042b14d3a00b0c3a1b10139fa2f1 100644 (file)
@@ -55,9 +55,9 @@ on the System\ V message queue with identifier
 The
 .I msqid_ds
 data structure is defined in \fI<sys/msg.h>\fP as follows:
-.nf
+.PP
 .in +4n
-
+.EX
 struct msqid_ds {
     struct ipc_perm msg_perm;     /* Ownership and permissions */
     time_t          msg_stime;    /* Time of last msgsnd(2) */
@@ -72,8 +72,8 @@ struct msqid_ds {
     pid_t           msg_lspid;    /* PID of last msgsnd(2) */
     pid_t           msg_lrpid;    /* PID of last msgrcv(2) */
 };
-.in
 .fi
+.in
 .PP
 The
 .I ipc_perm
@@ -81,8 +81,8 @@ structure is defined as follows
 (the highlighted fields are settable using
 .BR IPC_SET ):
 .PP
-.nf
 .in +4n
+.nf
 struct ipc_perm {
     key_t          __key;       /* Key supplied to msgget(2) */
     uid_t          \fBuid\fP;         /* Effective UID of owner */
@@ -92,8 +92,8 @@ struct ipc_perm {
     unsigned short \fBmode\fP;        /* Permissions */
     unsigned short __seq;       /* Sequence number */
 };
-.in
 .fi
+.in
 .PP
 Valid values for
 .I cmd
@@ -161,9 +161,9 @@ defined in
 if the
 .B _GNU_SOURCE
 feature test macro is defined:
-.nf
+.IP
 .in +4n
-
+.EX
 struct msginfo {
     int msgpool; /* Size in kibibytes of buffer pool
                     used to hold message data;
@@ -185,9 +185,9 @@ struct msginfo {
                  /* Maximum number of segments;
                     unused within kernel */
 };
-
+.EE
 .in
-.fi
+.IP
 The
 .IR msgmni ,
 .IR msgmax ,
index 3a6e351a218cadfcfbb04cbdf911031873e7262d..f26572a82485c603c656dcaba076c4fc7550dd56 100644 (file)
@@ -54,16 +54,16 @@ to perform I/O.
 The set of file descriptors to be monitored is specified in the
 .I fds
 argument, which is an array of structures of the following form:
+.PP
 .in +4n
-.nf
-
+.EX
 struct pollfd {
     int   fd;         /* file descriptor */
     short events;     /* requested events */
     short revents;    /* returned events */
 };
-.in
 .fi
+.in
 .PP
 The caller should specify the number of items in the
 .I fds
@@ -308,9 +308,9 @@ argument specifies an upper limit on the amount of time that
 .BR ppoll ()
 will block.
 This argument is a pointer to a structure of the following form:
+.PP
 .in +4n
-.nf
-
+.EX
 struct timespec {
     long    tv_sec;         /* seconds */
     long    tv_nsec;        /* nanoseconds */
index 143ab1033aff2a0e9ede2d7bf9a64f5d80e1668d..299cf138fda307e21424578565dae5cabe42b581 100644 (file)
@@ -78,9 +78,9 @@ Returns the symbols and values exported by the kernel or the indicated
 module.
 The returned buffer is an array of structures of the following form
 .\" ret is set on ENOSPC
+.IP
 .in +4n
-.nf
-
+.EX
 struct module_symbol {
     unsigned long value;
     unsigned long name;
@@ -99,9 +99,9 @@ is set to the number of symbols.
 .B QM_INFO
 Returns miscellaneous information about the indicated module.
 The output buffer format is:
+.IP
 .in +4n
-.nf
-
+.EX
 struct module_info {
     unsigned long address;
     unsigned long size;
index 73ac899d8eed5615589fcef71b3fdfa04d576b01..ce987129dc1c7604411406fb7a505fa4fbd0ec7f 100644 (file)
@@ -141,9 +141,9 @@ argument is a pointer to a
 structure defined in
 .IR <sys/quota.h>
 as follows:
+.IP
 .in +4n
-.nf
-
+.EX
 /* uint64_t is an unsigned 64\-bit integer;
    uint32_t is an unsigned 32\-bit integer */
 
@@ -180,9 +180,9 @@ struct dqblk {      /* Definition since Linux 2.4.22 */
 #define QIF_USAGE     (QIF_SPACE | QIF_INODES)
 #define QIF_TIMES     (QIF_BTIME | QIF_ITIME)
 #define QIF_ALL       (QIF_LIMITS | QIF_USAGE | QIF_TIMES)
-
-.fi
+.EE
 .in
+.IP
 The
 .I dqb_valid
 field is a bit mask that is set to indicate the entries in the
@@ -217,8 +217,8 @@ except for the addition of a
 field that is used to return the ID for which
 quota information is being returned:
 .IP
-.nf
 .in +4n
+.nf
 struct nextdqblk {
     uint64_t dqb_bhardlimit;
     uint64_t dqb_bsoftlimit;
@@ -231,8 +231,8 @@ struct nextdqblk {
     uint32_t dqb_valid;
     uint32_t dqb_id;
 };
-.in
 .fi
+.in
 .TP
 .B Q_SETQUOTA
 Set quota information for user or group
@@ -264,9 +264,9 @@ structure.
 This structure is defined in
 .IR <sys/quota.h>
 as follows:
+.IP
 .in +4n
-.nf
-
+.EX
 /* uint64_t is an unsigned 64\-bit integer;
    uint32_t is an unsigned 32\-bit integer */
 
@@ -300,9 +300,9 @@ struct dqinfo {         /* Defined since kernel 2.4.22 */
 #define IIF_IGRACE  2
 #define IIF_FLAGS   4
 #define IIF_ALL     (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)
-
-.fi
+.EE
 .in
+.IP
 The
 .I dqi_valid
 field in the
@@ -393,8 +393,8 @@ to be a pointer to an
 that contains a combination of the following flags (defined in
 .IR <xfs/xqm.h> ):
 .IP
-.nf
 .in +4n
+.nf
 #define XFS_QUOTA_UDQ_ACCT (1<<0) /* User quota
                                      accounting */
 #define XFS_QUOTA_UDQ_ENFD (1<<1) /* User quota limits
@@ -407,8 +407,8 @@ that contains a combination of the following flags (defined in
                                      accounting */
 #define XFS_QUOTA_PDQ_ENFD (1<<5) /* Project quota limits
                                      enforcement */
-.in
 .fi
+.in
 .IP
 This operation requires privilege
 .RB ( CAP_SYS_ADMIN ).
@@ -443,8 +443,8 @@ structure, which is defined in
 .I <xfs/xqm.h>
 as follows:
 .IP
-.nf
 .in +4n
+.nf
 /* All the blk units are in BBs (Basic Blocks) of
    512 bytes. */
 
@@ -490,8 +490,8 @@ struct fs_disk_quota {
     int16_t  d_padding3;  /* Padding - for future use */
     char     d_padding4[8];   /* Yet more padding */
 };
-.in
 .fi
+.in
 .IP
 Unprivileged users may retrieve only their own quotas;
 a privileged user
@@ -542,8 +542,8 @@ The
 .I fs_quota_stat
 structure itself is defined as follows:
 .IP
-.nf
 .in +4n
+.nf
 #define FS_QSTAT_VERSION 1  /* fs_quota_stat.qs_version */
 
 struct fs_qfilestat {
@@ -570,8 +570,8 @@ struct fs_quota_stat {
     uint16_t qs_bwarnlimit;  /* Limit for # of warnings */
     uint16_t qs_iwarnlimit;  /* Limit for # of warnings */
 };
-.in
 .fi
+.in
 .IP
 The
 .I id
@@ -591,8 +591,8 @@ The
 .I fs_quota_statv
 structure itself is defined as follows:
 .IP
-.nf
 .in +4n
+.nf
 #define FS_QSTATV_VERSION1 1 /* fs_quota_statv.qs_version */
 
 struct fs_qfilestatv {
@@ -623,8 +623,8 @@ struct fs_quota_statv {
     uint16_t qs_iwarnlimit;   /* Limit for # of warnings */
     uint64_t qs_pad2[8];      /* For future proofing */
 };
-.in
 .fi
+.in
 .IP
 The
 .I qs_version
index baff6067dacf6947e4fa7452fcd0bd4927964e71..48dd1f48a0867717bef580759377491c96881a01 100644 (file)
@@ -168,9 +168,9 @@ is supplied via
 The error is supplied in a
 .I sock_extended_err
 structure:
+.IP
 .in +4n
-.nf
-
+.EX
 #define SO_EE_ORIGIN_NONE    0
 #define SO_EE_ORIGIN_LOCAL   1
 #define SO_EE_ORIGIN_ICMP    2
@@ -323,9 +323,9 @@ call uses a
 structure to minimize the number of directly supplied arguments.
 This structure is defined as follows in
 .IR <sys/socket.h> :
+.PP
 .in +4n
-.nf
-
+.EX
 struct iovec {                    /* Scatter/gather array items */
     void  *iov_base;              /* Starting address */
     size_t iov_len;               /* Number of bytes to transfer */
@@ -380,9 +380,9 @@ upon return from a successful call it will contain the length
 of the control message sequence.
 .PP
 The messages are of the form:
+.PP
 .in +4n
-.nf
-
+.EX
 struct cmsghdr {
     size_t cmsg_len;    /* Data byte count, including header
                            (type is socklen_t in POSIX) */
index bff296abbbf346ee1176fdd5e4d22913fd03183a..ed1a50283dc9f7b221ad2d075023104f296a4de9 100644 (file)
@@ -191,9 +191,9 @@ timeout specified has expired.
 .PP
 The following snippet periodically generates UDP datagrams
 containing a random number:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$" " while true; do echo $RANDOM > /dev/udp/127.0.0.1/1234; "
 .B      "      sleep 0.25; done"
 .fi
@@ -201,9 +201,9 @@ containing a random number:
 .PP
 These datagrams are read by the example application, which
 can give the following output:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$" " ./a.out"
 5 messages received
 1 11782
index 9c866597ebe98bd76fc3397bf6058658cc91e48a..661dbe10922cbaa8c51ca46c6958af85a42e450c 100644 (file)
@@ -50,15 +50,15 @@ The scheduling parameters are specified in the
 .I param
 argument, which is a pointer to a structure of the following form:
 .PP
-.nf
 .in +4n
+.nf
 struct sched_param {
     ...
     int sched_priority;
     ...
 };
-.in
 .fi
+.in
 .PP
 In the current implementation, the structure contains only one field,
 .IR sched_priority .
index d10753329696fa33308448b213a6f1ea5c53ea91..6332c1c86a7ba476c6a191f18697713e17677973 100644 (file)
@@ -663,28 +663,28 @@ First, we display the architecture that we are running on (x86-64)
 and then construct a shell function that looks up system call
 numbers on this architecture:
 .PP
-.nf
 .in +4n
+.nf
 $ \fBuname -m\fP
 x86_64
 $ \fBsyscall_nr() {
     cat /usr/src/linux/arch/x86/syscalls/syscall_64.tbl | \\
     awk '$2 != "x32" && $3 == "'$1'" { print $1 }'
 }\fP
-.in
 .fi
+.in
 .PP
 When the BPF filter rejects a system call (case [2] above),
 it causes the system call to fail with the error number
 specified on the command line.
 In the experiments shown here, we'll use error number 99:
 .PP
-.nf
 .in +4n
+.nf
 $ \fBerrno 99\fP
 EADDRNOTAVAIL 99 Cannot assign requested address
-.in
 .fi
+.in
 .PP
 In the following example, we attempt to run the command
 .BR whoami (1),
@@ -692,8 +692,8 @@ but the BPF filter rejects the
 .BR execve (2)
 system call, so that the command is not even executed:
 .PP
-.nf
 .in +4n
+.nf
 $ \fBsyscall_nr execve\fP
 59
 $ \fB./a.out\fP
@@ -702,8 +702,8 @@ Hint for <arch>: AUDIT_ARCH_I386: 0x40000003
                  AUDIT_ARCH_X86_64: 0xC000003E
 $ \fB./a.out 59 0xC000003E 99 /bin/whoami\fP
 execv: Cannot assign requested address
-.in
 .fi
+.in
 .PP
 In the next example, the BPF filter rejects the
 .BR write (2)
@@ -711,27 +711,27 @@ system call, so that, although it is successfully started, the
 .BR whoami (1)
 command is not able to write output:
 .PP
-.nf
 .in +4n
+.nf
 $ \fBsyscall_nr write\fP
 1
 $ \fB./a.out 1 0xC000003E 99 /bin/whoami\fP
-.in
 .fi
+.in
 .PP
 In the final example,
 the BPF filter rejects a system call that is not used by the
 .BR whoami (1)
 command, so it is able to successfully execute and produce output:
 .PP
-.nf
 .in +4n
+.nf
 $ \fBsyscall_nr preadv\fP
 295
 $ \fB./a.out 295 0xC000003E 99 /bin/whoami\fP
 cecilia
-.in
 .fi
+.in
 .SS Program source
 .EX
 #include <errno.h>
index 001915c543bdcf8118a2278fca7285c72f9b5d55..fa7ec0c89a18a68efce03069254a639d9c706121 100644 (file)
@@ -487,8 +487,8 @@ and the event notifications provided by
 (and
 .BR epoll (7)):
 .PP
-.nf
 .in +4n
+.nf
 #define POLLIN_SET (POLLRDNORM | POLLRDBAND | POLLIN | POLLHUP |
                     POLLERR)
                    /* Ready for reading */
@@ -496,8 +496,8 @@ and the event notifications provided by
                    /* Ready for writing */
 #define POLLEX_SET (POLLPRI)
                    /* Exceptional condition */
-.in
 .fi
+.in
 .\"
 .SS Multithreaded applications
 If a file descriptor being monitored by
@@ -561,9 +561,9 @@ struct {
     size_t ss_len;               /* Size (in bytes) of object
                                     pointed to by 'ss' */
 };
-
-.fi
+.EE
 .in
+.PP
 This allows the system call to obtain both
 a pointer to the signal set and its size,
 while allowing for the fact that most architectures
index dbd2a054ebab8d1efb071dc02f766b068ef5a8e6..129156c2bd5f6853a6296a47e033ca2dbf601253 100644 (file)
@@ -66,8 +66,8 @@ When there are four, the fourth has the type
 .IR "union semun" .
 The \fIcalling program\fP must define this union as follows:
 .PP
-.nf
 .in +4n
+.nf
 union semun {
     int              val;    /* Value for SETVAL */
     struct semid_ds *buf;    /* Buffer for IPC_STAT, IPC_SET */
@@ -75,23 +75,23 @@ union semun {
     struct seminfo  *__buf;  /* Buffer for IPC_INFO
                                 (Linux-specific) */
 };
-.in
 .fi
+.in
 .PP
 The
 .I semid_ds
 data structure is defined in \fI<sys/sem.h>\fP as follows:
-.nf
+.PP
 .in +4n
-
+.EX
 struct semid_ds {
     struct ipc_perm sem_perm;  /* Ownership and permissions */
     time_t          sem_otime; /* Last semop time */
     time_t          sem_ctime; /* Last change time */
     unsigned long   sem_nsems; /* No. of semaphores in set */
 };
-.in
 .fi
+.in
 .PP
 The
 .I ipc_perm
@@ -99,8 +99,8 @@ structure is defined as follows
 (the highlighted fields are settable using
 .BR IPC_SET ):
 .PP
-.nf
 .in +4n
+.nf
 struct ipc_perm {
     key_t          __key; /* Key supplied to semget(2) */
     uid_t          \fBuid\fP;   /* Effective UID of owner */
@@ -110,8 +110,8 @@ struct ipc_perm {
     unsigned short \fBmode\fP;  /* Permissions */
     unsigned short __seq; /* Sequence number */
 };
-.in
 .fi
+.in
 .PP
 Valid values for
 .I cmd
@@ -178,9 +178,9 @@ defined in
 if the
 .B _GNU_SOURCE
 feature test macro is defined:
-.nf
+.IP
 .in +4n
-
+.EX
 struct  seminfo {
     int semmap;  /* Number of entries in semaphore
                     map; unused within kernel */
@@ -200,9 +200,9 @@ struct  seminfo {
     int semaem;  /* Max. value that can be recorded for
                     semaphore adjustment (SEM_UNDO) */
 };
-
+.EE
 .in
-.fi
+.IP
 The
 .IR semmsl ,
 .IR semmns ,
index 2b641b93d2e1163873dfac1339dca44597829236..7b48407cf163f716c1d00c8786e4a59f65e13d06 100644 (file)
@@ -85,8 +85,8 @@ containing the following members:
 unsigned short sem_num;  /* semaphore number */
 short          sem_op;   /* semaphore operation */
 short          sem_flg;  /* operation flags */
-.in
 .fi
+.in
 .PP
 Flags recognized in
 .I sem_flg
index 2a754f22d3d438593a4f2b0b7b6c5e233447aed1..b20e7418bc39505dbf0fdc37af295c632b2b6836 100644 (file)
@@ -261,9 +261,9 @@ The definition of the
 structure employed by
 .BR sendmsg ()
 is as follows:
+.PP
 .in +4n
-.nf
-
+.EX
 struct msghdr {
     void         *msg_name;       /* optional address */
     socklen_t     msg_namelen;    /* size of address */
index ffc5b03b595221788c2d3b90ee8cdf103a4b335c..7c38c9370690eb9ffc008edccbc76fae2cbd536c 100644 (file)
@@ -29,8 +29,8 @@ Intel Software Developer's Manual or the AMD Architecture Programming Manual.
 Both of these system calls take an argument that is a pointer
 to a structure of the following type:
 .PP
-.nf
 .in +4n
+.nf
 struct user_desc {
     unsigned int  entry_number;
     unsigned long base_addr;
@@ -42,8 +42,8 @@ struct user_desc {
     unsigned int  seg_not_present:1;
     unsigned int  useable:1;
 };
-.in
 .fi
+.in
 .PP
 .BR get_thread_area ()
 reads the GDT entry indicated by
index 144fd2f48e0f0b7b34f5ef6128415e1f1bb619ce..90f377df75f58b39be3a37d12a7052d055cdf826 100644 (file)
@@ -236,8 +236,8 @@ The child changes the hostname in its namespace,
 and then both processes display the hostnames in their UTS namespaces,
 so that we can see that they are different.
 .PP
-.nf
 .in +4n
+.nf
 $ \fBsu\fP                   # Need privilege for namespace operations
 Password:
 # \fB./newuts bizarro &\fP
@@ -247,21 +247,21 @@ uts.nodename in child:  bizarro
 uts.nodename in parent: antero
 # \fBuname \-n\fP             # Verify hostname in the shell
 antero
-.in
 .fi
+.in
 .PP
 We then run the program shown below,
 using it to execute a shell.
 Inside that shell, we verify that the hostname is the one
 set by the child created by the first program:
 .PP
-.nf
 .in +4n
+.nf
 # \fB./ns_exec /proc/3550/ns/uts /bin/bash\fP
 # \fBuname \-n\fP             # Executed in shell started by ns_exec
 bizarro
-.in
 .fi
+.in
 .SS Program source
 .EX
 #define _GNU_SOURCE
index f6a82a8e5d7bd762fe7d06fc576aaccfc66659ff..aa22b7e8a6929af35a7857b9a30002de64ef364d 100644 (file)
@@ -175,9 +175,9 @@ defined in
 if the
 .B _GNU_SOURCE
 feature test macro is defined:
-.nf
+.IP
 .in +4n
-
+.EX
 struct shminfo {
     unsigned long shmmax; /* Maximum segment size */
     unsigned long shmmin; /* Minimum segment size;
@@ -189,9 +189,9 @@ struct shminfo {
     unsigned long shmall; /* Maximum number of pages of
                              shared memory, system-wide */
 };
-
+.EE
 .in
-.fi
+.IP
 The
 .IR shmmni ,
 .IR shmmax ,
@@ -213,9 +213,9 @@ This structure is defined in
 if the
 .B _GNU_SOURCE
 feature test macro is defined:
-.nf
+.IP
 .in +4n
-
+.EX
 struct shm_info {
     int           used_ids; /* # of currently existing
                                segments */
@@ -230,8 +230,8 @@ struct shm_info {
     unsigned long swap_successes;
                             /* Unused since Linux 2.4 */
 };
-.in
 .fi
+.in
 .TP
 .BR SHM_STAT " (Linux-specific)"
 Return a
index 499276fbbe24d4c9550d9b12486212cc26f5cd29..c29a7994ea8f569455dcd630249819d461711c00 100644 (file)
@@ -128,8 +128,8 @@ Thus, the above two constants are defined as:
 .in +4
 #define SHM_HUGE_2MB    (21 << SHM_HUGE_SHIFT)
 #define SHM_HUGE_1GB    (30 << SHM_HUGE_SHIFT)
-.in
 .fi
+.in
 .IP
 For some additional details,
 see the discussion of the similarly named constants in
index b6f1c4f2b3ab86b286b521d84bd2c79847bf7a4a..03e40b3fbc2f43b5a820762b3bece403d7d44855 100644 (file)
@@ -272,15 +272,15 @@ the signal handler address is passed via the
 field.
 This handler takes three arguments, as follows:
 .PP
-.nf
 .in +4n
+.nf
 void
 handler(int sig, siginfo_t *info, void *ucontext)
 {
     ...
 }
-.in
 .fi
+.in
 .PP
 The
 .I siginfo_t
index 801ff446c9e140deaed5bf6287c5e1a0dcf07a81..611470333390152e95c57c6fe6c4f35e941b67e3 100644 (file)
@@ -48,8 +48,8 @@ Until Linux 2.3.16,
 .BR sysinfo ()
 returned information in the following structure:
 .PP
-.nf
 .in +4n
+.nf
 struct sysinfo {
     long uptime;             /* Seconds since boot */
     unsigned long loads[3];  /* 1, 5, and 15 minute load averages */
@@ -62,8 +62,8 @@ struct sysinfo {
     unsigned short procs;    /* Number of current processes */
     char _f[22];             /* Pads structure to 64 bytes */
 };
-.in
 .fi
+.in
 .PP
 In the above structure, the sizes of the memory and swap fields
 are given in bytes.
@@ -71,8 +71,8 @@ are given in bytes.
 Since Linux 2.3.23 (i386) and Linux 2.3.48
 (all architectures) the structure is:
 .PP
-.nf
 .in +4n
+.nf
 struct sysinfo {
     long uptime;             /* Seconds since boot */
     unsigned long loads[3];  /* 1, 5, and 15 minute load averages */
@@ -89,8 +89,8 @@ struct sysinfo {
     char _f[20\-2*sizeof(long)\-sizeof(int)];
                              /* Padding to 64 bytes */
 };
-.in
 .fi
+.in
 .PP
 In the above structure,
 sizes of the memory and swap fields are given as multiples of
index 8d37f9b8c5f29a5eaaeec46c379e67fee5efe327..b1535aac5c0c5e8f02564eabe40cff5dc9ad2d63 100644 (file)
@@ -331,9 +331,9 @@ In the following example run, the program sleeps for 1 second,
 after creating a timer that has a frequency of 100 nanoseconds.
 By the time the signal is unblocked and delivered,
 there have been around ten million overruns.
+.PP
 .in +4n
-.nf
-
+.EX
 $ \fB./a.out 1 100\fP
 Establishing handler for signal 34
 Blocking signal 34
index 069f3d91eab6eccf6d3393d20a29fce5911a83c5..785c7449f6308ef904598bc3c502e5fbe1e02d94 100644 (file)
@@ -152,9 +152,9 @@ The
 structure used for this argument contains two fields,
 each of which is in turn a structure of type
 .IR timespec :
+.PP
 .in +4n
-.nf
-
+.EX
 struct timespec {
     time_t tv_sec;                /* Seconds */
     long   tv_nsec;               /* Nanoseconds */
@@ -482,9 +482,9 @@ allow the timer to expire before terminating.
 The second and third command-line arguments are optional.
 .PP
 The following shell session demonstrates the use of the program:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$" " a.out 3 1 100"
 0.000: timer started
 3.000: read: 1; total=1
index 225e1aacc87292059b356c061269b990f38362f9..945f0109ff84484416e850e0929a696f172fd20e 100644 (file)
@@ -39,9 +39,9 @@ The
 .I utsname
 struct is defined in
 .IR <sys/utsname.h> :
+.PP
 .in +4n
-.nf
-
+.EX
 struct utsname {
     char sysname[];    /* Operating system name (e.g., "Linux") */
     char nodename[];   /* Name within "some implementation-defined
@@ -53,9 +53,9 @@ struct utsname {
     char domainname[]; /* NIS or YP domain name */
 #endif
 };
-
-.fi
+.EE
 .in
+.PP
 The length of the arrays in a
 .I struct utsname
 is unspecified (see NOTES);
index c27819569cbbcb7b8e87cb6afae15403001e7e1f..515560255e6e6a723b6af557de118afe37590a98 100644 (file)
@@ -402,9 +402,9 @@ Here's an example of the use of this program,
 running a shell in a new mount namespace,
 and verifying that the original shell and the
 new shell are in separate mount namespaces:
+.PP
 .in +4n
-.nf
-
+.EX
 $ \fBreadlink /proc/$$/ns/mnt\fP
 mnt:[4026531840]
 $ \fBsudo ./unshare -m /bin/bash\fP
index 52dd56537d63086aad4b04c5493b8bc74bbee6c4..253460fbb6fda187bdef2c8aee8883a2559d9f5b 100644 (file)
@@ -195,8 +195,8 @@ from the userfaultfd file descriptor returns one or more
 structures, each of which describes a page-fault event
 or an event required for the non-cooperative userfaultfd usage:
 .PP
-.nf
 .in +4n
+.nf
 struct uffd_msg {
     __u8  event;            /* Type of event */
     ...
@@ -226,8 +226,8 @@ struct uffd_msg {
 
     /* Padding fields omitted */
 } __packed;
-.in
 .fi
+.in
 .PP
 If multiple events are available and the supplied buffer is large enough,
 .BR read (2)
@@ -481,8 +481,8 @@ operation.
 .PP
 The following is an example of what we see when running the program:
 .PP
-.nf
 .in +4n
+.nf
 $ \fB./userfaultfd_demo 3\fP
 Address returned by mmap() = 0x7fd30106c000
 
@@ -512,8 +512,8 @@ Read address 0x7fd30106e00f in main(): C
 Read address 0x7fd30106e40f in main(): C
 Read address 0x7fd30106e80f in main(): C
 Read address 0x7fd30106ec0f in main(): C
-.in
 .fi
+.in
 .SS Program source
 \&
 .EX
index fe5ce08cdada27ff590529367af394b60653be2b..fdd09c1e5897ab7fcacbb03199e4433238451a94 100644 (file)
@@ -51,9 +51,9 @@ is a pointer to a
 .I ustat
 structure that contains the following
 members:
+.PP
 .in +4n
-.nf
-
+.EX
 daddr_t f_tfree;      /* Total free blocks */
 ino_t   f_tinode;     /* Number of free inodes */
 char    f_fname[6];   /* Filsys name */
index 81c5f28804bf4feba455f30de5777b802e45ff1e..5d2a317fac442d649709e5b7381982fa87cc1c42 100644 (file)
@@ -98,9 +98,9 @@ Each of the elements of
 specifies a time as the number of seconds and nanoseconds
 since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
 This information is conveyed in a structure of the following form:
+.PP
 .in +4n
-.nf
-
+.EX
 struct timespec {
     time_t tv_sec;        /* seconds */
     long   tv_nsec;       /* nanoseconds */
index 018266e8fb55302366df16e091e91bf0f5c8d46b..6c23a92e340a4b922bc22d286a6be0d9bc4fea5a 100644 (file)
@@ -68,8 +68,8 @@ struct iovec {
     void  *iov_base;        /* Starting address */
     size_t iov_len;         /* Number of bytes */
 };
-.in
 .fi
+.in
 .PP
 The
 .I flags
index f50a8a665ce4aceb148b59458e65f252ad14feb0..cb940967bd6ecdedfad087e44678a54551404edd 100644 (file)
@@ -601,9 +601,9 @@ The parent process executes a loop that monitors the child using
 and uses the W*() macros described above to analyze the wait status value.
 .PP
 The following shell session demonstrates the use of the program:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$" " ./a.out &"
 Child PID is 32360
 [1] 32359
index a7698bed068bc36cb73c76f3ebdfaec0d8d8ac61..89918faa764d9716420658a8eb97360793be4355 100644 (file)
@@ -51,9 +51,9 @@ The amount of time by which the clock is to be adjusted is specified
 in the structure pointed to by
 .IR delta .
 This structure has the following form:
+.PP
 .in +4n
-.nf
-
+.EX
 struct timeval {
     time_t      tv_sec;     /* seconds */
     suseconds_t tv_usec;    /* microseconds */
index dbdb2612b683e16b9538f5dd1a9793327885a54a..f96edb7c1f156849a62fca91ca87ce41acec021e 100644 (file)
@@ -187,9 +187,9 @@ and
 .BR backtrace_symbols ().
 The following shell session shows what we might see when running the
 program:
-.nf
+.PP
 .in +4n
-
+.EX
 .RB "$" " cc \-rdynamic prog.c \-o prog"
 .RB "$" " ./prog 3"
 backtrace() returned 8 addresses
@@ -201,8 +201,8 @@ backtrace() returned 8 addresses
 \&./prog(main+0x65) [0x80488fb]
 \&/lib/libc.so.6(__libc_start_main+0xdc) [0xb7e38f9c]
 \&./prog [0x8048711]
-.in
 .fi
+.in
 .SS Program source
 \&
 .EX
index af6d886750351df4a25fa6b47c638c52ff7a25c6..ae06eb430492974c637e9e0774783f515ca6b484 100644 (file)
@@ -47,12 +47,12 @@ The program below swaps the bytes of the 8-byte integer supplied as
 its command-line argument.
 The following shell session demonstrates the use of the program:
 .PP
-.nf
 .in +4n
+.nf
 $ \fB./a.out 0x0123456789abcdef\fP
 0x123456789abcdef ==> 0xefcdab8967452301
-.in
 .fi
+.in
 .SS Program source
 \&
 .EX
index 8e9c7fb31ec9f34327e3fec7a30454e492d065b5..8984f8b706bddedfde92eaded448659a8e397f0a 100644 (file)
@@ -68,9 +68,9 @@ The btree access-method-specific data structure provided to
 is defined in the
 .I <db.h>
 include file as follows:
+.PP
 .in +4n
-.nf
-
+.EX
 typedef struct {
     unsigned long flags;
     unsigned int  cachesize;
index 4ac7c5363e7e8a3e4c9cd058b3758008e2a9cfbe..cc77f3c6c7a9474208f8112a06a007d38d14337e 100644 (file)
@@ -116,9 +116,9 @@ and then uses
 .BR clock_gettime (2)
 to obtain the time on that clock.
 An example run is the following:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$" " ./a.out 1" "                 # Show CPU clock of init process"
 CPU-time clock for PID 1 is 2.213466748 seconds
 .fi
index 9178e59b504b40ad93ad375c16df3f692fde1db4..797dfcb03d85ca309f8dbb749af2da84de50128e 100644 (file)
@@ -144,9 +144,9 @@ POSIX.1-2001, POSIX.1-2008.
 The following code fragment determines the path where to find
 the POSIX.2 system utilities:
 .br
-.nf
+.PP
 .in +4n
-
+.EX
 char *pathbuf;
 size_t n;
 
@@ -155,8 +155,8 @@ pathbuf = malloc(n);
 if (pathbuf == NULL)
     abort();
 confstr(_CS_PATH, pathbuf, n);
-.in
 .fi
+.in
 .SH SEE ALSO
 .BR getconf (1),
 .BR sh (1),
index b583d69ba4f28f1fa2be8819a10904072957d87f..98efbaf38e2b3c421c7bcea817de395144c23a6f 100644 (file)
@@ -453,9 +453,9 @@ and 0 on success.
 .SS Key/data pairs
 Access to all file types is based on key/data pairs.
 Both keys and data are represented by the following data structure:
+.PP
 .in +4n
-.nf
-
+.EX
 typedef struct {
     void  *data;
     size_t size;
index d0e88ca39f93da12df4c02315d006f422e63c7d1..8e8fcfe7bab4c1d2cc0bfebca5bd927051c2eeeb 100644 (file)
@@ -146,9 +146,9 @@ The
 field indicates the size of this array.
 .PP
 These program headers are structures of the following form:
+.PP
 .in +4n
-.nf
-
+.EX
 typedef struct {
     Elf32_Word  p_type;    /* Segment type */
     Elf32_Off   p_offset;  /* Segment file offset */
@@ -176,8 +176,8 @@ include the following (see
 .IR <elf.h>
 for further details):
 .PP
-.nf
 .in +4n
+.nf
 #define PT_LOAD         1    /* Loadable program segment */
 #define PT_DYNAMIC      2    /* Dynamic linking information */
 #define PT_INTERP       3    /* Program interpreter */
@@ -189,8 +189,8 @@ for further details):
 #define PT_GNU_STACK  0x6474e551 /* Indicates stack executability */
 .\" For PT_GNU_STACK, see http://www.airs.com/blog/archives/518
 #define PT_GNU_RELRO  0x6474e552 /* Read-only after relocation */
-.in
 .fi
+.in
 .SH RETURN VALUE
 The
 .BR dl_iterate_phdr ()
@@ -253,8 +253,8 @@ produced by the program on an x86-64 system.
 The first shared object for which output is displayed
 (where the name is an empty string)
 is the main program.
-.nf
 .in +4n
+.nf
 $ \fB./a.out\fP
 Name: "" (9 segments)
      0: [      0x400040; memsz:    1f8] flags: 0x5; PT_PHDR
@@ -290,8 +290,8 @@ Name: "/lib64/ld-linux-x86-64.so.2" (7 segments)
      4: [0x7f55716acec4; memsz:    604] flags: 0x4; PT_GNU_EH_FRAME
      5: [0x7f557168f000; memsz:      0] flags: 0x6; PT_GNU_STACK
      6: [0x7f55718afba0; memsz:    460] flags: 0x4; PT_GNU_RELRO
-.in
 .fi
+.in
 .PP
 .SS Program source
 \&
index e72cb5eab92a4d404723be6169a8cef56742276c..0b30dee9dc9b6231b85002820d43a5e0d4e6f20f 100644 (file)
@@ -165,9 +165,9 @@ typedef struct {
     Dl_serpath dls_serpath[1]; /* Actually longer,
                                   'dls_cnt' elements */
 } Dl_serinfo;
-
-.fi
+.EE
 .in
+.IP
 Each of the
 .I dls_serpath
 elements in the above structure is a structure of the following form:
index f23a73b5cbba6fae5556f4cd0f39d2923a6d1541..45d90e2962a3a5cf8470f1cc32b40ca61d8a6f0e 100644 (file)
@@ -126,9 +126,9 @@ The program takes one command-line argument,
 a string of characters that is converted to uppercase and
 displayed on standard output.
 An example of its use is the following:
+.PP
 .in +4n
-.nf
-
+.EX
 $ \fB./a.out abc\fP
 ABC
 .fi
index c7a6a211f19e3476e2a7e47c0f2c8a17bd4a60c8..433102c0a21df45bf02dbbbca529dbddf35f6df9 100644 (file)
@@ -87,9 +87,9 @@ and
 are the reentrant versions.
 They use the following
 structure to hold the key data:
+.PP
 .in +4n
-.nf
-
+.EX
 struct crypt_data {
     char     keysched[16 * 8];
     char     sb0[32768];
index 25de6d7fa131c6fd32be69c545c8659c0afb2737..6e578e4d468dabf5099d25652c38d36ba0533b52 100644 (file)
@@ -75,9 +75,9 @@ Use
 with an argument of zero to find the current value of the program break.
 .SH EXAMPLE
 When run, the program below produces output such as the following:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$" " ./a.out"
 First address past:
     program text (etext)       0x8048568
index 728f0feaf84e93941ae98f7a564dce8c43aa3966..054f286e70d5dcb2b2594849075ccbb476db65ac 100644 (file)
@@ -134,9 +134,9 @@ Since host byte order is either little-endian or big-endian,
 only one of these conversions will have an effect.
 When we run this program on a little-endian system such as x86-32,
 we see the following:
+.PP
 .in +4n
-.nf
-
+.EX
 $ \fB./a.out\fP
 x.u32 = 0x44332211
 htole32(x.u32) = 0x44332211
index 5c4ded15273dad95a023f5d21efc80dba4d7db0f..4e297bfe01b7a4eb84140fb1dfa1c58e6b4ad04e 100644 (file)
@@ -142,9 +142,9 @@ These functions are nonstandard BSD extensions.
 Display the current
 .I errno
 information string and exit:
+.PP
 .in +4n
-.nf
-
+.EX
 p = malloc(size);
 if (p == NULL)
     err(1, NULL);
@@ -155,18 +155,18 @@ if (fd == \-1)
 .in
 .PP
 Display an error message and exit:
+.PP
 .in +4n
-.nf
-
+.EX
 if (tm.tm_hour < START_TIME)
     errx(1, "too early, wait until %s", start_time_string);
 .fi
 .in
 .PP
 Warn of an error:
+.PP
 .in +4n
-.nf
-
+.EX
 fd = open(raw_device, O_RDONLY, 0);
 if (fd == \-1)
     warnx("%s: %s: trying the block device",
index b0cbaad4a9cec4e82c3c9e4a127d025c71937343..95cb55abb73464f28ab05d1eb192f955be7a0f3f 100644 (file)
@@ -508,16 +508,16 @@ Improper link (POSIX.1).
 Exchange full.
 .SH NOTES
 A common mistake is to do
+.PP
 .in +4n
-.nf
-
+.EX
 if (somecall() == \-1) {
     printf("somecall() failed\en");
     if (errno == ...) { ... }
 }
-
-.fi
+.EE
 .in
+.PP
 where
 .I errno
 no longer needs to have the value it had upon return from
@@ -527,9 +527,9 @@ no longer needs to have the value it had upon return from
 If the value of
 .I errno
 should be preserved across a library call, it must be saved:
+.PP
 .in +4n
-.nf
-
+.EX
 if (somecall() == \-1) {
     int errsv = errno;
     printf("somecall() failed\en");
index e3d06517f2a3223d208b2400b0c824415ef8f7fa..60fa7eaa51c9652d237f95e88392991fec02d8e6 100644 (file)
@@ -288,9 +288,9 @@ The program scans its input string (taken from the program's
 first command-line argument) reading integers,
 and writes the squares of these integers to the output buffer.
 An example of the output produced by this program is the following:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$" " ./a.out \(aq1 23 43\(aq"
 size=11; ptr=1 529 1849
 .fi
index 0586dd20918b4c090a403bb27e6195c095efd93b..7cb5bc1ebe07da51601c5556222491c88ac67877 100644 (file)
@@ -104,18 +104,18 @@ The
 argument is a structure that contains four fields pointing to the
 programmer-defined hook functions that are used to implement this stream.
 The structure is defined as follows
+.PP
 .in +4n
-.nf
-
+.EX
 typedef struct {
     cookie_read_function_t  *read;
     cookie_write_function_t *write;
     cookie_seek_function_t  *seek;
     cookie_close_function_t *close;
 } cookie_io_functions_t;
-
-.fi
+.EE
 .in
+.PP
 The four fields are as follows:
 .TP
 .I cookie_read_function_t *read
@@ -265,17 +265,17 @@ The program writes its command-line arguments to the stream,
 and then seeks through the stream reading two out of every
 five characters and writing them to standard output.
 The following shell session demonstrates the use of the program:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$" " ./a.out \(aqhello world\(aq"
 /he/
 / w/
 /d/
 Reached end of file
-
-.fi
+.EE
 .in
+.PP
 Note that a more general version of the program below
 could be improved to more robustly handle various error situations
 (e.g., opening a stream with a cookie that already has an open stream;
index 050a785bd9cfeb35709dba6a2909f95f5718c23d..4caf5f03fb5dd38b26f856c61bd586cfcd804f81 100644 (file)
@@ -123,14 +123,14 @@ SVr4, 4.3BSD, C89.
 .SH EXAMPLE
 The program below produces results such as the following:
 .PP
-.nf
 .in +4n
+.nf
 .RB "$" " ./a.out 2560"
 frexp(2560, &e) = 0.625: 0.625 * 2^12 = 2560
 .RB "$" " ./a.out \-4"
 frexp(\-4, &e) = \-0.5: \-0.5 * 2^3 = \-4
-.in
 .fi
+.in
 .SS Program source
 \&
 .EX
index 536ab72d959886fd7233b6b7fd807fdd71ae0e33..77db132c02ede309b6041b65b30add785b6c4f19 100644 (file)
@@ -111,9 +111,9 @@ structure contains fields describing a file.
 The structure contains at least the following fields
 (there are additional fields that
 should be considered private to the implementation):
+.PP
 .in +4n
-.nf
-
+.EX
 typedef struct _ftsent {
     unsigned short  fts_info;     /* flags for FTSENT structure */
     char           *fts_accpath;  /* access path */
index 0d87d0e3b0057947856527da733041cfdb50605c..eb9c352fd18686133810dcb3b2e535850d02cd25 100644 (file)
@@ -189,16 +189,16 @@ that
 supplies when calling
 \fIfn\fP()
 is a pointer to a structure of type \fIFTW\fP:
+.PP
 .in +4n
-.nf
-
+.EX
 struct FTW {
     int base;
     int level;
 };
-
-.fi
+.EE
 .in
+.PP
 .I base
 is the offset of the filename (i.e., basename component)
 in the pathname given in
index 24ff8863bdfab6694c3b3e806a853b5c81b316f1..8a88a5a78a2dde0fc4086c88bb10ce7ac0641a6c 100644 (file)
@@ -116,8 +116,8 @@ struct addrinfo {
     char            *ai_canonname;
     struct addrinfo *ai_next;
 };
-.in
 .fi
+.in
 .PP
 The
 .I hints
index 3fa1349f1bfc7b182fa599d67345ff8bbaa5ed44..210e474e39a7734ea0ce1e267bb11f9a50817af7 100644 (file)
@@ -337,9 +337,9 @@ The program below simply resolves several hostnames in parallel,
 giving a speed-up compared to resolving the hostnames sequentially using
 .BR getaddrinfo (3).
 The program might be used like this:
+.PP
 .in +4n
-.nf
-
+.EX
 $ \fB./a.out ftp.us.kernel.org enoent.linuxfoundation.org gnu.cz\fP
 ftp.us.kernel.org: 128.30.2.36
 enoent.linuxfoundation.org: Name or service not known
@@ -416,9 +416,9 @@ front-end.
 The notification facility is not demonstrated.
 .PP
 An example session might look like this:
+.PP
 .in +4n
-.nf
-
+.EX
 $ \fB./a.out\fP
 > a ftp.us.kernel.org enoent.linuxfoundation.org gnu.cz
 > c 2
index 0a9981a84c695e8bde5a718d6d024ed493265b12..7d1ca5682273b8493698455a2f4e658c2725fe32 100644 (file)
@@ -64,9 +64,9 @@ typedef struct ucontext_t {
     mcontext_t        uc_mcontext;
     ...
 } ucontext_t;
-
-.fi
+.EE
 .in
+.PP
 with
 .IR sigset_t
 and
index 083a585ecb4023146797beeedba450f5ee28bff9..5bc079c5ba283826f1d96f90c09a1d6b772b55aa 100644 (file)
@@ -130,9 +130,9 @@ The second command-line argument specifies the
 value to be supplied to
 .BR getgrouplist ().
 The following shell session shows examples of the use of this program:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$" " ./a.out cecilia 0"
 getgrouplist() returned \-1; ngroups = 3
 .RB "$" " ./a.out cecilia 3"
index d7b03a563f28a4589dadca2853278c43d91d9a24..7f91a1b0580ed1098fc4814fc86923f26e9d24b3 100644 (file)
@@ -225,9 +225,9 @@ The program below demonstrates the use of
 and
 .BR getnameinfo (3).
 Here is what we see when running this program on one system:
+.PP
 .in +4n
-.nf
-
+.EX
 $ \fB./a.out\fP
 lo       AF_PACKET (17)
                 tx_packets =        524; rx_packets =        524
index f6f384497b600df2c1658e1ad3af9deb72855f42..b07a7b38958e90e4507f04da489cc14939410730 100644 (file)
@@ -66,8 +66,8 @@ struct hostent {
     int    h_length;
     char **h_addr_list;
 };
-.in
 .fi
+.in
 .PP
 These functions replace the
 .BR gethostbyname (3)
index 5678cd04ee4226f3149f0f8d991ee6a147616dc4..66ec1c3d58dd5fe2ef291deed4edacd5c9b335f0 100644 (file)
@@ -225,9 +225,9 @@ In order to assist the programmer in choosing reasonable sizes
 for the supplied buffers,
 .I <netdb.h>
 defines the constants
+.PP
 .in +4n
-.nf
-
+.EX
 #define NI_MAXHOST      1025
 #define NI_MAXSERV      32
 .fi
index c51c2bf8ab185dd3b81e3c15c50f8ea4949c0bec..fe05756b21a3e9a5fb5cdf6989336540fb8a94f2 100644 (file)
@@ -457,13 +457,13 @@ with most of its features.
 #include <stdio.h>     /* for printf */
 #include <stdlib.h>    /* for exit */
 #include <getopt.h>
-
+.PP
 int
 main(int argc, char **argv)
 {
     int c;
     int digit_optind = 0;
-
+.PP
     while (1) {
         int this_option_optind = optind ? optind : 1;
         int option_index = 0;
@@ -476,12 +476,12 @@ main(int argc, char **argv)
             {"file",    required_argument, 0,  0 },
             {0,         0,                 0,  0 }
         };
-
+.PP
         c = getopt_long(argc, argv, "abc:d:012",
                  long_options, &option_index);
         if (c == \-1)
             break;
-
+.PP
         switch (c) {
         case 0:
             printf("option %s", long_options[option_index].name);
@@ -489,7 +489,7 @@ main(int argc, char **argv)
                 printf(" with arg %s", optarg);
             printf("\\n");
             break;
-
+.PP
         case \(aq0\(aq:
         case \(aq1\(aq:
         case \(aq2\(aq:
@@ -498,38 +498,38 @@ main(int argc, char **argv)
             digit_optind = this_option_optind;
             printf("option %c\\n", c);
             break;
-
+.PP
         case \(aqa\(aq:
             printf("option a\\n");
             break;
-
+.PP
         case \(aqb\(aq:
             printf("option b\\n");
             break;
-
+.PP
         case \(aqc\(aq:
             printf("option c with value \(aq%s\(aq\\n", optarg);
             break;
-
+.PP
         case \(aqd\(aq:
             printf("option d with value \(aq%s\(aq\\n", optarg);
             break;
-
+.PP
         case \(aq?\(aq:
             break;
-
+.PP
         default:
             printf("?? getopt returned character code 0%o ??\\n", c);
         }
     }
-
+.PP
     if (optind < argc) {
         printf("non\-option ARGV\-elements: ");
         while (optind < argc)
             printf("%s ", argv[optind++]);
         printf("\\n");
     }
-
+.PP
     exit(EXIT_SUCCESS);
 }
 .EE
index 47f88b31f2cd39a57f1852242e145d544094c111..c1a141c9786d4a6395fe147b3f1eb33fbf32bf19 100644 (file)
@@ -164,9 +164,9 @@ fails with the error
 .BR ERANGE ,
 the program retries with larger buffer sizes.
 The following shell session shows a couple of sample runs:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$" " ./a.out tcp 1"
 ERANGE! Retrying with larger buffer
 getprotobyname_r() returned: 0 (success)  (buflen=78)
index baf88a756df50bcb86f5a47d58a036db16096859..362ece388cbb1e44a33c45b72e15f35be6460d7b 100644 (file)
@@ -162,13 +162,13 @@ getpwent_r(struct passwd *pwd, char *buf, int buflen);
 .PP
 or, better,
 .PP
-.nf
 .in +4n
+.nf
 int
 getpwent_r(struct passwd *pwd, char *buf, int buflen,
            FILE **pw_fp);
-.in
 .fi
+.in
 .SH NOTES
 The function
 .BR getpwent_r ()
index cbd76aaa4a005b935cc1bf5ea73efcecebe0b253..dbfc70c059929f2aedf1fe301cdcb60280149f9a 100644 (file)
@@ -33,9 +33,9 @@ and
 functions each return a pointer to an object with the
 following structure containing the broken-out
 fields of an entry in the RPC program number data base.
+.PP
 .in +4n
-.nf
-
+.EX
 struct rpcent {
     char  *r_name;     /* name of server for this RPC program */
     char **r_aliases;  /* alias list */
index 6a458435b3582417efa87b147a1a771fec8d0199..60abeb060d6bf34528c06824d5b401cfeeb2e354 100644 (file)
@@ -162,9 +162,9 @@ fails with the error
 .BR ERANGE ,
 the program retries with larger buffer sizes.
 The following shell session shows a couple of sample runs:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$" " ./a.out 7 tcp 1"
 ERANGE! Retrying with larger buffer
 getservbyport_r() returned: 0 (success)  (buflen=87)
index 548cd948c8a9a7e0c31d3d3e4d8b0f8a829d7a16..7bcf8c6ca18057af75424af1fc764da6a3bcd9ab 100644 (file)
@@ -47,9 +47,9 @@ If the file is already open, the next entry.
 The
 .I ttyent
 structure has the form:
+.PP
 .in +4n
-.nf
-
+.EX
 struct ttyent {
     char *ty_name;     /* terminal device name */
     char *ty_getty;    /* command to execute, usually getty */
index f4049e82035b82319aab67a987b3a1f33ff5932d..51ed3ee91c0aecaf2742ddec751fb9056171959d 100644 (file)
@@ -39,18 +39,18 @@ getumask \- get file creation mask
 .SH DESCRIPTION
 This function returns the current file creation mask.
 It is equivalent to
+.PP
 .in +4n
-.nf
-
+.EX
 mode_t getumask(void)
 {
     mode_t mask = umask( 0 );
     umask(mask);
     return mask;
 }
-
-.fi
+.EE
 .in
+.PP
 except that it is documented to be thread-safe (that is, shares
 a lock with the
 .BR umask (2)
index 9513b467b3529ec0e2cf4dd3c69f1be2e0ad25a5..3144086ca46c4a28962f039999dde09e8108928d 100644 (file)
@@ -339,9 +339,9 @@ ls \-l *.c ../*.c
 .in
 .PP
 in the shell:
-.nf
+.PP
 .in +4n
-
+.EX
 glob_t globbuf;
 
 globbuf.gl_offs = 2;
@@ -350,8 +350,8 @@ glob("../*.c", GLOB_DOOFFS | GLOB_APPEND, NULL, &globbuf);
 globbuf.gl_pathv[0] = "ls";
 globbuf.gl_pathv[1] = "\-l";
 execvp("ls", &globbuf.gl_pathv[0]);
-.in
 .fi
+.in
 .SH SEE ALSO
 .BR ls (1),
 .BR sh (1),
index af8719015e7b3de21e18e4c0febc4fdef37f83ed..74dc8b1a54cd157e63c9a2352f1353f278b67d5c 100644 (file)
@@ -63,9 +63,9 @@ T}    Thread safety   MT-Safe
 These functions are glibc-specific.
 .SH EXAMPLE
 When run, the program below will produce output such as the following:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$" " ./a.out"
 GNU libc version: 2.8
 GNU libc release: stable
index bd5dfbd57bd6e982401f4bad4bd10b1ced33fd24..7a068efc702af1ad10bfe12f8d09ca19b132bdd4 100644 (file)
@@ -67,9 +67,9 @@ The access-method-specific data structure provided to
 is defined in the
 .I <db.h>
 include file as follows:
+.PP
 .in +4n
-.nf
-
+.EX
 typedef struct {
     unsigned int       bsize;
     unsigned int       ffactor;
index 7d06d18cdb5a114d2063ef688d991b3971399a01..878a15c40de26aa3e1c3bb8b748a5f788acdccee 100644 (file)
@@ -132,8 +132,8 @@ typedef struct entry {
     char *key;
     void *data;
 } ENTRY;
-.in
 .fi
+.in
 .PP
 The field \fIkey\fP points to a null-terminated string which is the
 search key.
index 947b01db6d0a8c30c606e4a3fe36cd5d016d181f..38872709d2984f6f68f542ec9d5497d7156d1a9f 100644 (file)
@@ -292,9 +292,9 @@ and
 .BR inet_ntoa ()
 is shown below.
 Here are some example runs:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$" " ./a.out 226.000.000.037" "      # Last byte is in octal"
 226.0.0.31
 .RB "$" " ./a.out 0x7f.1         " "      # First byte is in hex"
index 6dc86cc84286e97a980f65ebdd0731df8bd353f0..5b13de82ab906f9cc391a95e201315f54e28731d 100644 (file)
@@ -173,9 +173,9 @@ The program below demonstrates the use of
 and
 .BR inet_ntop (3).
 Here are some example runs:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$" " ./a.out i6 0:0:0:0:0:0:0:0"
 ::
 .RB "$" " ./a.out i6 1:0:0:0:0:0:0:8"
index 650dc12565bf4d70952d7ab87aec6d1bb4980619..d8e7d5354ff74f1d49952bb615477d3d4f9f23ef 100644 (file)
@@ -152,9 +152,9 @@ with the forward and backward pointers in each element suitably initialized.
 The program below demonstrates the use of
 .BR insque ().
 Here is an example run of the program:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$ " "./a.out -c a b c"
 Traversing completed list:
     a
index fbbfa5a68b9dbe6f493224b5bc2daee7199a375d..7e7d90f92b6ea2cbb651b23e477d5f51c5294684 100644 (file)
@@ -326,13 +326,13 @@ it must be cast to
 .IR "unsigned char" ,
 as in the following example:
 .PP
-.nf
 .in +4n
+.nf
 char c;
 \&...
 res = toupper((unsigned char) c);
-.in
 .fi
+.in
 .PP
 This is necessary because
 .I char
index e2326505c0443d486b62daa7065135901cad3783..3419626465d6089f4d36fa25295ac97dae217b69 100644 (file)
@@ -157,9 +157,9 @@ The example program below demonstrates the use of
 and
 .BR swapcontext ().
 Running the program produces the following output:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$" " ./a.out"
 main: swapcontext(&uctx_main, &uctx_func2)
 func2: started
index a641cc15e8a37e28a869c7f68760bef905b965f7..025e36096a00283be4cabdab94d2f87386d49617 100644 (file)
@@ -522,9 +522,9 @@ and frees it twice (an error).
 The following shell session shows what happens when we run this program
 under glibc, with the default value for
 .BR M_CHECK_ACTION :
+.PP
 .in +4n
-.nf
-
+.EX
 $ \fB./a.out\fP
 main(): returned from first free() call
 *** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***
index cabd73e980d4c50799c4e614edf538da7aaf5b5f..c889a2b5af5d721b2d261757af6f44d3e49bd5ca 100644 (file)
@@ -123,9 +123,9 @@ The program below illustrates the use of
 .BR mbstowcs (),
 as well as some of the wide character classification functions.
 An example run is the following:
+.PP
 .in +4n
-.nf
-
+.EX
 $ ./t_mbstowcs de_DE.UTF\-8 Grüße!
 Length of source string (excluding terminator):
     8 bytes
index 3f496df630920f23c80b0d6444116caa87bbd598..bf08d0c6bf02b1bfebb1e1d4954d889e3143f9e0 100644 (file)
@@ -183,9 +183,9 @@ The program below calls
 with a NULL argument and then frees the same block of memory twice.
 The following shell session demonstrates what happens
 when running the program:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$" " ./a.out"
 About to free
 
index b78729342e2981ef506f9bc6054b9c4deda30309..1e0e8594d1c67575c6cec59465b85986754300e7 100644 (file)
@@ -96,9 +96,9 @@ If an instance of
 is not found, the results are unpredictable.
 The following call is a fast means of locating a string's
 terminating null byte:
+.PP
 .in +4n
-.nf
-
+.EX
 char *p = rawmemchr(s,\ \(aq\\0\(aq);
 .fi
 .in
index 783f4ca491d2f1997c7c0fe30929ee6cf225cf88..41d92b9a4b675d7a86214f999c6d43d360987e64 100644 (file)
@@ -51,9 +51,9 @@ returns an
 structure in the buffer pointed by
 .IR attr .
 This structure is defined as:
+.PP
 .in +4n
-.nf
-
+.EX
 struct mq_attr {
     long mq_flags;       /* Flags: 0 or O_NONBLOCK */
     long mq_maxmsg;      /* Max. # of messages on queue */
index cf5c34de7fe55993f5a3e785c96e96f4b07433d4..a296a428b63fde095bf5fa5d216ce428652f77bc 100644 (file)
@@ -126,9 +126,9 @@ specify the maximum number of messages and
 the maximum size of messages that the queue will allow.
 This structure is defined as follows:
 .PP
+.PP
 .in +4n
-.nf
-
+.EX
 struct mq_attr {
     long mq_flags;       /* Flags (ignored for mq_open()) */
     long mq_maxmsg;      /* Max. # of messages on queue */
index f957c09a9f508791a5a0502dc374c8fc361303c2..b1d317395059bd8cc33537fe1b378e4509427df2 100644 (file)
@@ -155,15 +155,15 @@ main(int argc, char *argv[])
     calloc(16, 16);             /* Never freed\-\-a memory leak */
     exit(EXIT_SUCCESS);
 }
-
-.fi
+.EE
 .in
+.PP
 When we run the program as follows, we see that
 .BR mtrace ()
 diagnosed memory leaks at two different locations in the program:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$ " "cc \-g t_mtrace.c \-o t_mtrace"
 .RB "$ " "export MALLOC_TRACE=/tmp/t"
 .RB "$ " "./t_mtrace"
index b369c5b2b8ddc66a038995340c4554078e648330..bb7dc4bfcf8aae351fb3586f36f6458235e1ad25 100644 (file)
@@ -255,9 +255,9 @@ Set the
 category to
 .IR fr_FR
 (French):
+.PP
 .in +4n
-.nf
-
+.EX
 $ \fB./a.out fr_FR\fP
 123456,789
 Fri Mar  7 00:25:08 2014
@@ -274,9 +274,9 @@ and the
 category to
 .IR it_IT
 (Italian):
+.PP
 .in +4n
-.nf
-
+.EX
 $ \fB./a.out fr_FR it_IT\fP
 123456,789
 ven 07 mar 2014 00:26:01 CET
@@ -290,9 +290,9 @@ which causes the value to be taken from environment variable settings
 (which, here, specify
 .IR mi_NZ ,
 New Zealand Māori):
+.PP
 .in +4n
-.nf
-
+.EX
 $ LC_ALL=mi_NZ ./a.out fr_FR ""
 123456,789
 Te Paraire, te 07 o Poutū-te-rangi, 2014 00:38:44 CET
index 19c8a1cd8794156b1a82e8e69213156c52c37d02..9926d6029ea8a3a60a0c105e822a3889483a688d 100644 (file)
@@ -64,9 +64,9 @@ struct timeval {
     time_t      tv_sec;   /* Seconds since the Epoch */
     suseconds_t tv_usec;  /* Microseconds */
 };
-
-.fi
+.EE
 .in
+.IP
 .TP
 .I maxerror
 Maximum error, in microseconds.
index c706c70ec734d56db5f63e2a9eacc5c0f200be2c..b9a6ffd018ef2cde9e326fa9c60519d18c55a4cf 100644 (file)
@@ -66,9 +66,9 @@ POSIX.1-2001, POSIX.1-2008, C89, C99.
 On a Linux/i386 system, when compiled using the default
 .BR gcc (1)
 options, the program below produces the following output:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$" " ./a.out"
 offsets: i=0; c=4; d=8 a=16
 sizeof(struct s)=16
index a6e3a2b6be18c2704aa29efff8c1eaa5bc12564c..5a5dc911901bf759a807310c5bf0a104d8a70aba 100644 (file)
@@ -96,9 +96,9 @@ is part of the UNIX 98 pseudoterminal support (see
 Some older UNIX implementations that support System V
 (aka UNIX 98) pseudoterminals don't have this function, but it
 is easy to implement:
+.PP
 .in +4n
-.nf
-
+.EX
 int
 posix_openpt(int flags)
 {
index d2779d6b6247c89a9d9a27708d6d4f92b754c71b..494901bb0c1df7b484b12f90b4853598e502af7a 100644 (file)
@@ -214,21 +214,21 @@ where the decimal integer \fIm\fP denotes
 the position in the argument list of the desired argument, indexed starting
 from 1.
 Thus,
+.PP
 .in +4n
-.nf
-
+.EX
 printf("%*d", width, num);
-
-.fi
+.EE
 .in
+.PP
 and
+.PP
 .in +4n
-.nf
-
+.EX
 printf("%2$*1$d", width, num);
-
-.fi
+.EE
 .in
+.PP
 are equivalent.
 The second style allows repeated references to the
 same argument.
@@ -254,13 +254,13 @@ part of the locale.
 The POSIX locale
 uses \(aq.\(aq as radix character, and does not have a grouping character.
 Thus,
+.PP
 .in +4n
-.nf
-
+.EX
     printf("%\(aq.2f", 1234567.89);
-
-.fi
+.EE
 .in
+.PP
 results in "1234567.89" in the POSIX locale, in "1234567,89" in the
 nl_NL locale, and in "1.234.567,89" in the da_DK locale.
 .SS Flag characters
@@ -1077,9 +1077,9 @@ call to write to memory and creating a security hole.
 To print
 .I Pi
 to five decimal places:
+.PP
 .in +4n
-.nf
-
+.EX
 #include <math.h>
 #include <stdio.h>
 fprintf(stdout, "pi = %.5f\en", 4 * atan(1.0));
@@ -1092,9 +1092,9 @@ where
 and
 .I month
 are pointers to strings:
+.PP
 .in +4n
-.nf
-
+.EX
 #include <stdio.h>
 fprintf(stdout, "%s, %s %d, %.2d:%.2d\en",
         weekday, month, day, hour, min);
@@ -1104,26 +1104,26 @@ fprintf(stdout, "%s, %s %d, %.2d:%.2d\en",
 Many countries use the day-month-year order.
 Hence, an internationalized version must be able to print
 the arguments in an order specified by the format:
+.PP
 .in +4n
-.nf
-
+.EX
 #include <stdio.h>
 fprintf(stdout, format,
         weekday, month, day, hour, min);
-
-.fi
+.EE
 .in
+.PP
 where
 .I format
 depends on locale, and may permute the arguments.
 With the value:
+.PP
 .in +4n
-.nf
-
+.EX
 "%1$s, %3$d. %2$s, %4$d:%5$.2d\en"
-
-.fi
+.EE
 .in
+.PP
 one might obtain "Sonntag, 3. Juli, 10:02".
 .PP
 To allocate a sufficiently large string and print into it
index c7cad03173a9e23099582046e84141ff93b25f22..29f610b50f69c6ae4f789ec6f1e75657bfa1a32a 100644 (file)
@@ -133,9 +133,9 @@ and
 .BR pthread_getname_np ().
 .PP
 The following shell session shows a sample run of the program:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$" " ./a.out"
 Created a thread. Default name is: a.out
 The thread name after setting it is THREADFOO.
index fec23ca5a6521902d3748e0d81ec9daa42d95355..d137fe2dd9a723216945b3a3e427ab1a7289926c 100644 (file)
@@ -182,9 +182,9 @@ meaning that threads created using this attributes object should
 take their scheduling attributes from the thread attributes object.
 The program then creates a thread using the thread attributes object,
 and that thread displays its scheduling policy and priority.
+.PP
 .in +4n
-.nf
-
+.EX
 $ \fBsu\fP      # Need privilege to set real-time scheduling policies
 Password:
 # \fB./a.out \-mf10 \-ar20 \-i e\fP
index c423e69e73e8fd2dc54e217d7ffe6f8d40e93fc6..2b0fb11a3301acec3aa5803c6365e67de8f78c14 100644 (file)
@@ -812,9 +812,9 @@ or
 The procedure
 .I dispatch
 has the following form:
+.IP
 .in +4n
-.nf
-
+.EX
 dispatch(struct svc_req *request, SVCXPRT *xprt);
 .fi
 .in
index b26d107da338b3c3047e30af5a7fa892b7be3b10..5bbe92bcbb87edcefde187e2431c804c3e02b70e 100644 (file)
@@ -736,9 +736,9 @@ or
 The caller must
 .BR free (3)
 the returned string, as in the following example:
+.PP
 .in +4n
-.nf
-
+.EX
 char *p;
 int n;
 
index c5e826a1f7e1ff116f761ad6f2623f4d9a5c28a6..fc2a27263490974c336fccf6c0c64e23453d1f2a 100644 (file)
@@ -86,19 +86,19 @@ T}  Thread safety   MT-Safe
 is glibc-specific.
 .SH NOTES
 The call
+.PP
 .in +4n
-.nf
-
+.EX
 cpu = sched_getcpu();
-
-.fi
+.EE
 .in
+.PP
 is equivalent to the following
 .BR getcpu (2)
 call:
+.PP
 .in +4n
-.nf
-
+.EX
 int c, s;
 s = getcpu(&c, NULL, NULL);
 cpu = (s == \-1) ? s : c;
index b3e3140009e9c963d69211d0db0e590b9bfadbad..d135cab294e9859d551cc5d9af85178706af2ee9 100644 (file)
@@ -80,14 +80,14 @@ argument points to a structure that specifies an absolute timeout
 in seconds and nanoseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
 This structure is defined as follows:
 .PP
-.nf
 .in +4n
+.nf
 struct timespec {
     time_t tv_sec;      /* Seconds */
     long   tv_nsec;     /* Nanoseconds [0 .. 999999999] */
 };
-.in
 .fi
+.in
 .PP
 If the timeout has already expired by the time of the call,
 and the semaphore could not be locked immediately,
index 8e3091ce7771b77a0f47b2e4cba9c8fd242c9a2e..a0e061e72ac158c2fe69622ea48feb9232f55a2d 100644 (file)
@@ -75,9 +75,9 @@ The
 .I "struct aliasent"
 is defined in
 .IR <aliases.h> :
+.PP
 .in +4n
-.nf
-
+.EX
 struct aliasent {
     char    *alias_name;             /* alias name */
     size_t   alias_members_len;
@@ -122,9 +122,9 @@ T}  Thread safety   MT-Unsafe
 .SH CONFORMING TO
 These routines are glibc-specific.
 The NeXT system has similar routines:
+.PP
 .in +4n
-.nf
-
+.EX
 #include <aliasdb.h>
 
 void alias_setent(void);
index 567dd18b30828150212649e0400a1f8c799acc48..a7515b343a041f8f7bb9a0e89975bb7387eee261 100644 (file)
@@ -153,9 +153,9 @@ Inside the glibc
 wrapper, this argument,
 .IR uinfo ,
 is initialized as follows:
+.PP
 .in +4n
-.nf
-
+.EX
 uinfo.si_signo = sig;      /* Argument supplied to sigqueue() */
 uinfo.si_code = SI_QUEUE;
 uinfo.si_pid = getpid();   /* Process ID of sender */
index be0a9898278c9c840f4a791f1db21ba5a74a361b..a8ca4d9a975e8ef54c36fa1ecf8db00d8d511a87 100644 (file)
@@ -91,17 +91,17 @@ cannot be changed.
 The
 .I sigvec
 structure has the following form:
+.PP
 .in +4n
-.nf
-
+.EX
 struct sigvec {
     void (*sv_handler)(int); /* Signal disposition */
     int    sv_mask;          /* Signals to be blocked in handler */
     int    sv_flags;         /* Flags */
 };
-
-.fi
+.EE
 .in
+.PP
 The
 .I sv_handler
 field specifies the disposition of the signal, and is either:
index dee35cb280ac116c0fd0a91ff08d7e9fdf50432a..f95621e63f68c3222aaa660b551b1404251f2ccd 100644 (file)
@@ -176,23 +176,23 @@ An obvious implementation would have a
 be a pointer to the stack frame of the variadic function.
 In such a setup (by far the most common) there seems
 nothing against an assignment
+.PP
 .in +4n
-.nf
-
+.EX
 va_list aq = ap;
-
-.fi
+.EE
 .in
+.PP
 Unfortunately, there are also systems that make it an
 array of pointers (of length 1), and there one needs
+.PP
 .in +4n
-.nf
-
+.EX
 va_list aq;
 *aq = *ap;
-
-.fi
+.EE
 .in
+.PP
 Finally, on systems where arguments are passed in registers,
 it may be necessary for
 .BR va_start ()
@@ -206,16 +206,16 @@ can free the allocated memory again.
 To accommodate this situation, C99 adds a macro
 .BR va_copy (),
 so that the above assignment can be replaced by
+.PP
 .in +4n
-.nf
-
+.EX
 va_list aq;
 va_copy(aq, ap);
 \&...
 va_end(aq);
-
-.fi
+.EE
 .in
+.PP
 Each invocation of
 .BR va_copy ()
 must be matched by a corresponding invocation of
@@ -261,9 +261,9 @@ A backward-compatible version can be found in the include file
 .IR <varargs.h> .
 .PP
 The historic setup is:
+.PP
 .in +4n
-.nf
-
+.EX
 #include <varargs.h>
 
 void
@@ -280,9 +280,9 @@ foo(va_alist)
     }
     va_end(ap);
 }
-
-.fi
+.EE
 .in
+.PP
 On some systems,
 .I va_end
 contains a closing \(aq}\(aq matching a \(aq{\(aq in
index 494c348dbd71da786bd26f6328e83a7451842520..58f014ba7f4d337ec7c3bc2419a2bfc4195a458c 100644 (file)
@@ -103,9 +103,9 @@ must be at least
 A simple implementation of
 .BR strncat ()
 might be:
+.PP
 .in +4n
-.nf
-
+.EX
 char *
 strncat(char *dest, const char *src, size_t n)
 {
index a620575cdb2dbb1a7d0d2a1096889f2a8150ea52..2f656b1e4ad5c95579425c5e76fd5316e707f03c 100644 (file)
@@ -88,9 +88,9 @@ bytes are written.
 A simple implementation of
 .BR strncpy ()
 might be:
+.PP
 .in +4n
-.nf
-
+.EX
 char *
 strncpy(char *dest, const char *src, size_t n)
 {
@@ -163,9 +163,9 @@ If
 has length
 .IR buflen ,
 you can force termination using something like the following:
+.PP
 .in +4n
-.nf
-
+.EX
 strncpy(buf, str, buflen \- 1);
 if (buflen > 0)
     buf[buflen \- 1]= \(aq\\0\(aq;
index a1b90e2f8286d71daae5c3d4a6930a65cb07b671..d85bd54e137f0b2865470a61c627e12dc1c316c3 100644 (file)
@@ -569,9 +569,9 @@ to circumvent this
 problem.
 A relatively clean one is to add an
 intermediate function
+.PP
 .in +4n
-.nf
-
+.EX
 size_t
 my_strftime(char *s, size_t max, const char *fmt,
             const struct tm *tm)
@@ -606,9 +606,9 @@ The program below can be used to experiment with
 Some examples of the result string produced by the glibc implementation of
 .BR strftime ()
 are as follows:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$" " ./a.out \(aq%m\(aq"
 Result string is "11"
 .RB "$" " ./a.out \(aq%5m\(aq"
index 34d27cd4e2ea55aa39c199809bc3ac62c1729f07..d27385270b10745963a3853d5c42847eada0e7c8 100644 (file)
@@ -205,8 +205,8 @@ BSD also has
 .EX
 .BI "quad_t strtoq(const char *" nptr ", char **" endptr ", int " base );
 .EX
-.in
 .fi
+.in
 with completely analogous definition.
 Depending on the wordsize of the current architecture, this
 may be equivalent to
@@ -227,9 +227,9 @@ a function that performs no error checking and
 has a simpler interface than
 .BR strtol ().)
 Some examples of the results produced by this program are the following:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$" " ./a.out 123"
 strtol() returned 123
 .RB "$" " ./a.out \(aq    123\(aq"
index 7f241a66daaa4660921bd750605746ff95ef236e..404b7b8423c36ab28d516fbe429431e26b9c622b 100644 (file)
@@ -151,13 +151,13 @@ it must be cast to
 .IR "unsigned char" ,
 as in the following example:
 .PP
-.nf
 .in +4n
+.nf
 char c;
 \&...
 res = toupper((unsigned char) c);
-.in
 .fi
+.in
 .PP
 This is necessary because
 .I char
index 61dfd2bc77e07fb410f88b94fff3dc7c27e2000a..deab237f7fdd2a1f97395aceb893e16053cf802a 100644 (file)
@@ -166,13 +166,13 @@ Since glibc 2.24,
 also provides the declaration with the following
 feature test macro definitions:
 .PP
-.nf
 .in +4n
+.nf
 (_XOPEN_SOURCE >= 500 ||
         (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED))
     && ! (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600)
-.in
 .fi
+.in
 .PP
 Minix also has
 .IR fttyslot ( fd ).
index d00bb93e36c67807db28bc74423f93044a99d427..5b02aa812db3cfc1e402c32a57809cc7a42d5e8e 100644 (file)
@@ -285,18 +285,18 @@ filesystem should validate that the requested
 are valid for the indicated resource and then send a reply with the
 following format:
 .IP
+.IP
 .in +4n
-.nf
-
+.EX
 struct fuse_open_out {
     uint64_t fh;
     uint32_t open_flags;
     uint32_t padding;
 };
-
-.fi
+.EE
 .in
 .IP
+.IP
 The
 .I fh
 field is an opaque identifier that the kernel will use to refer
@@ -318,9 +318,9 @@ The file is not seekable.
 .RE
 .TP
 .BR FUSE_READ " and " FUSE_READDIR
+.IP
 .in +4n
-.nf
-
+.EX
 struct fuse_read_in {
     uint64_t fh;
     uint64_t offset;
@@ -330,10 +330,10 @@ struct fuse_read_in {
     uint32_t flags;
     uint32_t padding;
 };
-
-.fi
+.EE
 .in
 .IP
+.IP
 The requested action is to read up to
 .I size
 bytes of the file or directory, starting at
index cd5fc9f4980c144c8fe7922b3f75581988f7a03b..d43ce00e7d0c89f3f512e28e243602a597117ae8 100644 (file)
@@ -77,8 +77,8 @@ structure, defined in
 .I <linux/loop.h>
 as:
 .IP
-.nf
 .in +4n
+.nf
 struct loop_info {
     int           lo_number;            /* ioctl r/o */
     dev_t         lo_device;            /* ioctl r/o */
@@ -94,8 +94,8 @@ struct loop_info {
     unsigned long lo_init[2];
     char          reserved[4];
 };
-.in
 .fi
+.in
 .IP
 The encryption type
 .RI ( lo_encrypt_type )
@@ -163,8 +163,8 @@ described above but use the
 structure,
 which has some additional fields and a larger range for some other fields:
 .IP
-.nf
 .in +4n
+.nf
 struct loop_info64 {
     uint64_t lo_device;                   /* ioctl r/o */
     uint64_t lo_inode;                    /* ioctl r/o */
@@ -180,8 +180,8 @@ struct loop_info64 {
     uint8_t  lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */
     uint64_t lo_init[2];
 };
-.in
 .fi
+.in
 .SS /dev/loop-control
 Since Linux 3.1,
 .\" commit 770fe30a46a12b6fb6b63fbe1737654d28e84844
@@ -228,16 +228,16 @@ opens a file to be used as the underlying storage for the device,
 and then associates the loop device with the backing store.
 The following shell session demonstrates the use of the program:
 .PP
-.nf
 .in +4n
+.nf
 $ \fBdd if=/dev/zero of=file.img bs=1MiB count=10\fP
 10+0 records in
 10+0 records out
 10485760 bytes (10 MB) copied, 0.00609385 s, 1.7 GB/s
 $ \fBsudo ./mnt_loop file.img\fP
 loopname = /dev/loop5
-.in
 .fi
+.in
 .SS Program source
 \&
 .EX
index 7454e953f61437025cfb104b1f0d0e97052dfabc..9c8b2db380268679539e012a6747341a7c11474d 100644 (file)
--- a/man4/st.4
+++ b/man4/st.4
@@ -79,9 +79,9 @@ For instance, it is possible to control up to 64 tape drives
 with two minor numbers for different options.)
 .PP
 Devices are typically created by:
+.PP
 .in +4n
-.nf
-
+.EX
 mknod \-m 666 /dev/st0 c 9 0
 mknod \-m 666 /dev/st0l c 9 32
 mknod \-m 666 /dev/st0m c 9 64
@@ -629,9 +629,9 @@ Enables immediate mode (i.e., don't wait for the command to finish) for some
 commands (e.g., rewind).
 .PP
 An example:
+.PP
 .in +4n
-.nf
-
+.EX
 struct mtop mt_cmd;
 mt_cmd.mt_op = MTSETDRVBUFFER;
 mt_cmd.mt_count = MT_ST_BOOLEANS |
index 12682cbd8dfe44cd8aebe4f6ef58b6cc5c72734f..d72024e9a4dee8cdfd6e403e69abbec69e96795a 100644 (file)
@@ -96,9 +96,9 @@ stands for
 .I uint32_t
 or
 .IR uint64_t ):
+.PP
 .in +4n
-.nf
-
+.EX
 ElfN_Addr       Unsigned program address, uintN_t
 ElfN_Off        Unsigned file offset, uintN_t
 ElfN_Section    Unsigned section index, uint16_t
@@ -138,9 +138,9 @@ The ELF header is described by the type
 .I Elf32_Ehdr
 or
 .IR Elf64_Ehdr :
+.PP
 .in +4n
-.nf
-
+.EX
 #define EI_NIDENT 16
 
 typedef struct {
@@ -634,9 +634,9 @@ The ELF program header is described by the type
 or
 .I Elf64_Phdr
 depending on the architecture:
+.PP
 .in +4n
-.nf
-
+.EX
 typedef struct {
     uint32_t   p_type;
     Elf32_Off  p_offset;
@@ -649,9 +649,9 @@ typedef struct {
 } Elf32_Phdr;
 .fi
 .in
+.PP
 .in +4n
-.nf
-
+.EX
 typedef struct {
     uint32_t   p_type;
     uint32_t   p_flags;
@@ -878,9 +878,9 @@ The section header table does not contain entries for the
 reserved indices.
 .PP
 The section header has the following structure:
+.PP
 .in +4n
-.nf
-
+.EX
 typedef struct {
     uint32_t   sh_name;
     uint32_t   sh_type;
@@ -895,9 +895,9 @@ typedef struct {
 } Elf32_Shdr;
 .fi
 .in
+.PP
 .in +4n
-.nf
-
+.EX
 typedef struct {
     uint32_t   sh_name;
     uint32_t   sh_type;
@@ -1443,9 +1443,9 @@ An object file's symbol table holds information needed to locate and
 relocate a program's symbolic definitions and references.
 A symbol table
 index is a subscript into this array.
+.PP
 .in +4n
-.nf
-
+.EX
 typedef struct {
     uint32_t      st_name;
     Elf32_Addr    st_value;
@@ -1456,9 +1456,9 @@ typedef struct {
 } Elf32_Sym;
 .fi
 .in
+.PP
 .in +4n
-.nf
-
+.EX
 typedef struct {
     uint32_t      st_name;
     unsigned char st_info;
@@ -1615,18 +1615,18 @@ program image.
 Relocation entries are these data.
 .PP
 Relocation structures that do not need an addend:
+.PP
 .in +4n
-.nf
-
+.EX
 typedef struct {
     Elf32_Addr r_offset;
     uint32_t   r_info;
 } Elf32_Rel;
 .fi
 .in
+.PP
 .in +4n
-.nf
-
+.EX
 typedef struct {
     Elf64_Addr r_offset;
     uint64_t   r_info;
@@ -1635,9 +1635,9 @@ typedef struct {
 .in
 .PP
 Relocation structures that need an addend:
+.PP
 .in +4n
-.nf
-
+.EX
 typedef struct {
     Elf32_Addr r_offset;
     uint32_t   r_info;
@@ -1645,9 +1645,9 @@ typedef struct {
 } Elf32_Rela;
 .fi
 .in
+.PP
 .in +4n
-.nf
-
+.EX
 typedef struct {
     Elf64_Addr r_offset;
     uint64_t   r_info;
@@ -1693,9 +1693,9 @@ The
 member controls the interpretation
 of
 .IR d_un .
+.PP
 .in +4n
-.nf
-
+.EX
 typedef struct {
     Elf32_Sword    d_tag;
     union {
@@ -1706,9 +1706,9 @@ typedef struct {
 extern Elf32_Dyn _DYNAMIC[];
 .fi
 .in
+.PP
 .in +4n
-.nf
-
+.EX
 typedef struct {
     Elf64_Sxword    d_tag;
     union {
@@ -1899,9 +1899,9 @@ field is not set (e.g., is 0), then there are two sets of notes:
 one for core files and one for all other ELF types.
 If the namespace is unknown, then tools will usually fallback to these sets
 of notes as well.
+.PP
 .in +4n
-.nf
-
+.EX
 typedef struct {
     Elf32_Word n_namesz;
     Elf32_Word n_descsz;
@@ -1909,9 +1909,9 @@ typedef struct {
 } Elf32_Nhdr;
 .fi
 .in
+.PP
 .in +4n
-.nf
-
+.EX
 typedef struct {
     Elf64_Word n_namesz;
     Elf64_Word n_descsz;
index a3ff0a4ca413ee7c2d7b88a6163a527a1ac4ddc3..9a416d63d9c91efa0b050b0482f67794a9716452 100644 (file)
@@ -72,16 +72,16 @@ First, (as superuser) we create a child cgroup in the
 hierarchy, and put the shell into that cgroup:
 .PP
 .EX
-.nf
 .in +4n
+.nf
 # \fBmkdir \-p /sys/fs/cgroup/freezer/sub\fP
 # \fBecho $$\fP                      # Show PID of this shell
 30655
 # \fBsh \-c \(aqecho 30655 > /sys/fs/cgroup/freezer/sub/cgroup.procs\(aq\fP
 # \fBcat /proc/self/cgroup | grep freezer\fP
 7:freezer:/sub
-.in
 .fi
+.in
 .EE
 .PP
 Next, we use
index 0ad417d097857a81d3178a41e9ff77ee0af8ab1c..5f432cf2735d40f027316128a1d33f0403552475 100644 (file)
@@ -171,11 +171,11 @@ Thus, one might mount the
 .I cpu
 controller as follows:
 .PP
-.nf
 .in +4n
+.nf
 mount \-t cgroup \-o cpu none /sys/fs/cgroup/cpu
-.in
 .fi
+.in
 .PP
 It is possible to comount multiple controllers against the same hierarchy.
 For example, here the
@@ -184,11 +184,11 @@ and
 .IR cpuacct
 controllers are comounted against a single hierarchy:
 .PP
-.nf
 .in +4n
+.nf
 mount \-t cgroup \-o cpu,cpuacct none /sys/fs/cgroup/cpu,cpuacct
-.in
 .fi
+.in
 .PP
 Comounting controllers has the effect that a process is in the same cgroup for
 all of the comounted controllers.
@@ -201,11 +201,11 @@ for another.
 .PP
 It is possible to comount all v1 controllers against the same hierarchy:
 .PP
-.nf
 .in +4n
+.nf
 mount \-t cgroup \-o all cgroup /sys/fs/cgroup
-.in
 .fi
+.in
 .PP
 (One can achieve the same result by omitting
 .IR "\-o all" ,
@@ -617,8 +617,8 @@ that are compiled into the kernel.
 An example of the contents of this file (reformatted for readability)
 is the following:
 .IP
-.nf
 .in +4n
+.nf
 #subsys_name    hierarchy      num_cgroups    enabled
 cpuset          4              1              1
 cpu             8              1              1
@@ -632,8 +632,8 @@ perf_event      5              1              1
 net_prio        9              1              1
 hugetlb         0              1              0
 pids            2              1              1
-.in
 .fi
+.in
 .IP
 The fields in this file are, from left to right:
 .RS
index bcc66f01418fd6f494c119cc90aa168fdc9e0a50..63860f4676d97285ab5c3e229a4652fbc12ca197 100644 (file)
@@ -780,9 +780,9 @@ feature test macros are set depending on the glibc version
 and what feature test macros are explicitly set.
 The following shell session, on a system with glibc 2.10,
 shows some examples of what we would see:
+.PP
 .in +4n
-.nf
-
+.EX
 $ \fBcc ftm.c\fP
 $ \fB./a.out\fP
 _POSIX_SOURCE defined
index 3ed33d28b005661491e8057edd5a5d204efdd9be..35fdb1c4b23314c0d0f10857127cb8c4e8ab2a81 100644 (file)
@@ -255,14 +255,14 @@ S_IFIFO   0010000 FIFO
 .PP
 Thus, to test for a regular file (for example), one could write:
 .PP
-.nf
 .in +4n
+.nf
 stat(pathname, &sb);
 if ((sb.st_mode & S_IFMT) == S_IFREG) {
     /* Handle regular file */
 }
-.in
 .fi
+.in
 .PP
 Because tests of the above form are common, additional
 macros are defined by POSIX to allow the test of the file type in
@@ -294,14 +294,14 @@ socket?  (Not in POSIX.1-1996.)
 .PP
 The preceding code snippet could thus be rewritten as:
 .PP
-.nf
 .in +4n
+.nf
 stat(pathname, &sb);
 if (S_ISREG(sb.st_mode)) {
     /* Handle regular file */
 }
-.in
 .fi
+.in
 .PP
 The definitions of most of the above file type test macros
 are provided if any of the following feature test macros is defined:
index 5247829693b18e59f824efa51113e1986000459b..193feca5cf92cf400c37ecb40559fba570ed9f0e 100644 (file)
@@ -103,9 +103,9 @@ see
 Each successful
 .BR read (2)
 returns a buffer containing one or more of the following structures:
+.PP
 .in +4n
-.nf
-
+.EX
 struct inotify_event {
     int      wd;       /* Watch descriptor */
 .\" FIXME . The type of the 'wd' field should probably be "int32_t".
index e29ba2a86422ebcd2129e96ea8ffaf937537a777..e6ec2187890da26eb962cb83461e1e1d72b607c8 100644 (file)
@@ -552,8 +552,8 @@ is the following:
 32100fab I--Q---   4 perm 1f3f0000  1000 65534 keyring  _uid.1000: 2
 32a387ea I--Q---   1 perm 3f010000  1000  1000 keyring  _pid: 2
 3ce56aea I--Q---   5 perm 3f030000  1000  1000 keyring  _ses: 1
-.in
 .fi
+.in
 .IP
 The fields shown in each line of this file are as follows:
 .RS
@@ -714,13 +714,13 @@ This file lists various information for each user ID that
 has at least one key on the system.
 An example of the data that one might see in this file is the following:
 .IP
-.nf
 .in +4n
+.nf
    0:    10 9/9 2/1000000 22/25000000
   42:     9 9/9 8/200 106/20000
 1000:    11 11/11 10/200 271/20000
-.in
 .fi
+.in
 .IP
 The fields shown in each line are as follows:
 .RS
index 3d50fdf1255e219c55b9949fd7fe3990d990f76d..e4a7ede73cccfd31002145531f3f748a525af39e 100644 (file)
@@ -203,9 +203,9 @@ EXAMPLE
 .\" AUTHORS sections are discouraged
 .\" AUTHORS             [Discouraged]
 \fBSEE ALSO\fP
-
-.fi
+.EE
 .in
+.PP
 .IR "Where a traditional heading would apply" ", " "please use it" ;
 this kind of consistency can make the information easier to understand.
 If you must, you can create your own
@@ -550,13 +550,13 @@ macro).
 Complete commands should, if long,
 be written as an indented line on their own,
 with a blank line before and after the command, for example
+.PP
 .in +4n
-.nf
-
+.EX
 man 7 man-pages
-
-.fi
+.EE
 .in
+.PP
 If the command is short, then it can be included inline in the text,
 in italic format, for example,
 .IR "man 7 man-pages" .
index fced6e0979dcbb94f5a51f4cfae2d247fd96b40d..afbb54f5de97b1d3e032b24bd4963cc842006c0f 100644 (file)
@@ -55,13 +55,13 @@ A portable program that needs to check for an error from a mathematical
 function should set
 .I errno
 to zero, and make the following call
+.PP
 .in +4n
-.nf
-
+.EX
 feclearexcept(FE_ALL_EXCEPT);
-
-.fi
+.EE
 .in
+.PP
 before calling a mathematical function.
 .PP
 Upon return from the mathematical function, if
@@ -69,14 +69,14 @@ Upon return from the mathematical function, if
 is nonzero, or the following call (see
 .BR fenv (3))
 returns nonzero
+.PP
 .in +4n
-.nf
-
+.EX
 fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW |
              FE_UNDERFLOW);
-
-.fi
+.EE
 .in
+.PP
 .\" enum
 .\" {
 .\" FE_INVALID = 0x01,
@@ -219,9 +219,9 @@ For example, the following code ensures that
 .BR log (3)'s
 argument is not a NaN and is not zero (a pole error) or
 less than zero (a domain error):
+.PP
 .in +4n
-.nf
-
+.EX
 double x, r;
 
 if (isnan(x) || islessequal(x, 0)) {
@@ -229,9 +229,9 @@ if (isnan(x) || islessequal(x, 0)) {
 }
 
 r = log(x);
-
-.fi
+.EE
 .in
+.PP
 The discussion on this page does not apply to the complex
 mathematical functions (i.e., those declared by
 .IR <complex.h> ),
index f5f2616e24f18b8e8537fddf5f5ba540f4fe8d26..55bdb51c2ca070685971f4f88ac4c766c651aff2 100644 (file)
@@ -284,15 +284,15 @@ we mark one mount point as shared and another as private,
 and then view the mounts in
 .IR /proc/self/mountinfo :
 .PP
-.nf
 .in +4n
+.nf
 sh1# \fBmount \-\-make\-shared /mntS\fP
 sh1# \fBmount \-\-make\-private /mntP\fP
 sh1# \fBcat /proc/self/mountinfo | grep \(aq/mnt\(aq | sed \(aqs/ \- .*//\(aq\fP
 77 61 8:17 / /mntS rw,relatime shared:1
 83 61 8:15 / /mntP rw,relatime
-.in
 .fi
+.in
 .PP
 From the
 .IR /proc/self/mountinfo
@@ -311,25 +311,25 @@ is the root directory,
 .IR / ,
 which is mounted as private:
 .PP
-.nf
 .in +4n
+.nf
 sh1# \fBcat /proc/self/mountinfo | awk \(aq$1 == 61\(aq | sed \(aqs/ \- .*//\(aq\fP
 61 0 8:2 / / rw,relatime
-.in
 .fi
+.in
 .PP
 On a second terminal,
 we create a new mount namespace where we run a second shell
 and inspect the mounts:
 .PP
-.nf
 .in +4n
+.nf
 $ \fBPS1=\(aqsh2# \(aq sudo unshare \-m \-\-propagation unchanged sh\fP
 sh2# \fBcat /proc/self/mountinfo | grep \(aq/mnt\(aq | sed \(aqs/ \- .*//\(aq\fP
 222 145 8:17 / /mntS rw,relatime shared:1
 225 145 8:15 / /mntP rw,relatime
-.in
 .fi
+.in
 .PP
 The new mount namespace received a copy of the initial mount namespace's
 mount points.
@@ -349,8 +349,8 @@ and
 .IR /mntP
 and inspect the set-up:
 .PP
-.nf
 .in +4n
+.nf
 sh2# \fBmkdir /mntS/a\fP
 sh2# \fBmount /dev/sdb6 /mntS/a\fP
 sh2# \fBmkdir /mntP/b\fP
@@ -360,8 +360,8 @@ sh2# \fBcat /proc/self/mountinfo | grep \(aq/mnt\(aq | sed \(aqs/ \- .*//\(aq\fP
 225 145 8:15 / /mntP rw,relatime
 178 222 8:22 / /mntS/a rw,relatime shared:2
 230 225 8:23 / /mntP/b rw,relatime
-.in
 .fi
+.in
 .PP
 From the above, it can be seen that
 .IR /mntS/a
@@ -377,14 +377,14 @@ but the new mount created under the private mount point
 .IR /mntP
 did not propagate:
 .PP
-.nf
 .in +4n
+.nf
 sh1# \fBcat /proc/self/mountinfo | grep \(aq/mnt\(aq | sed \(aqs/ \- .*//\(aq\fP
 77 61 8:17 / /mntS rw,relatime shared:1
 83 61 8:15 / /mntP rw,relatime
 179 77 8:22 / /mntS/a rw,relatime shared:2
-.in
 .fi
+.in
 .\"
 .SS MS_SLAVE example
 Making a mount point a slave allows it to receive propagated
@@ -399,38 +399,38 @@ from having side effects in other namespaces.
 We can demonstrate the effect of slaving by first marking
 two mount points as shared in the initial mount namespace:
 .PP
-.nf
 .in +4n
+.nf
 sh1# \fBmount \-\-make\-shared /mntX\fP
 sh1# \fBmount \-\-make\-shared /mntY\fP
 sh1# \fBcat /proc/self/mountinfo | grep \(aq/mnt\(aq | sed \(aqs/ \- .*//\(aq\fP
 132 83 8:23 / /mntX rw,relatime shared:1
 133 83 8:22 / /mntY rw,relatime shared:2
-.in
 .fi
+.in
 .PP
 On a second terminal,
 we create a new mount namespace and inspect the mount points:
 .PP
-.nf
 .in +4n
+.nf
 sh2# \fBunshare \-m \-\-propagation unchanged sh\fP
 sh2# \fBcat /proc/self/mountinfo | grep \(aq/mnt\(aq | sed \(aqs/ \- .*//\(aq\fP
 168 167 8:23 / /mntX rw,relatime shared:1
 169 167 8:22 / /mntY rw,relatime shared:2
-.in
 .fi
+.in
 .PP
 In the new mount namespace, we then mark one of the mount points as a slave:
 .PP
-.nf
 .in +4n
+.nf
 sh2# \fBmount \-\-make\-slave /mntY\fP
 sh2# \fBcat /proc/self/mountinfo | grep \(aq/mnt\(aq | sed \(aqs/ \- .*//\(aq\fP
 168 167 8:23 / /mntX rw,relatime shared:1
 169 167 8:22 / /mntY rw,relatime master:2
-.in
 .fi
+.in
 .PP
 From the above output, we see that
 .IR /mntY
@@ -442,14 +442,14 @@ Continuing in the new namespace, we create submounts under each of
 and
 .IR /mntY :
 .PP
-.nf
 .in +4n
+.nf
 sh2# \fBmkdir /mntX/a\fP
 sh2# \fBmount /dev/sda3 /mntX/a\fP
 sh2# \fBmkdir /mntY/b\fP
 sh2# \fBmount /dev/sda5 /mntY/b\fP
-.in
 .fi
+.in
 .PP
 When we inspect the state of the mount points in the new mount namespace,
 we see that
@@ -459,15 +459,15 @@ was created as a new shared mount
 .IR /mntY/b
 was created as a private mount:
 .PP
-.nf
 .in +4n
+.nf
 sh2# \fBcat /proc/self/mountinfo | grep \(aq/mnt\(aq | sed \(aqs/ \- .*//\(aq\fP
 168 167 8:23 / /mntX rw,relatime shared:1
 169 167 8:22 / /mntY rw,relatime master:2
 173 168 8:3 / /mntX/a rw,relatime shared:3
 175 169 8:5 / /mntY/b rw,relatime
-.in
 .fi
+.in
 .PP
 Returning to the first terminal (in the initial mount namespace),
 we see that the mount
@@ -478,21 +478,21 @@ but the mount
 .IR /mntY/b
 was not propagated:
 .PP
-.nf
 .in +4n
+.nf
 sh1# \fBcat /proc/self/mountinfo | grep \(aq/mnt\(aq | sed \(aqs/ \- .*//\(aq\fP
 132 83 8:23 / /mntX rw,relatime shared:1
 133 83 8:22 / /mntY rw,relatime shared:2
 174 132 8:3 / /mntX/a rw,relatime shared:3
-.in
 .fi
+.in
 .PP
 Now we create a new mount point under
 .IR /mntY
 in the first shell:
 .PP
-.nf
 .in +4n
+.nf
 sh1# \fBmkdir /mntY/c\fP
 sh1# \fBmount /dev/sda1 /mntY/c\fP
 sh1# \fBcat /proc/self/mountinfo | grep '/mnt' | sed 's/ \- .*//'\fP
@@ -500,24 +500,24 @@ sh1# \fBcat /proc/self/mountinfo | grep '/mnt' | sed 's/ \- .*//'\fP
 133 83 8:22 / /mntY rw,relatime shared:2
 174 132 8:3 / /mntX/a rw,relatime shared:3
 178 133 8:1 / /mntY/c rw,relatime shared:4
-.in
 .fi
+.in
 .PP
 When we examine the mount points in the second mount namespace,
 we see that in this case the new mount has been propagated
 to the slave mount point,
 and that the new mount is itself a slave mount (to peer group 4):
 .PP
-.nf
 .in +4n
+.nf
 sh2# \fBcat /proc/self/mountinfo | grep \(aq/mnt\(aq | sed \(aqs/ \- .*//\(aq\fP
 168 167 8:23 / /mntX rw,relatime shared:1
 169 167 8:22 / /mntY rw,relatime master:2
 173 168 8:3 / /mntX/a rw,relatime shared:3
 175 169 8:5 / /mntY/b rw,relatime
 179 169 8:1 / /mntY/c rw,relatime master:4
-.in
 .fi
+.in
 .\"
 .SS MS_UNBINDABLE example
 One of the primary purposes of unbindable mounts is to avoid
@@ -527,21 +527,21 @@ The problem is illustrated by the following shell session.
 .PP
 Suppose we have a system with the following mount points:
 .PP
-.nf
 .in +4n
+.nf
 # \fBmount | awk \(aq{print $1, $2, $3}\(aq\fP
 /dev/sda1 on /
 /dev/sdb6 on /mntX
 /dev/sdb7 on /mntY
-.in
 .fi
+.in
 .PP
 Suppose furthermore that we wish to recursively bind mount
 the root directory under several users' home directories.
 We do this for the first user, and inspect the mount points:
 .PP
-.nf
 .in +4n
+.nf
 # \fBmount \-\-rbind / /home/cecilia/\fP
 # \fBmount | awk \(aq{print $1, $2, $3}\(aq\fP
 /dev/sda1 on /
@@ -550,14 +550,14 @@ We do this for the first user, and inspect the mount points:
 /dev/sda1 on /home/cecilia
 /dev/sdb6 on /home/cecilia/mntX
 /dev/sdb7 on /home/cecilia/mntY
-.in
 .fi
+.in
 .PP
 When we repeat this operation for the second user,
 we start to see the explosion problem:
 .PP
-.nf
 .in +4n
+.nf
 # \fBmount \-\-rbind / /home/henry\fP
 # \fBmount | awk \(aq{print $1, $2, $3}\(aq\fP
 /dev/sda1 on /
@@ -572,8 +572,8 @@ we start to see the explosion problem:
 /dev/sda1 on /home/henry/home/cecilia
 /dev/sdb6 on /home/henry/home/cecilia/mntX
 /dev/sdb7 on /home/henry/home/cecilia/mntY
-.in
 .fi
+.in
 .PP
 Under
 .IR /home/henry ,
@@ -587,8 +587,8 @@ that were created in the previous step.
 Upon repeating the step for a third user,
 it becomes obvious that the explosion is exponential in nature:
 .PP
-.nf
 .in +4n
+.nf
 # \fBmount \-\-rbind / /home/otto\fP
 # \fBmount | awk \(aq{print $1, $2, $3}\(aq\fP
 /dev/sda1 on /
@@ -615,8 +615,8 @@ it becomes obvious that the explosion is exponential in nature:
 /dev/sda1 on /home/otto/home/henry/home/cecilia
 /dev/sdb6 on /home/otto/home/henry/home/cecilia/mntX
 /dev/sdb7 on /home/otto/home/henry/home/cecilia/mntY
-.in
 .fi
+.in
 .PP
 The mount explosion problem in the above scenario can be avoided
 by making each of the new mounts unbindable.
@@ -624,16 +624,16 @@ The effect of doing this is that recursive mounts of the root
 directory will not replicate the unbindable mounts.
 We make such a mount for the first user:
 .PP
-.nf
 .in +4n
+.nf
 # \fBmount \-\-rbind \-\-make\-unbindable / /home/cecilia\fP
-.in
 .fi
+.in
 .PP
 Before going further, we show that unbindable mounts are indeed unbindable:
 .PP
-.nf
 .in +4n
+.nf
 # \fBmkdir /mntZ\fP
 # \fBmount \-\-bind /home/cecilia /mntZ\fP
 mount: wrong fs type, bad option, bad superblock on /home/cecilia,
@@ -641,25 +641,25 @@ mount: wrong fs type, bad option, bad superblock on /home/cecilia,
 
        In some cases useful info is found in syslog \- try
        dmesg | tail or so.
-.in
 .fi
+.in
 .PP
 Now we create unbindable recursive bind mounts for the other two users:
 .PP
-.nf
 .in +4n
+.nf
 # \fBmount \-\-rbind \-\-make\-unbindable / /home/henry\fP
 # \fBmount \-\-rbind \-\-make\-unbindable / /home/otto\fP
-.in
 .fi
+.in
 .PP
 Upon examining the list of mount points,
 we see there has been no explosion of mount points,
 because the unbindable mounts were not replicated
 under each user's directory:
 .PP
-.nf
 .in +4n
+.nf
 # \fBmount | awk \(aq{print $1, $2, $3}\(aq\fP
 /dev/sda1 on /
 /dev/sdb6 on /mntX
@@ -673,8 +673,8 @@ under each user's directory:
 /dev/sda1 on /home/otto
 /dev/sdb6 on /home/otto/mntX
 /dev/sdb7 on /home/otto/mntY
-.in
 .fi
+.in
 .\"
 .SS Propagation type transitions
 The following table shows the effect that applying a new propagation type
@@ -864,43 +864,43 @@ the
 filesystem remains visible at the correct location
 in the chroot-ed environment.
 .PP
-.nf
 .in +4n
+.nf
 # \fBmkdir \-p /mnt/proc\fP
 # \fBmount \-\-bind / /mnt\fP
 # \fBmount \-\-bind /proc /mnt/proc\fP
-.in
 .fi
+.in
 .PP
 Next, we ensure that the
 .IR /mnt
 mount is a shared mount in a new peer group (with no peers):
 .PP
-.nf
 .in +4n
+.nf
 # \fBmount \-\-make\-private /mnt\fP  # Isolate from any previous peer group
 # \fBmount \-\-make\-shared /mnt\fP
 # \fBcat /proc/self/mountinfo | grep \(aq/mnt\(aq | sed \(aqs/ \- .*//\(aq\fP
 239 61 8:2 / /mnt ... shared:102
 248 239 0:4 / /mnt/proc ... shared:5
-.in
 .fi
+.in
 .PP
 Next, we bind mount
 .IR /mnt/etc
 onto
 .IR /tmp/etc :
 .PP
-.nf
 .in +4n
+.nf
 # \fBmkdir \-p /tmp/etc\fP
 # \fBmount \-\-bind /mnt/etc /tmp/etc\fP
 # \fBcat /proc/self/mountinfo | egrep \(aq/mnt|/tmp/\(aq | sed \(aqs/ \- .*//\(aq\fP
 239 61 8:2 / /mnt ... shared:102
 248 239 0:4 / /mnt/proc ... shared:5
 267 40 8:2 /etc /tmp/etc ... shared:102
-.in
 .fi
+.in
 .PP
 Initially, these two mount points are in the same peer group,
 but we then make the
@@ -912,16 +912,16 @@ and then make
 shared as well,
 so that it can propagate events to the next slave in the chain:
 .PP
-.nf
 .in +4n
+.nf
 # \fBmount \-\-make\-slave /tmp/etc\fP
 # \fBmount \-\-make\-shared /tmp/etc\fP
 # \fBcat /proc/self/mountinfo | egrep \(aq/mnt|/tmp/\(aq | sed \(aqs/ \- .*//\(aq\fP
 239 61 8:2 / /mnt ... shared:102
 248 239 0:4 / /mnt/proc ... shared:5
 267 40 8:2 /etc /tmp/etc ... shared:105 master:102
-.in
 .fi
+.in
 .PP
 Then we bind mount
 .IR /tmp/etc
@@ -933,8 +933,8 @@ but we then make
 a slave of
 .IR /tmp/etc :
 .PP
-.nf
 .in +4n
+.nf
 # \fBmkdir \-p /mnt/tmp/etc\fP
 # \fBmount \-\-bind /tmp/etc /mnt/tmp/etc\fP
 # \fBmount \-\-make\-slave /mnt/tmp/etc\fP
@@ -943,9 +943,9 @@ a slave of
 248 239 0:4 / /mnt/proc ... shared:5
 267 40 8:2 /etc /tmp/etc ... shared:105 master:102
 273 239 8:2 /etc /mnt/tmp/etc ... master:105
-
+.EE
 .in
-.fi
+.PP
 From the above, we see that
 .IR /mnt
 is the master of the slave
@@ -960,23 +960,23 @@ to the
 directory, which renders the mount with ID 267 unreachable
 from the (new) root directory:
 .PP
-.nf
 .in +4n
+.nf
 # \fBchroot /mnt\fP
-.in
 .fi
+.in
 .PP
 When we examine the state of the mounts inside the chroot-ed environment,
 we see the following:
 .PP
-.nf
 .in +4n
+.nf
 # \fBcat /proc/self/mountinfo | sed \(aqs/ \- .*//\(aq\fP
 239 61 8:2 / / ... shared:102
 248 239 0:4 / /proc ... shared:5
 273 239 8:2 /etc /tmp/etc ... master:105 propagate_from:102
-.in
 .fi
+.in
 .PP
 Above, we see that the mount with ID 273
 is a slave whose master is the peer group 105.
index 9713d35981d0a11e38f3b01e93163aba81412d19..b85f289f8791dc19912e8d3b68b91001c304376e 100644 (file)
@@ -285,14 +285,14 @@ On Linux, message queues are created in a virtual filesystem.
 but the details are likely to differ.)
 This filesystem can be mounted (by the superuser) using the following
 commands:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "#" " mkdir /dev/mqueue"
 .RB "#" " mount \-t mqueue none /dev/mqueue"
-
-.fi
+.EE
 .in
+.PP
 The sticky bit is automatically enabled on the mount directory.
 .PP
 After the filesystem has been mounted, the message queues on the system
@@ -304,14 +304,14 @@ and
 .PP
 The contents of each file in the directory consist of a single line
 containing information about the queue:
+.PP
 .in +4n
-.nf
-
+.EX
 .RB "$" " cat /dev/mqueue/mymq"
 QSIZE:129     NOTIFY:2    SIGNO:0    NOTIFY_PID:8260
-
-.fi
+.EE
 .in
+.PP
 These fields are as follows:
 .TP
 .B QSIZE
index ec0fa79efa1bb2421d42f79eeaa708ad15419690..0cf1167504ad5afb701562bc653ae0a209e5d0be 100644 (file)
@@ -139,9 +139,9 @@ called from multiple threads at the same time.
 POSIX.1-2001 and POSIX.1-2008 require that all functions specified
 in the standard shall be thread-safe,
 except for the following functions:
+.PP
 .in +4n
-.nf
-
+.EX
 asctime()
 basename()
 catgets()
@@ -242,9 +242,9 @@ in an application where asynchronous cancelability is enabled (see
 .PP
 Only the following functions are required to be async-cancel-safe by
 POSIX.1-2001 and POSIX.1-2008:
+.PP
 .in +4n
-.nf
-
+.EX
 pthread_cancel()
 pthread_setcancelstate()
 pthread_setcanceltype()
@@ -855,24 +855,24 @@ Since glibc 2.3.2, the
 .BR getconf (1)
 command can be used to determine
 the system's threading implementation, for example:
-.nf
+.PP
 .in +4n
-
+.EX
 bash$ getconf GNU_LIBPTHREAD_VERSION
 NPTL 2.3.4
-.in
 .fi
+.in
 .PP
 With older glibc versions, a command such as the following should
 be sufficient to determine the default threading implementation:
-.nf
+.PP
 .in +4n
-
+.EX
 bash$ $( ldd /bin/ls | grep libc.so | awk \(aq{print $3}\(aq ) | \\
                 egrep \-i \(aqthreads|nptl\(aq
         Native POSIX Threads Library by Ulrich Drepper et al
-.in
 .fi
+.in
 .SS Selecting the threading implementation: LD_ASSUME_KERNEL
 On systems with a glibc that supports both LinuxThreads and NPTL
 (i.e., glibc 2.3.\fIx\fP), the
@@ -888,14 +888,14 @@ of LinuxThreads.
 (broken) application that depends on some nonconformant behavior
 in LinuxThreads.)
 For example:
-.nf
+.PP
 .in +4n
-
+.EX
 bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\
                 awk \(aq{print $3}\(aq ) | egrep \-i \(aqthreads|nptl\(aq
         linuxthreads-0.10 by Xavier Leroy
-.in
 .fi
+.in
 .SH SEE ALSO
 .ad l
 .nh
index c246001aa4054fcc5ee3c22686bdb77a6e3ef431..45c32c22a755b34d3b069def502ddd9bc8c43d8d 100644 (file)
@@ -754,12 +754,12 @@ jobs on the system.
 A process's autogroup (task group) membership can be viewed via the file
 .IR /proc/[pid]/autogroup :
 .PP
-.nf
 .in +4n
+.nf
 $ \fBcat /proc/1/autogroup\fP
 /autogroup-1 nice 0
-.in
 .fi
+.in
 .PP
 This file can also be used to modify the CPU bandwidth allocated
 to an autogroup.
@@ -878,11 +878,11 @@ the following to modify the autogroup nice value for
 .I all
 of the processes in a terminal session:
 .PP
-.nf
 .in +4n
+.nf
 $ \fBecho 10 > /proc/self/autogroup\fP
-.in
 .fi
+.in
 .SS Real-time features in the mainline Linux kernel
 .\" FIXME . Probably this text will need some minor tweaking
 .\" ask Carsten Emde about this.
@@ -895,9 +895,9 @@ Until the patches have been completely merged into the
 mainline kernel,
 they must be installed to achieve the best real-time performance.
 These patches are named:
+.PP
 .in +4n
-.nf
-
+.EX
 patch-\fIkernelversion\fP-rt\fIpatchversion\fP
 .fi
 .in
index 070235f5da7895b75ad80062dc31e60f2222e7f1..82a88d8d7d4aef0d60cee50ade7bbece7b8f4ca2 100644 (file)
@@ -85,21 +85,21 @@ These operations are also exposed through the
 .BR keyctl (1)
 utility as:
 .PP
-.nf
 .in +4n
+.nf
 keyctl session
 keyctl session - [<prog> <arg1> <arg2> ...]
 keyctl session <name> [<prog> <arg1> <arg2> ...]
-.in
 .fi
+.in
 .PP
 and:
 .PP
-.nf
 .in +4n
+.nf
 keyctl new_session
-.in
 .fi
+.in
 .SH SEE ALSO
 .ad l
 .nh
index 0f6c68f355adab24eb9f3fc6a4525698610f818f..d47c5c6d611c2123d6605d7285e2bebc1de68d75 100644 (file)
@@ -134,9 +134,9 @@ UDP-Litev4/v6 first appeared in Linux 2.6.20.
 .SH BUGS
 .\" FIXME . remove this section once glibc supports UDP-Lite
 Where glibc support is missing, the following definitions are needed:
+.PP
 .in +4n
-.nf
-
+.EX
 #define IPPROTO_UDPLITE     136
 .\" The following two are defined in the kernel in linux/net/udplite.h
 #define UDPLITE_SEND_CSCOV  10
index 0ed3a4fc869a8c9457ed5329d4d7fc977e1cf838..5b29d4d9a6c7851aa5d1f66f77cc07135122f124 100644 (file)
@@ -57,9 +57,9 @@ UNIX domain sockets support passing file descriptors or process credentials
 to other processes using ancillary data.
 .SS Address format
 A UNIX domain socket address is represented in the following structure:
+.PP
 .in +4n
-.nf
-
+.EX
 .\" #define UNIX_PATH_MAX    108
 .\"
 struct sockaddr_un {
@@ -673,8 +673,8 @@ if (getsockname(sfd, (struct sockaddr *) addrp, &addrlen)) == \-1)
     /* handle error */ ;
 
 printf("sun_path = %s\\n", ((struct sockaddr_un *) addrp)\->sun_path);
-.in
 .fi
+.in
 .PP
 This sort of messiness can be avoided if it is guaranteed
 that the applications that
index bafd181ba3faaf1fe3deabe74a65297bb1d6d976..2e4998ff42479e5498a199e03cb98bc4c2f8a05f 100644 (file)
@@ -575,9 +575,9 @@ to user space, so it was reconceived as a vDSO in the current format.
 .BR proc (5)
 .PP
 The documents, examples, and source code in the Linux source code tree:
+.PP
 .in +4n
-.nf
-
+.EX
 Documentation/ABI/stable/vdso
 Documentation/ia64/fsys.txt
 Documentation/vDSO/* (includes examples of using the vDSO)