kcwong@ssd.kodak.com (K.C. Wong) (06/21/91)
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 ------------------