From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,2da5d5e41670269 X-Google-Attributes: gidfee84,public From: dblake@popper.ucsf.edu (David T. Blake) Subject: Re: nanosleep ? Date: 1999/08/23 Message-ID: #1/1 X-Deja-AN: 516167121 References: <37BCF41F.1EC5804D@de.ans.thomson-csf.com> <37C0ED14.9560FA43@psi.ch> <37C14023.B0712F05@compaq.com> Organization: UCSF, ITS User-Agent: slrn/0.9.5.4 (UNIX) Reply-To: dblake@phy.ucsf.edu Newsgroups: comp.unix.osf.osf1 Dave Butenhof wrote: > Mark Koennecke wrote: > > > It is in the man pages as nanosleep for DU4.0D. But for some reason I > > call the function as nanosleep_d9. > > The "_d9" identifies that version of nanosleep with the long-since > obsolete "draft 9" of the document that eventually (that is, 6 years > ago) became the POSIX 1003.1b-1993 "realtime" standard. You shouldn't be > using that obsolete (and undocumented) function, as it may be removed > "at any time". > > The POSIX 1003.1b-1993 nanosleep() function can be found, as someone > already said, in the librt library. You must use -lrt when linking any > program that uses it. I have a question for someone knowledgable on Dec's libc library. I tried to use the wordexp function in a C program only to have it fail. I compiled with debugging symbols and ran dbx only to find the problem. The wordexp function in the c library makes a call to ksh -c set -- ~/.Xdef*; echo $#; while [ $# -gt 0 ]; do \ echo "${#1}"; echo "$1"; shift; done So that if the environment is not what ksh wants, you get a return value of zero. What do I need to do in my program to ensure that the above ksh call works properly ? On a second note, it is pretty messed up to have your C library functions rely on ksh expansions. It really ought to go the other way. -- Dave Blake dblake@phy.ucsf.edu