Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 07 Mar 2010 18:58:32 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        olli hauer <ohauer@gmx.de>
Cc:        freebsd-ports-bugs@freebsd.org, "Randal L. Schwartz" <merlyn@stonehenge.com>
Subject:   Re: ports/144502: mail/spamd port insists on fdescfs mount
Message-ID:  <4B93F758.2020508@infracaninophile.co.uk>
In-Reply-To: <201003071750.o27Ho2SW027882@freefall.freebsd.org>
References:  <201003071750.o27Ho2SW027882@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/03/2010 17:50:02, olli hauer wrote:

>  At the moment I have only the info mounting fdescfs to /dev/fd is useless,
>  eventually I can improve the check for FreeBSD8 (I'm still running 6.x/7.x in 
>  production and 8.x only for testing and porting).

The behaviour of fdescfs and devfs hasn't changed between 8.x and
earlier versions.  When mounted via devfs, /dev/fd/* will only supply
character special devices for descriptors 0, 1 and 2.  With fdescfs
mounted, you get character special devices for all file descriptors
opened by the process.  See:

http://lists.freebsd.org/pipermail/freebsd-fs/2006-August/002214.html

and the definition of fildesc_drvinit() at the end of
sys/kern/kern_descrip.c (which cvs blame says is unchanged since 2004).

This is not properly documented anywhere I can see.

Anyhow, if STD{IN,OUT,ERR} is sufficient for obspamd then the test in
the init script could be reduced to

    if [ -c /dev/fd/0 ] ; then

Otherwise, testing for fdescfs is correct.

	Cheers,

	Matthew

- -- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
                                                  Kent, CT11 9PW
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuT91gACgkQ8Mjk52CukIxfZQCeIa078E++tODXQXzbiH1Zxm2V
T88An0iJ8YrqbRF2mcsm0aelD/9XKBe9
=+Kz2
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B93F758.2020508>