! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfprint does not delete temporary files after they are printed
Status:
CLOSED: FIXED
Severity:
enhancement
Product:
Xfprint4
Component:
General

Comments

Description Jason Keltz 2005-03-01 17:01:48 CET
When printing files with xfprint, temporary files end up showing up in /tmp. 
For example:

/tmp/xfprintapXtqE

After the files are spooled with lpr, they are not deleted.


Reproducible: Always
Steps to Reproduce:
1. 
2. 
3.
Comment 1 Jean-François Wauthy editbugs 2005-03-02 11:13:49 CET
i'm aware of this behaviour, at first time i was removing them but it caused
some problems sometimes when the file got removed before it was spooled :(; if i
find a correct way to implement it, i'll fix it.
Comment 2 Jason Keltz 2005-03-02 13:45:45 CET
how were you removing the files? In separate code, or immediately following the
lpr?  I believe that once lpr returns, the job is fully spooled, so I think you
could safely "lpr file; rm file"...?  without this, the files just stay around...

Comment 3 Jean-François Wauthy editbugs 2005-03-02 13:49:34 CET
i use g_spawn_sync to launch lpr i don't think lpr file; rm file would work (or
maybe it does in a shell). i'm thinking about some kind of lock.
Comment 4 Jason Keltz 2005-03-02 13:58:47 CET
that seems strange...g_spawn_sync is supposed to block until the child exits, so
if it blocks until the lpr exits, you should be able to unlink the file
immediately thereafter and there shouldn't be a problem...?
Comment 5 Jean-François Wauthy editbugs 2005-03-02 13:59:56 CET
yeah i know, that's what i did first but it didn't work well
Comment 6 Jean-François Wauthy editbugs 2005-03-02 20:06:52 CET
i readded the unlink (file)

Bug #820

Reported by:
Jason Keltz
Reported on: 2005-03-01
Last modified on: 2009-07-14

People

Assignee:
Jean-François Wauthy
CC List:
0 users

Version

Attachments

Additional information