Skip to content

Instantly share code, notes, and snippets.

@AlexanderS
Created November 14, 2012 00:58
Show Gist options
  • Select an option

  • Save AlexanderS/4069505 to your computer and use it in GitHub Desktop.

Select an option

Save AlexanderS/4069505 to your computer and use it in GitHub Desktop.
From cf0ddf751c0ce25ad86beac65f3ed2654d65ba13 Mon Sep 17 00:00:00 2001
From: Alexander Sulfrian <alexander@sulfrian.net>
Date: Wed, 14 Nov 2012 01:54:41 +0100
Subject: [PATCH] bcfg2-info: flush output buffer before exit
The process should not use os._exit to terminate. This does not flush
the output buffers and causes that the output does not appear, if
stdout is piped away.
---
src/sbin/bcfg2-info | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/sbin/bcfg2-info b/src/sbin/bcfg2-info
index 6565321..f3f373d 100755
--- a/src/sbin/bcfg2-info
+++ b/src/sbin/bcfg2-info
@@ -562,7 +562,7 @@ class infoCore(cmd.Cmd, Bcfg2.Server.Core.Core):
"""."""
if args:
self.onecmd(" ".join(args))
- os._exit(0)
+ sys.exit(0)
else:
self.do_loop()
--
1.7.2.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment