Your message dated Sun, 30 Jul 2000 14:55:09 -0400
with message-id <[EMAIL PROTECTED]>
and subject line This is not a bug
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Darren Benham
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 18 Nov 1998 16:07:04 +0000
Received: (qmail 1448 invoked from network); 18 Nov 1998 16:07:01 -0000
Received: from mail.cs.tu-berlin.de ([EMAIL PROTECTED])
  by master.debian.org with SMTP; 18 Nov 1998 16:07:01 -0000
Received: from bolero.cs.tu-berlin.de ([EMAIL PROTECTED] [130.149.19.1])
        by mail.cs.tu-berlin.de (8.9.1/8.9.1) with ESMTP id RAA27113
        for <[EMAIL PROTECTED]>; Wed, 18 Nov 1998 17:04:53 +0100 (MET)
From: Matthias Klose <[EMAIL PROTECTED]>
Received: (from doko@localhost)
        by bolero.cs.tu-berlin.de (8.9.1/8.9.0) id RAA08499
        for [EMAIL PROTECTED]; Wed, 18 Nov 1998 17:04:50 +0100 (MET)
Date: Wed, 18 Nov 1998 17:04:50 +0100 (MET)
Message-Id: <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: sleep(3) doesn't sleep well

Package: libc6
Version: 2.0.7u-5
Severity: important

suspending a process, when it sleeps (sleep(3)), terminates the sleep.

cat s.c
#include <unistd.h>

int main()
{
        sleep(1000);
        return 0;
}

- start the process in the foreground
- suspend it with ^Z
- send it in the background with bg
- the process terminates.
---------------------------------------
Received: (at 29662-done) by bugs.debian.org; 30 Jul 2000 18:55:14 +0000
>From [EMAIL PROTECTED] Sun Jul 30 13:55:14 2000
Return-path: <[EMAIL PROTECTED]>
Received: from ppp01.ts2-2.newportnews.visi.net (blimpo.internal.net) [209.8.198.1] 
        by master.debian.org with esmtp (Exim 3.12 2 (Debian))
        id 13IyEx-0003Zw-00; Sun, 30 Jul 2000 13:55:12 -0500
Received: from bmc by blimpo.internal.net with local (Exim 3.12 #1 (Debian))
        id 13IyEv-0005ss-00
        for <[EMAIL PROTECTED]>; Sun, 30 Jul 2000 14:55:09 -0400
Date: Sun, 30 Jul 2000 14:55:09 -0400
From: Ben Collins <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: This is not a bug
Message-ID: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
User-Agent: Mutt/1.0.1i
Sender: Ben Collins <[EMAIL PROTECTED]>
Delivered-To: [EMAIL PROTECTED]

After reading the sleep(3) documentation, it is apparent that you are not
using sleep() properly. Note it reads that sleep() will return 0 when done
or the number of seconds left to sleep. So the snippet below would be the
proper usage:

        #include <unistd.h>

        int main()
        {
                int t = 1000;
                while ((t = sleep(t)) > 0); /* do nothing */
                return 0;
        }

Sleep(3) is not required to wait the entire time, so subsequent calls may be
needed to complete the entire time. Closing this bug report as such.

-- 
 -----------=======-=-======-=========-----------=====------------=-=------
/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`  [EMAIL PROTECTED]  --  [EMAIL PROTECTED]  --  [EMAIL PROTECTED]  '
 `---=========------=======-------------=-=-----=-===-======-------=--=---'


--  
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to