Re: autotest: problem testing daemons, with possible fix

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

 



On Wed, Nov 24, 2010 at 06:58, Luke Mewburn <lukem@xxxxxxxxxx> 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 <andrew.w.nosenko@xxxxxxxxx>

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf



[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux