* [PATCH 41/73] policycoreutils: mcstransd: write a pid file FIXME
@ 2012-03-27 15:49 Daniel J Walsh
2012-03-27 15:53 ` Colin Walters
0 siblings, 1 reply; 5+ messages in thread
From: Daniel J Walsh @ 2012-03-27 15:49 UTC (permalink / raw)
To: eparis; +Cc: selinux
[-- Attachment #1: Type: text/plain, Size: 409 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
This patch looks good to me. acked.
systemd expects a pid file to be written by unit services.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9x4YEACgkQrlYvE4MpobPLGwCgverG61aQYgrYV3P5BCISw+QO
ZP4An3ahmMsngAp0CxVDDbIirCGdLdzY
=wQig
-----END PGP SIGNATURE-----
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0041-policycoreutils-mcstransd-write-a-pid-file-FIXME.patch --]
[-- Type: text/x-patch; name="0041-policycoreutils-mcstransd-write-a-pid-file-FIXME.patch", Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 41/73] policycoreutils: mcstransd: write a pid file FIXME
2012-03-27 15:49 [PATCH 41/73] policycoreutils: mcstransd: write a pid file FIXME Daniel J Walsh
@ 2012-03-27 15:53 ` Colin Walters
2012-03-27 18:02 ` Daniel J Walsh
0 siblings, 1 reply; 5+ messages in thread
From: Colin Walters @ 2012-03-27 15:53 UTC (permalink / raw)
To: Daniel J Walsh; +Cc: eparis, selinux
On Tue, 2012-03-27 at 11:49 -0400, Daniel J Walsh wrote:
> This patch looks good to me. acked.
>
> systemd expects a pid file to be written by unit services.
It doesn't if the service is non-forking. In fact moving to
non-forking services that don't write pid files is a major
improvement that systemd brings over sysvinit, because the
state is 100% reliable. Pid files create the possibility
of desynchronization if the service crashes, but the pid
file remains.
So a better fix would be to change mcstransd to have a
--no-fork option, and update the unit file to use it.
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 41/73] policycoreutils: mcstransd: write a pid file FIXME
2012-03-27 15:53 ` Colin Walters
@ 2012-03-27 18:02 ` Daniel J Walsh
2012-03-28 16:24 ` Colin Walters
0 siblings, 1 reply; 5+ messages in thread
From: Daniel J Walsh @ 2012-03-27 18:02 UTC (permalink / raw)
To: Colin Walters; +Cc: eparis, selinux
[-- Attachment #1: Type: text/plain, Size: 1198 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 03/27/2012 11:53 AM, Colin Walters wrote:
> On Tue, 2012-03-27 at 11:49 -0400, Daniel J Walsh wrote:
>> This patch looks good to me. acked.
>>
>> systemd expects a pid file to be written by unit services.
>
> It doesn't if the service is non-forking. In fact moving to non-forking services that don't write pid files is a major improvement that systemd brings over sysvinit, because the state is 100% reliable. Pid files create the possibility of desynchronization if the service crashes, but the pid file remains.
>
> So a better fix would be to change mcstransd to have a --no-fork option, and update the unit file to use it.
>
>
>
> -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with the words "unsubscribe selinux" without quotes as the message.
How about. this patch.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9yAMYACgkQrlYvE4MpobNgMwCgxJ0rYn5VJyybfV5OeuYNIrCU
CbUAnA5BoNnWx2/JXS5IzHgbfrn/IDJb
=FH0Q
-----END PGP SIGNATURE-----
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0143-Add-an-f-option-to-run-mcstransd-in-the-foreground.-.patch --]
[-- Type: text/x-patch; name="0143-Add-an-f-option-to-run-mcstransd-in-the-foreground.-.patch", Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 41/73] policycoreutils: mcstransd: write a pid file FIXME
2012-03-27 18:02 ` Daniel J Walsh
@ 2012-03-28 16:24 ` Colin Walters
2012-03-28 17:23 ` Daniel J Walsh
0 siblings, 1 reply; 5+ messages in thread
From: Colin Walters @ 2012-03-28 16:24 UTC (permalink / raw)
To: Daniel J Walsh; +Cc: eparis, selinux
The naming here is confusing...the C variable should be called
"daemonize" or "do_fork" or something.
+ if (foreground && daemon(0, 0)) {
Would then be:
if (!foreground && daemon(0, 0))
Right?
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 41/73] policycoreutils: mcstransd: write a pid file FIXME
2012-03-28 16:24 ` Colin Walters
@ 2012-03-28 17:23 ` Daniel J Walsh
0 siblings, 0 replies; 5+ messages in thread
From: Daniel J Walsh @ 2012-03-28 17:23 UTC (permalink / raw)
To: Colin Walters; +Cc: eparis, selinux
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 03/28/2012 12:24 PM, Colin Walters wrote:
> The naming here is confusing...the C variable should be called "daemonize" or "do_fork" or something.
>
> + if (foreground && daemon(0, 0)) {
>
> Would then be:
>
> if (!foreground && daemon(0, 0))
>
> Right?
>
>
Ok using do_fork.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9zSQIACgkQrlYvE4MpobNJeQCeMJJLClSc7KgtNxtEp9SRRgrm
gscAoJGil/oYdK+agV3OSDF/eUm8nixW
=0jm0
-----END PGP SIGNATURE-----
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-03-28 17:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-27 15:49 [PATCH 41/73] policycoreutils: mcstransd: write a pid file FIXME Daniel J Walsh
2012-03-27 15:53 ` Colin Walters
2012-03-27 18:02 ` Daniel J Walsh
2012-03-28 16:24 ` Colin Walters
2012-03-28 17:23 ` Daniel J Walsh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.