/*++ /* NAME /* mbox_open 3 /* SUMMARY /* mailbox access /* SYNOPSIS /* #include <mbox_open.h> /* /* typedef struct { /* .in +4
/* /* public members... */ /* VSTREAM *fp; /* .in -4 /* } MBOX; /* /* MBOX *mbox_open(path, flags, mode, st, user, group, lock_style, /* def_dsn, why) /* const char *path; /* int flags; /* mode_t mode; /* struct stat *st; /* uid_t user; /* gid_t group; /* int lock_style; /* const char *def_dsn; /* DSN_BUF *why; /* /* void mbox_release(mbox) /* MBOX *mbox; /* /* const char *mbox_dsn(err, def_dsn) /* int err; /* const char *def_dsn; /* DESCRIPTION /* This module manages access to UNIX mailbox-style files. /* /* mbox_open() acquires exclusive access to the named file. /* The \fBpath, flags, mode, st, user, group, why\fR arguments /* are passed to the \fBsafe_open\fR() routine. Attempts to change /* file ownership will succeed only if the process runs with /* adequate effective privileges. /* The \fBlock_style\fR argument specifies a lock style from /* mbox_lock_mask(). Locks are applied to regular files only. /* The result is a handle that must be destroyed by mbox_release(). /* The \fBdef_dsn\fR argument is given to mbox_dsn(). /* /* mbox_release() releases the named mailbox. It is up to the /* application to close the stream. /* /* mbox_dsn() translates an errno value to a mailbox related /* enhanced status code. /* .IP "EAGAIN, ESTALE" /* These result in a 4.2.0 soft error (mailbox problem). /* .IP ENOSPC /* This results in a 4.3.0 soft error (mail system full). /* .IP "EDQUOT, EFBIG" /* These result in a 5.2.2 hard error (mailbox full). /* .PP /* All other errors are assigned the specified default error /* code. Typically, one would specify 4.2.0 or 5.2.0. /* DIAGNOSTICS /* mbox_open() returns a null pointer in case of problems, and /* sets errno to EAGAIN if someone else has exclusive access. /* Other errors are likely to have a more permanent nature. /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this software. /* AUTHOR(S) /* Wietse Venema /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA
/*--*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.