I tried to restrict access to a shared resource between processes using the unix system call "lockf". The piece of code is as follows: fd = open(FILENAME, O_CREAT, 0666); lockf(fd, F_LOCK, (long)0); "lockf" always returns with an error and errno is set to "Bad file descriptor". Any help or suggestions are welcome. Thanks. --ravi skumar at hocus.att.com