Xref: utzoo comp.os.minix:5742 comp.sys.atari.st:16143 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!pprg.unm.edu!hc!lll-winken!uunet!portal!cup.portal.com!DeadHead From: DeadHead@cup.portal.com (Bruce M Ong) Newsgroups: comp.os.minix,comp.sys.atari.st Subject: Re: Real time clock from MINIX? Message-ID: <18018@cup.portal.com> Date: 6 May 89 04:51:30 GMT References: <2398@brahma.cs.hw.ac.uk> Distribution: usa Organization: The Portal System (TM) Lines: 48 I got a question... is minix's sleep() broken, or it's because I dont know exactly what sleep does? I have two programs --- test1.c --- main() { sleep(50); } --- test2.c --- main() { int i = 0; while (i < 10) { ++i; print("\nGoing to sleep for a while"); sleep(3); printf("\nI am now awake"); } } if you execute the programs like this $test1 & 130 $test2 Then test2 will terminate after looping few times, but test1 will never wake up... I havent tried it on other unix systems, yet... am I doing something wrong with sleep()? I remember reading somewhere in the text saying the wake up call does not know which one to wake up, it just sends a wake up signal.. is that why? I am using sleep() to implement a printer spooler (the daemon scans the directory every several seconds); and I am also using creat(2) to create queue locks - if it cant lock a queue file it will sleep 2 seconds or so and try again. But after running the queue program, the printer daemon just slips into a coma... Does anybody else have the problem? I am using MINIX 1.2 for the AT. bruce deadhead@cup.portal.com