Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ write(2) — GENIX 4.1A

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

creat(2)

open(2)

pipe(2)



      WRITE(2)                GENIX Programmer's Manual                WRITE(2)



      NAME
           write - write on a file

      SYNOPSIS
           write(fildes, buffer, nbytes)
           char *buffer;

      DESCRIPTION
           A file descriptor is a word returned from a successful open,  creat,
           dup, or pipe(2) call.

           Buffer is the address of nbytes contiguous bytes which  are  written
           on  the  output  file.  The number of characters actually written is
           returned.  It should be regarded as an error if this is not the same
           as requested.

           Writes which are multiples of 1024 characters long and  begin  on  a
           1024-byte boundary in the file are more efficient than any others.

           Writes to the control terminal by a process which is not in the pro-
           cess  group  of  the  termainl  and which is not ignoring or holding
           SIGTTOU signals cause  the  writer's  process  group  to  receive  a
           SIGTTOU  signal  (See  jobs(3)  and  the  description of the LTOSTOP
           option in tty(4) for details).

           On some systems write clears the set-user-id bit on  a  file.   This
           prevents  penetration  of system security by a user who "captures" a
           writeable set-user-id file owned by the super-user.

      SEE ALSO
           creat(2), open(2), pipe(2)

      DIAGNOSTICS
           Returns -1 on error: bad descriptor, buffer address, or count;  phy-
           sical I/O errors.




















      Printed 11/16/83                                                        1



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