| Summary: | [patch] usbhidaction does not save the right PID in daemon mode | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Maxime Soulé <btik-fbsd> | ||||
| Component: | usb | Assignee: | Hans Petter Selasky <hselasky> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Many People | CC: | btik-fbsd, hselasky | ||||
| Priority: | --- | Keywords: | patch | ||||
| Version: | 10.2-RELEASE | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
A commit references this bug: Author: hselasky Date: Mon Sep 28 07:23:05 UTC 2015 New revision: 288335 URL: https://svnweb.freebsd.org/changeset/base/288335 Log: Store PID after becoming a daemon() and not before to ensure the correct PID gets written to the PID file. Submitted by: Maxime Soule <btik-fbsd@scoubidou.com> PR: 203252 MFC after: 2 weeks Changes: head/usr.bin/usbhidaction/usbhidaction.c A commit references this bug: Author: hselasky Date: Tue Oct 13 08:19:22 UTC 2015 New revision: 289217 URL: https://svnweb.freebsd.org/changeset/base/289217 Log: MFC r288335: Store PID after becoming a daemon() and not before to ensure the correct PID gets written to the PID file. PR: 203252 Changes: _U stable/9/usr.bin/ _U stable/9/usr.bin/usbhidaction/ stable/9/usr.bin/usbhidaction/usbhidaction.c A commit references this bug: Author: hselasky Date: Tue Oct 13 08:21:15 UTC 2015 New revision: 289218 URL: https://svnweb.freebsd.org/changeset/base/289218 Log: MFC r288335: Store PID after becoming a daemon() and not before to ensure the correct PID gets written to the PID file. PR: 203252 Changes: _U stable/10/ stable/10/usr.bin/usbhidaction/usbhidaction.c |
Created attachment 161254 [details] usbhidaction.c diff When launched in daemon mode, usbhidaction saves its PID before calling daemon(). The proposed patch corrects this, still failing before daemon() is called, when the PID file cannot be opened.