- Timestamp:
- 03/18/04 20:11:25 (21 years ago)
- Location:
- pykota/trunk
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/cupspykota
r1410 r1411 24 24 # 25 25 # $Log$ 26 # Revision 1.37 2004/03/18 19:11:25 jalet 27 # Fix for raw jobs in cupspykota 28 # 26 29 # Revision 1.36 2004/03/18 14:03:18 jalet 27 30 # Added fsync() calls … … 317 320 318 321 # Save file descriptors, we will need them later. 319 infno = infile.fileno()320 322 stdoutfno = sys.stdout.fileno() 321 323 stderrfno = sys.stderr.fileno() … … 327 329 # So we use a poll object to know when to read or write 328 330 pollster = select.poll() 329 pollster.register(infno, select.POLLIN | select.POLLPRI)330 331 pollster.register(fromcfno, select.POLLIN | select.POLLPRI) 331 332 pollster.register(cerrfno, select.POLLIN | select.POLLPRI) … … 340 341 endinput = endoutput = enderr = 0 341 342 inputclosed = outputclosed = errclosed = 0 343 344 if self.preserveinputfile is None : 345 # this is not a real file, we read the job's data 346 # from stdin 347 infno = infile.fileno() 348 pollster.register(infno, select.POLLIN | select.POLLPRI) 349 else : 350 # job's data is in a file, no need to pass the data 351 # to the real backend 352 self.logdebug("Job's data is in %s" % self.preserveinputfile) 353 infno = None 354 endinput = 1 355 342 356 killed = 0 343 357 self.logdebug("Entering streams polling loop...") … … 366 380 if indata : 367 381 os.write(fd, indata) 368 os.fsync(fd) 382 try : 383 os.fsync(fd) 384 except OSError : 385 pass 369 386 indata = "" 370 387 if endinput : … … 376 393 if outdata : 377 394 os.write(fd, outdata) 378 os.fsync(fd) 395 try : 396 os.fsync(fd) 397 except OSError : 398 pass 379 399 outdata = "" 380 400 if endoutput : … … 384 404 if errdata : 385 405 os.write(fd, errdata) 386 os.fsync(fd) 406 try : 407 os.fsync(fd) 408 except OSError : 409 pass 387 410 errdata = "" 388 411 if enderr : -
pykota/trunk/NEWS
r1405 r1411 22 22 PyKota NEWS : 23 23 24 - 1.18beta2 : 25 26 - Fix for raw jobs with cupspykota 27 24 28 - 1.18beta : 25 29 -
pykota/trunk/pykota/version.py
r1404 r1411 22 22 # 23 23 24 __version__ = "1.18beta _unofficial"24 __version__ = "1.18beta2_unofficial" 25 25 26 26 __doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng."""