M. Warner Losh i...@bsdimp.com writes:
+ /*
+ * Close the PID file, and all other open descriptors.
+ * Inherit std{in,out,err} only.
+ */
+ cfg.close_pidfile();
+ ::closefrom(3);
Actually, closefrom() is sufficient,
In message: 86r5jqdz9w@ds4.des.no
Dag-Erling Smørgrav d...@des.no writes:
: M. Warner Losh i...@bsdimp.com writes:
: + /*
: +* Close the PID file, and all other open descriptors.
: +* Inherit std{in,out,err} only.
: +*/
: +
M. Warner Losh i...@bsdimp.com writes:
I went ahead and used pidfile_close in this context because that's
what's recommended in the man page. I know it is likely redundant,
but I thought better safe than sorry...
agreed...
DES
--
Dag-Erling Smørgrav - d...@des.no
M. Warner Losh i...@bsdimp.com writes:
Why not fix pidfile_open to not return a file handle when the PID
doesn't match?
It doesn't. If it can't lock the file, or if fstat(2) fails after it
has locked the file, it returns NULL.
DES
--
Dag-Erling Smørgrav - d...@des.no
M. Warner Losh i...@bsdimp.com writes:
Maybe the real problem is that devd locks the file, then dies. The
file remains locked, so the flopen is failing with EWOULDBLOCK.
The lock is released when the process that holds it terminates.
But I suspect the real real problem is the implicit
Dag-Erling Smørgrav d...@des.no writes:
M. Warner Losh i...@bsdimp.com writes:
Maybe the real problem is that devd locks the file, then dies. The
file remains locked, so the flopen is failing with EWOULDBLOCK.
The lock is released when the process that holds it terminates.
But I suspect
Dag-Erling Smørgrav d...@des.no writes:
- Under flock semantics (flock(2) locks), the lock is released when
*all* file descriptors the process holds for that file is closed.
are, even, and sorry for the horrid quoting.
DES
--
Dag-Erling Smørgrav - d...@des.no
In message: 86mxuf7eli@ds4.des.no
Dag-Erling Smørgrav d...@des.no writes:
: M. Warner Losh i...@bsdimp.com writes:
: Why not fix pidfile_open to not return a file handle when the PID
: doesn't match?
:
: It doesn't. If it can't lock the file, or if fstat(2) fails after it
: has
In message: 86iq537egy@ds4.des.no
Dag-Erling Smørgrav d...@des.no writes:
: M. Warner Losh i...@bsdimp.com writes:
: Maybe the real problem is that devd locks the file, then dies. The
: file remains locked, so the flopen is failing with EWOULDBLOCK.
:
: The lock is released
In message: aanlktiki223vbybdeqlua6fjcbbeqcqfujoimp5ho...@mail.gmail.com
Garrett Cooper yanef...@gmail.com writes:
: On Sun, Jun 27, 2010 at 3:08 PM, M. Warner Losh i...@bsdimp.com wrote:
: In message: aanlktilnygnz7v6z6akeksquvomn8ylvo57gm1goi...@mail.gmail.com
: Garrett
M. Warner Losh i...@bsdimp.com writes:
Dag-Erling Smørgrav d...@des.no writes:
M. Warner Losh i...@bsdimp.com writes:
Maybe the real problem is that devd locks the file, then dies. The
file remains locked, so the flopen is failing with EWOULDBLOCK.
The lock is released when the process
2010/6/28 Dag-Erling Smørgrav d...@des.no:
M. Warner Losh i...@bsdimp.com writes:
Dag-Erling Smørgrav d...@des.no writes:
M. Warner Losh i...@bsdimp.com writes:
Maybe the real problem is that devd locks the file, then dies. The
file remains locked, so the flopen is failing with
On Sun, Jun 27, 2010 at 3:08 PM, M. Warner Losh i...@bsdimp.com wrote:
In message: aanlktilnygnz7v6z6akeksquvomn8ylvo57gm1goi...@mail.gmail.com
Garrett Cooper yanef...@gmail.com writes:
: On Sat, Jun 26, 2010 at 1:45 PM, Garrett Cooper yanef...@gmail.com wrote:
: On Sat, Jun 26,
In message: aanlktimpbazy2gu8fsly6wqdyzvg7c0id-vzeh3a3...@mail.gmail.com
Garrett Cooper yanef...@gmail.com writes:
: This patch is wrong. The problems with it:
:
: (1) You don't need to unlink the pipe. If you can't unlink it, then
: you won't remove the pid file.
:
: The
Garrett Cooper yanef...@gmail.com writes:
It leaves stray unused lockfiles in the directory:
That's normal and harmless.
DES
--
Dag-Erling Smørgrav - d...@des.no
___
freebsd-current@freebsd.org mailing list
2010/6/28 Dag-Erling Smørgrav d...@des.no:
Garrett Cooper yanef...@gmail.com writes:
It leaves stray unused lockfiles in the directory:
That's normal and harmless.
Yeah.. it's just a bit messy :D.
Thanks for the help!
-Garrett
___
On Sat, Jun 26, 2010 at 10:50 PM, Doug Barton do...@freebsd.org wrote:
On 06/26/10 13:29, Hans Petter Selasky wrote:
Hi,
Sometimes utilities that are started by devd require libraries outside
/usr/lib. One example is the webcamd utility which is started by devd upon
USB
device insertion.
On Mon, 28 Jun 2010, Garrett Cooper wrote:
On Sat, Jun 26, 2010 at 10:50 PM, Doug Barton do...@freebsd.org wrote:
On 06/26/10 13:29, Hans Petter Selasky wrote:
Hi,
Sometimes utilities that are started by devd require libraries outside
/usr/lib. One example is the webcamd utility which is
In message: aanlktilnygnz7v6z6akeksquvomn8ylvo57gm1goi...@mail.gmail.com
Garrett Cooper yanef...@gmail.com writes:
: On Sat, Jun 26, 2010 at 1:45 PM, Garrett Cooper yanef...@gmail.com wrote:
: On Sat, Jun 26, 2010 at 1:29 PM, Hans Petter Selasky hsela...@c2i.net
wrote:
: Hi,
:
:
In message: aanlktilnygnz7v6z6akeksquvomn8ylvo57gm1goi...@mail.gmail.com
Garrett Cooper yanef...@gmail.com writes:
: On Sat, Jun 26, 2010 at 1:45 PM, Garrett Cooper yanef...@gmail.com wrote:
: On Sat, Jun 26, 2010 at 1:29 PM, Hans Petter Selasky hsela...@c2i.net
wrote:
: Hi,
:
:
On Sun, Jun 27, 2010 at 3:08 PM, M. Warner Losh i...@bsdimp.com wrote:
In message: aanlktilnygnz7v6z6akeksquvomn8ylvo57gm1goi...@mail.gmail.com
Garrett Cooper yanef...@gmail.com writes:
: On Sat, Jun 26, 2010 at 1:45 PM, Garrett Cooper yanef...@gmail.com wrote:
: On Sat, Jun 26,
In message: aanlktiki223vbybdeqlua6fjcbbeqcqfujoimp5ho...@mail.gmail.com
Garrett Cooper yanef...@gmail.com writes:
: On Sun, Jun 27, 2010 at 3:08 PM, M. Warner Losh i...@bsdimp.com wrote:
: In message: aanlktilnygnz7v6z6akeksquvomn8ylvo57gm1goi...@mail.gmail.com
: Garrett
On Sat, Jun 26, 2010 at 1:29 PM, Hans Petter Selasky hsela...@c2i.net wrote:
Hi,
Sometimes utilities that are started by devd require libraries outside
/usr/lib. One example is the webcamd utility which is started by devd upon USB
device insertion. What do you think about the following patch:
On Sat, Jun 26, 2010 at 1:45 PM, Garrett Cooper yanef...@gmail.com wrote:
On Sat, Jun 26, 2010 at 1:29 PM, Hans Petter Selasky hsela...@c2i.net wrote:
Hi,
Sometimes utilities that are started by devd require libraries outside
/usr/lib. One example is the webcamd utility which is started by
On 06/26/10 13:29, Hans Petter Selasky wrote:
Hi,
Sometimes utilities that are started by devd require libraries outside
/usr/lib. One example is the webcamd utility which is started by devd upon
USB
device insertion. What do you think about the following patch:
--- devd
25 matches
Mail list logo