[Gllug] Broken xinetd?

Steve Nelson sanelson at gmail.com
Thu Oct 27 15:25:06 UTC 2005


Chums,

In trying to do some debugging work on xinetd, I am wondering if I
have discovered a bug.  Stopping the service, and running it manually,
with the -d flag is supposed to produce debug input on stdout.

This worked, in so far as debug output appeared on the screen....

I attempted to then redirect stdout to a file, but to no avail. 
Thinking perhaps the info was on stderr I redirected this too, but
still collected no data.

strace shows:

close(1023)                             = -1 EBADF (Bad file
descriptor) # Lots and lots of times....
dup(2)                                  = 3
close(3)                                = 0
open(/dev/null, O_RDONLY)             = 3
dup2(3, 0)                              = 0
dup2(3, 1)                              = 1
close(3)                                = 0
open(/dev/tty, O_WRONLY|O_APPEND)     = 3
fstat64(3, {st_mode=S_IFCHR|0666, st_rdev=makedev(5, 0), ...}) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
geteuid32()                             = 0
pipe([4, 5])                            = 0
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
fcntl64(5, F_SETFD, FD_CLOEXEC)         = 0
rt_sigaction(SIGHUP, {0x805e0f0, [], SA_RESTORER, 0x1faeb8}, NULL, 8) = 0

To my untrained eye, this looks like a failure to allocate a file
descriptor, and a fallback to send data to the console (and thus not
be capturable using standard file descriptors).

Does this sound realistic? (or do I need to provide more strace context?)

Of course I can just use xinetd's logfile option, so this is not
important, but out of interest, any suggest hacks around this problem?

Version info:

xinetd Version 2.3.12 libwrap loadavg
xinetd-2.3.12-6.3E

S.
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list