Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ zero(7) — DG/UX 5.4.2A

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mmap(2)

fork(2)



zero(7)                          DG/UX 5.4.2                         zero(7)


NAME
       zero - source of zeroes

DESCRIPTION
       /dev/zero is a character special pseudo-device which is a source of
       zeroed memory.  It is primarily intended for use with the mmap(2)
       system call.

       The read(2) system call fills the caller's buffer with zero bytes.

       The write(2) system call succeeds as if it wrote the caller's entire
       buffer, but ignores the data to be written, as the null(7) device
       does.

       The select(2) system call returns READY for both read and write
       operations.

       The mmap(2) system call creates a new zero-initialized memory
       segment, whose size is equal to the len parameter, rounded up to a
       multiple of the system page size.  The off parameter is ignored
       except to check that it is a multiple of the system page size; for
       this reason, it is recommended that the value 0 be used for this
       parameter.  If MAPPRIVATE is specified in the flags parameter, then
       a subsequent fork(2) system call will make a private copy of the
       memory segment for the newly created process.  Otherwise, if
       MAPSHARED is specified in this parameter, then a subsequent fork
       system call will cause the newly created process to share the memory
       segment with its parent; any modification of the memory segment by
       one of the processes will be visible to the other.

       Note that the system page size can be obtained either through
       getpagesize(2) or sysconf(2) with the SCPAGESIZE parameter; both
       calls return identical values.

FILES
       /dev/zero

SEE ALSO
       mmap(2), fork(2).


















Licensed material--property of copyright holder(s)                         1


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026