Mercurial > ~astiob > upreckon > hgweb
comparison testcases.py @ 69:c0f1b87013ad
Fixed a crash on Python 3 on POSIX
| author | Oleg Oshmyan <chortos@inbox.lv> |
|---|---|
| date | Mon, 03 Jan 2011 01:07:02 +0200 |
| parents | fcb5ab97f08e |
| children | 1bee3a0beeb5 |
comparison
equal
deleted
inserted
replaced
| 68:e00ab6d1f0ba | 69:c0f1b87013ad |
|---|---|
| 194 def preexec_fn(): | 194 def preexec_fn(): |
| 195 os.close(read) | 195 os.close(read) |
| 196 if preexec_fn_: | 196 if preexec_fn_: |
| 197 preexec_fn_() | 197 preexec_fn_() |
| 198 fcntl.fcntl(write, fcntl.F_SETFD, fcntl.fcntl(write, fcntl.F_GETFD) | getattr(fcntl, 'FD_CLOEXEC', 1)) | 198 fcntl.fcntl(write, fcntl.F_SETFD, fcntl.fcntl(write, fcntl.F_GETFD) | getattr(fcntl, 'FD_CLOEXEC', 1)) |
| 199 fwrite = os.fdopen(write, 'ab') | 199 fwrite = os.fdopen(write, 'wb') |
| 200 pickle.dump(clock(), fwrite, 1) | 200 pickle.dump(clock(), fwrite, 1) |
| 201 kwargs['preexec_fn'] = preexec_fn | 201 kwargs['preexec_fn'] = preexec_fn |
| 202 try: | 202 try: |
| 203 case.process = Popen(*args, **kwargs) | 203 case.process = Popen(*args, **kwargs) |
| 204 except OSError: | 204 except OSError: |
