At 01:59 PM Monday 9/13/99, Eric Dahnke wrote:
>Hello list,
>
>DESCRIPTION
>        qmail-queue  reads  a  mail message from descriptor 0.  It
>        then reads envelope information  from  descriptor  1.
>
>In reference to this, I thought descriptor 0 was STDIN and descriptor 1
>was STDOUT, How can qmail-queue read envelop information from descriptor
>1.


STDIN and STDOUT are just conventions adopted/supported by most shells and
the standard C library.

That they are bound to fd 0 and 1 respectively is likewise a convention. In
fact, there is nothing magic about the first 3 descriptors (there is STDERR
as well) and they are created in the same way as any other descriptors. That
is via an open() or socket() type system call.

There is nothing stopping any program or set of co-operative programs for
using an description in any way they see fit. DjB tends to have a number of
descriptor conventions for co-operative programs. Witness qmail-queue and
qmail-popup (which uses 4 descriptors).



Mark.

Reply via email to