Over SLEEPing

Over SLEEPing

Post by SR » Wed, 11 Sep 1996 04:00:00



I am running a SCO Unix OS5 on a Compaq Pentium server. Something strange
is happening.

If I type SLEEP 30 from the command line, the command works fine,
i.e. 30 second pause occurs. However, if I place the same command
within a shell script, I get a 1 min to 1 min 30sec pause. This is
obviously affecting the usability of the system. I have 48 megs of
ram and a 150 mhz pentium chip, so resources wouldn't appear to be
the problem. Anyone got any ideas on possible solutions/causes.

Cheers, Sean.

 
 
 

Over SLEEPing

Post by Bill Verza » Fri, 13 Sep 1996 04:00:00



> Path: pubxfer.news.psi.net!psinntp!psinntp!usenet2.news.uk.psi.net!uknet!usenet1.news.uk.psi.net!uknet!pub.news.uk.psi.net!usenet

> Newsgroups: comp.unix.sco.misc
> Subject: Over SLEEPing
> Date: Tue, 10 Sep 1996 13:57:16 +0100
> Organization: Org
> Lines: 11

> NNTP-Posting-Host: 193.114.44.212
> Mime-Version: 1.0
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> X-Mailer: Mozilla 2.02Gold (Win95; I)

> I am running a SCO Unix OS5 on a Compaq Pentium server. Something strange
> is happening.

> If I type SLEEP 30 from the command line, the command works fine,
> i.e. 30 second pause occurs. However, if I place the same command
> within a shell script, I get a 1 min to 1 min 30sec pause. This is
> obviously affecting the usability of the system. I have 48 megs of
> ram and a 150 mhz pentium chip, so resources wouldn't appear to be
> the problem. Anyone got any ideas on possible solutions/causes.

> Cheers, Sean.

Perhaps try a "renice" command on the script to up it's priority?

 
 
 

1. Sleep in ksh script ignored until the sleep time expires

Hi,

I'm trying to write a ksh script that traps certain signals (HUP,
INT, QUIT, TERM).  For testing, I wrote the following script:

   #!/bin/ksh
   trap 'print Signal caught' HUP INT QUIT TERM
   while :; do
      print "Sleeping ..."
      sleep 30
   done

I ran the script and opened another terminal session and issued a 'kill'
command followed by the PID # of the above script (say 11980):
   $ kill -INT 11980

The script above didn't seem to trap the sent signal immediately.  But
instead, completes the sleep (30 seconds) and then acknowledge the signal
(by invoking the command specified after the "trap" built-in command).

I posted a question to IBM, but the AIX Support person was unable to
duplicate the situation.  He indicated during his testing that the signal
was caught by the "trap" command immediately without waiting for the sleep
to expire when he sent a signal using 'kill' to the PID of the ksh script.

The script, however, did get interrupted immediately if I type Ctrl-C
on the same terminal session running the script -- but this won't help me.

Has anyone seen this problem?  Any known solution?

Thanks ..

----------------------------------------------------------------------
Okki Tranggana                    |    

tel:   (408) 974-7323             |    1 Infinite Loop, MS:76-2TI
fax:   (408) 974-1560             |    Cupertino, CA 95014
--
----------------------------------------------------------------------
Okki Tranggana                    |    

tel:   (408) 974-7323             |    1 Infinite Loop, MS:76-2TI
fax:   (408) 974-1560             |    Cupertino, CA 95014

2. Anybody who knows the Altos Unix system ?

3. Process sleeping < sleep time

4. pine questions

5. Bug in glibc-2.1.1: sleep(0) sleeps 10ms

6. AIX/Improperty unmounting CDROM

7. sleep() sleeps the thread or the proc?

8. faking /dev/cdrom

9. Race: SignalHandler() & sleep()

10. Deep sleep processes

11. sleeping in close .. why?

12. sleep in asm

13. Sleeping function called from illegal context at page_alloc.c:325