diff options
author | Tom Rondeau <trondeau@vt.edu> | 2012-04-13 18:36:53 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2012-04-13 18:36:53 -0400 |
commit | f919f9dcbb54a08e6e26d6c229ce92fb784fa1b2 (patch) | |
tree | 7e846386b9eb1676f9a93fc4a1e55916b9accc97 /gnuradio-core/src/python/gnuradio/gruimpl/daemon.py | |
parent | 6a1e9783fec6ed827f49db27c171591d30f32933 (diff) |
Removed whitespace and added dtools/bin/remove-whitespace as a tool to do this in the future.
The sed script was provided by Moritz Fischer.
Diffstat (limited to 'gnuradio-core/src/python/gnuradio/gruimpl/daemon.py')
-rw-r--r-- | gnuradio-core/src/python/gnuradio/gruimpl/daemon.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gnuradio-core/src/python/gnuradio/gruimpl/daemon.py b/gnuradio-core/src/python/gnuradio/gruimpl/daemon.py index 4fa972ad21..e04702152d 100644 --- a/gnuradio-core/src/python/gnuradio/gruimpl/daemon.py +++ b/gnuradio-core/src/python/gnuradio/gruimpl/daemon.py @@ -1,23 +1,23 @@ # # Copyright 2008 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# import os, sys, signal # Turn application into a background daemon process. @@ -62,7 +62,7 @@ def daemonize(pidfile=None, logfile=None): if pid == 0: # First child of first fork() # Become session leader of new session os.setsid() - + # fork() into background again try: pid = os.fork() @@ -74,14 +74,14 @@ def daemonize(pidfile=None, logfile=None): else: # Second child of first fork() os._exit(0) - + os.umask(0111) # Write pid pid = os.getpid() if pidfile is not None: open(pidfile, 'w').write('%d\n'%pid) - + # Redirect streams if logfile is not None: lf = open(logfile, 'a+') |