◐ Shell
clean mode source ↗

Issue 21429: Input.output error with multiprocessing

I encountered this error with Limnoria and I was told to report it here.

```
ERROR 2014-05-04T18:04:04 supybot Uncaught exception in ['title'].
Traceback (most recent call last):
File "/home/users/mkaysi/.local/lib/python3.4/site-packages/supybot/callbacks.py", line 1266, in _callCommand
self.callCommand(command, irc, msg, *args, **kwargs)
File "/home/users/mkaysi/.local/lib/python3.4/site-packages/supybot/utils/python.py", line 91, in g
f(self, *args, **kwargs)
File "/home/users/mkaysi/.local/lib/python3.4/site-packages/supybot/callbacks.py", line 1247, in callCommand
method(irc, msg, *args, **kwargs)
File "/home/users/mkaysi/.local/lib/python3.4/site-packages/supybot/commands.py", line 1076, in newf
f(self, irc, msg, args, *state.args, **state.kwargs)
File "/home/users/mkaysi/.local/lib/python3.4/site-packages/supybot/plugins/Web/plugin.py", line 109, in newf
f(self, irc, *args, **kwargs)
File "/home/users/mkaysi/.local/lib/python3.4/site-packages/supybot/plugins/Web/plugin.py", line 96, in newf
pn=self.name(), cn=f.__name__)
File "/home/users/mkaysi/.local/lib/python3.4/site-packages/supybot/commands.py", line 120, in process
p.start()
File "/home/users/mkaysi/.pyenv/versions/3.4.0/lib/python3.4/multiprocessing/process.py", line 105, in start
self._popen = self._Popen(self)
File "/home/users/mkaysi/.pyenv/versions/3.4.0/lib/python3.4/multiprocessing/context.py", line 212, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/home/users/mkaysi/.pyenv/versions/3.4.0/lib/python3.4/multiprocessing/context.py", line 267, in _Popen
return Popen(process_obj)
File "/home/users/mkaysi/.pyenv/versions/3.4.0/lib/python3.4/multiprocessing/popen_fork.py", line 18, in __init__
sys.stdout.flush()
OSError: [Errno 5] Input/output error
ERROR 2014-05-04T18:04:04 supybot Exception id: 0xaaefe
```
Hi,

i have a similiar issue:

i have a really simple scenario

Callee:
```
@classmethod
def MoveDataToOtherSide(cls, model)
data = {
            "FirstName": model.FirstName,
            "LastName": model.LastName,
            "Email": model.Email,
            "Pass": model.Password,
            "Images": cls.LoadUserImages(model.ID)
        }

        p = Process(target=UserService.MoveProfileToOtherSide, kwargs={"data": data})
        p.start()
```

Processeee
```
@staticmethod
    def MoveProfileToOtherSide(data): requests.get("https://mySecretUrl.de", params={"token": "secBlub", "data": encode(data, unpicklable=False)})
```

I think it has something todo with stdout but i have no clue how i could debug this further, unfortunetely. 

The Application around this functionality (UserService) is cherrypy.