Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!olivea!mintaka!spdcc!dirtydog.ima.isc.com!ism.isc.com!ispd-newsserver!kcwong From: kcwong@ssd.kodak.com (K.C. Wong) Newsgroups: comp.windows.open-look Subject: wait() call in xview Message-ID: <1991Jun21.125203.6899@ssd.kodak.com> Date: 21 Jun 91 12:52:03 GMT Sender: news@ssd.kodak.com Organization: Eastman Kodak Lines: 35 Originator: kcwong@osprey.ssd.kodak.com The Xview programming manual says not to use wait() and wait3() calls. Is it safe to use wait4() calls? I found that some times using the notify_set_wait3_func() call not practical. It throws my processing off logically. For example, on a sparc station 2, I would like to find out if the floppy is in the drive before doing any writing by making the system call "eject -q" (which takes only a fraction of a second). Using the callback scheme with notify_set_wait3_func() is inconvenient at best. I would like to do, pid = fork() in child, exec ("eject -q") in parent, wait4(pid,...) non-blocking in a loop, and check the exit code value. if exit code values is 0 (=> floppy is in) perform something. Since the call I exec takes such a short time, could I do the above? I don't want to handle any events during these processing. Your input is very welcome. Regards, K.C.Wong kcwong@ssd.kodak.com ------------------