Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Aug 1997 13:56:17 +0200 (MEST)
From:      Søren Schmidt <sos@sos.freebsd.dk>
To:        current@freebsd.org (FreeBSD current)
Subject:   Error in sleep !
Message-ID:  <199708121156.NAA02332@sos.freebsd.dk>

next in thread | raw e-mail | index | archive | help

I've noticed sleep is"broken in current..
Run the little program at the end, and notice that the program exits 
the sleep call prematurely if a signal is catched. The remaining
sleep period is not resumed after the signal..
This works as expected on 2.2.1 and the 10 or so other platforms
I've tested sofar...

Peter ??

#include <signal.h>

myfunc()
{
        printf("signal!\n");
}
main()
{
        signal(SIGINT, myfunc);
        printf("running\n");
        sleep(20);
        printf("stopping\n");
}

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Søren Schmidt               (sos@FreeBSD.org)               FreeBSD Core Team
                Even more code to hack -- will it ever end
..



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