autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: autotest: problem testing daemons, with possible fix


From: Andrew W. Nosenko
Subject: Re: autotest: problem testing daemons, with possible fix
Date: Thu, 25 Nov 2010 22:36:23 +0200

On Wed, Nov 24, 2010 at 06:58, Luke Mewburn <address@hidden> wrote:
> Hi folks,
>
> I've been using autotest for a couple of years, for unit tests
> and overall system systems of large daemons, that daemonize
> themselves using the daemon(3) function (originally from 4.4BSD,
> also in glibc).
>
> Until now I've been using a workaround for starting the daemon
> because "something" was preventing AT_CHECK from determining that
> the daemon startup had occurred correctly, so it was hanging in
> the check.  Our workaround was a wrapper program which closes all
> file descriptors before starting the daemon.

Excuse me, but why you didn't close all FDs inside your daemon before
daemonizing at all?

Properly written daemon shoud to do it anyway for preventing opened
FDs to be "leaked" forever (ok, not forever but until the daemon will
be shuted down).

-- 
Andrew W. Nosenko <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]