diff options
author | Joel Rosdahl <joel@rosdahl.net> | 2003-12-11 18:35:41 +0000 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2011-08-21 15:53:50 +0200 |
commit | fe6e9de1fd37d3ed338281338462724acb12dfcf (patch) | |
tree | c4ea89fc66f876e522b5eb30b1da8113e8e7df6a /miniircd | |
parent | 0afe01e05ea2d3a6d05885b56ed7f00c83032298 (diff) | |
download | miniircd-fe6e9de1fd37d3ed338281338462724acb12dfcf.tar.gz miniircd-fe6e9de1fd37d3ed338281338462724acb12dfcf.zip |
Open /dev/null for writing too
Diffstat (limited to 'miniircd')
-rwxr-xr-x | miniircd | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -19,7 +19,7 @@ # # Joel Rosdahl <joel@rosdahl.net> -version = "0.0.0" +version = "0.1.0" import getopt import os @@ -376,6 +376,7 @@ class Client(object): self.nickname), True) + def noticeAndPrivmsgHandler(): if len(arguments) == 0: self.message(":%s 411 %s :No recipient given" % ( @@ -557,7 +558,6 @@ class Client(object): self.nickname, command)) - def socketReadableNotification(self): try: data = self.socket.recv(2**10) @@ -645,7 +645,7 @@ class Server(object): sys.exit(1) os.chdir("/") os.umask(0) - devNull = file("/dev/null") + devNull = file("/dev/null", "r+") os.dup2(devNull.fileno(), sys.stdout.fileno()) os.dup2(devNull.fileno(), sys.stderr.fileno()) os.dup2(devNull.fileno(), sys.stdin.fileno()) |