FreeBSD Bugzilla – Attachment 161254 Details for
Bug 203252
[patch] usbhidaction does not save the right PID in daemon mode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
usbhidaction.c diff
usbhidaction.diff (text/plain), 673 bytes, created by
Maxime Soulé
on 2015-09-21 21:04:14 UTC
(
hide
)
Description:
usbhidaction.c diff
Filename:
MIME Type:
Creator:
Maxime Soulé
Created:
2015-09-21 21:04:14 UTC
Size:
673 bytes
patch
obsolete
>--- usbhidaction.c.orig 2015-09-21 22:54:23.315840261 +0200 >+++ usbhidaction.c 2015-09-21 22:56:36.976818123 +0200 >@@ -166,17 +166,18 @@ > > if (demon) { > fp = open(pidfile, O_WRONLY|O_CREAT, S_IRUSR|S_IRGRP|S_IROTH); >- if (fp >= 0) { >- sz1 = snprintf(buf, sizeof buf, "%ld\n", >- (long)getpid()); >- if (sz1 > sizeof buf) >- sz1 = sizeof buf; >- write(fp, buf, sz1); >- close(fp); >- } else >+ if (fp < 0) > err(1, "%s", pidfile); >+ > if (daemon(0, 0) < 0) > err(1, "daemon()"); >+ >+ sz1 = snprintf(buf, sizeof buf, "%ld\n", (long)getpid()); >+ if (sz1 > sizeof buf) >+ sz1 = sizeof buf; >+ write(fp, buf, sz1); >+ close(fp); >+ > isdemon = 1; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 203252
: 161254