httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Kasichainula <>
Subject Re: help with fcntl...
Date Tue, 16 Nov 1999 06:57:22 GMT
Greg Stein wrote:
> I suspected that a recent change was going to deadlock me, but figured I'd
> run it anyhow as it seemed suspicious that I hadn't already deadlocked in
> other cases... Well, it didn't deadlock on the fcntl() calls.
> Rooting out the problem, it almost seems like my fcntl() calls aren't
> setting a lock at all(!).

In this test program, you're trying to obtain the lock twice in the
same process. At least on Linux, you are allowed to do this and won't
deadlock. I don't know for sure that this is legal behavior, though,
but it will happen even if two different threads in the same process
go after the same file.

I tried added a sleep call before your test program's exit. When
running a 2nd copy of the program, it blocked until the first copy
exited, as would be expected.

Manoj Kasichainula - manojk at io dot com -

View raw message