Date: Tue, 5 Oct 2010 01:23:02 -0700 From: Garrett Cooper <gcooper@FreeBSD.org> To: Daichi GOTO <daichi@ongs.co.jp> Cc: freebsd-fs@freebsd.org, freebsd-current@freebsd.org Subject: Re: fcntl always fails to delete lock file, and PID is always -6464 Message-ID: <AANLkTin=9MKZGf7RREfcReamdJpCQ56BMn_RKy8eOU0-@mail.gmail.com> In-Reply-To: <20101005153410.598e4484.daichi@ongs.co.jp> References: <20101004123725.65d09b9e.daichi@ongs.co.jp> <AANLkTinZg3n3wDUzQFPv_Gq1o2hswGL3%2B4o0brmTi0-h@mail.gmail.com> <20101004144927.36822f07.daichi@ongs.co.jp> <AANLkTimVcLVdULyAAJD-_TaC5OLj%2BaZVNa=%2BSaiN6PKv@mail.gmail.com> <20101005093826.17432b1e.daichi@ongs.co.jp> <AANLkTi=w5ZAfRymSYbL6X37uyYX17J2dW8LHVcPXZ_%2Bb@mail.gmail.com> <20101005153410.598e4484.daichi@ongs.co.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
2010/10/4 Daichi GOTO <daichi@ongs.co.jp>: > Thanks nice test tool :) =C2=A0And at last I got it excepting one mystery= ! > > On Mon, 4 Oct 2010 20:17:08 -0700 > Garrett Cooper <gcooper@FreeBSD.org> wrote: >> Following through the same process on FreeBSD... >> >> Window 1: >> $ ls -l /tmp/lockfile >> ls: /tmp/lockfile: No such file or directory >> $ ./test_fcntl >> >> Window 2: >> >> $ ls -l /tmp/lockfile >> -rwsr-x--- =C2=A01 garrcoop =C2=A0wheel =C2=A00 Oct =C2=A04 20:14 /tmp/l= ockfile >> $ ./test_fcntl >> test_fcntl: fcntl: Resource temporarily unavailable > > Just my mystery is as follow: > > Windows 1: > % ./test_fcntl > My pid: 43490 > > Windows 2: > % ls -l /tmp/lockfile > -r-sr-x--- =C2=A01 daichi =C2=A0wheel =C2=A00 10=E6=9C=88 =C2=A05 15:02 /= tmp/lockfile =C2=A0 =C2=A0<--- is it weird, isn't it? > % ./test_fcntl > test_fcntl: open: Permission denied > % > > Oops... What's wrong... /tmp is as follow: > > % mount | grep tmp > /dev/ada0s1f on /tmp (ufs, local, noatime, soft-updates) > % dumpfs /tmp | grep journal > flags =C2=A0 soft-updates+journal > % > > And working scene: > > Windows 2: > % chmod u+w /tmp/lockfile > % ls -l /tmp/lockfile > -rwsr-x--- =C2=A01 daichi =C2=A0wheel =C2=A00 10=E6=9C=88 =C2=A05 15:22 /= tmp/lockfile > % ./test_fcntl > My pid: 43646 > test_fcntl: fcntl[1]: Resource temporarily unavailable > PID=3D43490 has the lock > % What's your umask and what are the permissions on /tmp?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTin=9MKZGf7RREfcReamdJpCQ56BMn_RKy8eOU0->