Changeset 2288 for research/2008-displacement/main-cpushare
- Timestamp:
- Apr 16, 2008, 12:11:38 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
research/2008-displacement/main-cpushare
r2287 r2288 17 17 print 'Usage: %s <buy_order.cpu> -<mode> [image list]' % (sys.argv[0],) 18 18 sys.exit(-1) 19 mode = sys.argv[2] [1]19 mode = sys.argv[2] 20 20 done = 0 21 21 source = sys.argv[3:] … … 34 34 35 35 def start(self): 36 global todo, source 36 global mode, todo, source 37 gd.gdMaxColors = 256 * 256 * 256 38 while todo < len(source): 39 try: 40 self.index = todo 41 im = gd.image(source[self.index]) 42 break 43 except: 44 todo += 1 45 self.result = "Error\n" 37 46 if todo >= len(source): 38 return # We're finished... FIXME: is the transaction kept stuck? 39 self.index = todo 47 return # We're finished... FIXME: isn't the transaction stuck? 40 48 todo += 1 41 gd.gdMaxColors = 256 * 256 * 25642 im = gd.image(source[self.index])43 49 # Send argument count 44 50 self.protocol.sendString(PROTO_SECCOMP_FORWARD + chr(3)) … … 46 52 msg = chr(3) 47 53 msg += "bytecode\0" 48 msg += "-1\0"54 msg += mode + "\0" 49 55 msg += source[self.index] + "\0" 50 56 self.protocol.sendString(PROTO_SECCOMP_FORWARD + msg)
Note: See TracChangeset
for help on using the changeset viewer.