supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* [magic sv logging]
@ 2012-09-20 23:35 Sergiusz Pawlowicz
  2012-09-21  2:25 ` Mike Buland
  0 siblings, 1 reply; 8+ messages in thread
From: Sergiusz Pawlowicz @ 2012-09-20 23:35 UTC (permalink / raw)
  To: SV List

Hi,
I am trying to write a python script which can be put in place of
svlogd/multilog, but I am stuck just at the beginning.

The test script is pretty simple, it just forwards stdin to stdout:

def main():

    while True:
        try:
            line = raw_input()
            print 'got', line
        except EOFError:
            print 'done'
            pass

  if __name__ == '__main__':
    main()

It works, but not as desired, as the script is being restarted by runsv
constantly, it seems after it finishes reading stdin. Could you
please help me how can run that continuously listening to stdin?

cheers,
Serge
-- 
https://pawlowicz.name/


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-09-22  5:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-20 23:35 [magic sv logging] Sergiusz Pawlowicz
2012-09-21  2:25 ` Mike Buland
2012-09-21 15:29   ` Lorenzo Beretta
2012-09-21 15:32     ` Mike Buland
2012-09-21 15:35       ` Jason Dusek
2012-09-21 15:38         ` Mike Buland
2012-09-22  4:18       ` Laurent Bercot
2012-09-22  5:58         ` Jason Dusek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).