source: issm/oecreview/Archive/13393-13976/ISSM-13825-13826.diff@ 13980

Last change on this file since 13980 was 13980, checked in by Mathieu Morlighem, 12 years ago

preparing oecreview for 13393-13976'

File size: 683 bytes
RevLine 
[13980]1Index: ../trunk-jpl/src/m/os/issmssh.py
2===================================================================
3--- ../trunk-jpl/src/m/os/issmssh.py (revision 13825)
4+++ ../trunk-jpl/src/m/os/issmssh.py (revision 13826)
5@@ -39,3 +39,16 @@
6 else:
7 subprocess.call('ssh -l %s %s "%s"' % (login,host,command),shell=True)
8
9+ # Make FreeBSD use blocking I/O like other platforms
10+ import sys
11+ import fcntl
12+ from os import O_NONBLOCK
13+
14+ fd = sys.stdin.fileno()
15+ flags = fcntl.fcntl(fd, fcntl.F_GETFL)
16+ fcntl.fcntl(fd, fcntl.F_SETFL, flags & ~O_NONBLOCK)
17+
18+ fd = sys.stdout.fileno()
19+ flags = fcntl.fcntl(fd, fcntl.F_GETFL)
20+ fcntl.fcntl(fd, fcntl.F_SETFL, flags & ~O_NONBLOCK)
21+
Note: See TracBrowser for help on using the repository browser.