Update of /cvsroot/monetdb/sql/src/test/BugTracker/Tests
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv17522
Modified Files:
Tag: Aug2009
connect_crash.SF-1436626.py
Log Message:
Use the subprocess module to start processes with pipes.
This seems to fix the lack of output on Windows.
U connect_crash.SF-1436626.py
Index: connect_crash.SF-1436626.py
===================================================================
RCS file:
/cvsroot/monetdb/sql/src/test/BugTracker/Tests/connect_crash.SF-1436626.py,v
retrieving revision 1.5
retrieving revision 1.5.8.1
diff -u -d -r1.5 -r1.5.8.1
--- connect_crash.SF-1436626.py 29 Oct 2008 18:51:58 -0000 1.5
+++ connect_crash.SF-1436626.py 9 Oct 2009 08:20:57 -0000 1.5.8.1
@@ -1,13 +1,13 @@
-import os, time
+import subprocess, os, time
def main():
srvcmd = '%s --dbname "%s" --dbinit "include sql;"' %
(os.getenv('MSERVER'),os.getenv('TSTDB'))
- srv = os.popen(srvcmd, 'w')
+ srv = subprocess.Popen(srvcmd, shell = True, stdin = subprocess.PIPE)
time.sleep(10) # give server time to start
cltcmd = os.getenv('SQL_CLIENT')
- clt = os.popen(cltcmd, 'w')
- clt.write('select 1;\n')
- clt.close()
- srv.close()
+ clt = subprocess.Popen(cltcmd, shell = True, stdin = subprocess.PIPE)
+ clt.stdin.write('select 1;\n')
+ clt.communicate()
+ srv.communicate()
main()
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins