Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write pidfile on startup #25

Open
nxg opened this issue Nov 8, 2017 · 3 comments
Open

Write pidfile on startup #25

nxg opened this issue Nov 8, 2017 · 3 comments

Comments

@nxg
Copy link

nxg commented Nov 8, 2017

It would be nice if mdnsd wrote its PID to a /var/run file, so that the daemon can be conveniently killed within an rc script.

It would appear that calling pidfile(3) somewhere near the beginning of main would be sufficient to set this up rather nicely.

@haesbaert
Copy link
Owner

pidfile(3) is not POSIX, actually non of my systems have it.

But yes, writing a pidfile would be nice, I'll get to it once I find sometime.

@nxg
Copy link
Author

nxg commented Nov 24, 2017

It's not in POSIX, no, but it appears to be in OpenBSD.

That would of course create a problem for the downstream port to FreeBSD, which is the one I'd be interested in; but my impression (not sure where from, now!) was that you were targeting OpenBSD, so guessed you might be OK with a distro-specific solution.

@haesbaert
Copy link
Owner

ha !
you're right.

Well I don't maintain the freebsd port, so that's their issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants