Re: Upstart 1.4 "Let them speak" released
From: James Hunt
Date: Tue Dec 13 2011 - 06:48:24 EST
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Lennart,
On 13/12/11 11:38, Lennart Poettering wrote:
> On Tue, 13.12.11 11:36, James Hunt (james.hunt@xxxxxxxxxxxxx) wrote: Just out of curiosity: how
> is rotation handled for this? If you pass the file fd directly to the spawned service you can't
> really rotate the file ever, since you cannot ask the service to reopen the file. So what do
> you do?
The trick is we don't pass the logfile fd to the job (the jobs stdout+stderr are connected to one
end of a pty). Regarding rotation, Upstart detects if the logfile that it manages was deleted. If
so, it simply closes and reopens the corresponding file. This allows tools like logrotate to
handle rotation.
Kind regards,
James.
- --
James Hunt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJO5zuHAAoJEJ1Q4UTmNXMnZe8P/2dgwOcThbDmCl4sunR7SDmM
4TQ+lEW1bQs/GthaZ9q8J+xFszzlEuzwjbnNHKyNIlivhn3pHcJ1OldpcvzxFAIf
2zEVrJ5mlixUaHA8OTm2UB0wz3Uk5yecW73LKWOXOgk4qi8L7icQAkh+4hsmIuj+
Atdk29krHvmXiD37HGbtU/IcMuNmnmtpBy8V4NPbDYCWTK0DZGFcx9qT3PGDmAq6
kzh8XdC35OeLA41X4cUYAKpiE6QEGdusAqw1vjI/Sne36JJZoMzTTmMz3zwAaEQW
ennSaa8jgVhUaMfhagTVE6MFnDha+hA5wHvZ+KT7G/brqTAUCW7eHpyZM+lf0Had
fEO0Bmaukrz+usEr3m5zNTMHPctN0Uy4xPOs3uhGPEjdg+tCnCPjiwEhHb++75LZ
OBPp9axf8FUZDQpT4w6cu+1m36L9WTcLaBJx9MRTNZP+pD3TjquEhA/ppqObNRn3
K/05+wVJwRVL3ZG2I3/A9lP5/kjWfdZ48T2W4yYN0HyqETvlz5gw7SXioRUoETAf
uXXkVYLkbVjSLdmpb/qYS6N8bCgqVIL/amW0gt233xpfYmsbBtJvjLU2cpfbOtZ2
0E6Mjq94il6DqP6H+HZQWYM43yd/KUr2vAlUUdDDtNOmkFaJ5fFEOKT8Ng8rpjWF
oOzHL2pM/I/IFT9Dvmlp
=NB4b
-----END PGP SIGNATURE-----
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/