GTKdialog leftovers
Posted: Tue 27 Oct 2009, 19:02
When a program is made with GTKdialog , it seems to be common practice to leave any files created in /tmp to be removed upon reboot.
But would it not be cleaner to add one line to the end of the script to remove the file in /tmp before exiting?
I will use as an example a program written to use a /tmp file called number.
The script is run. The /tmp/number file is created and used.
Upon exiting the script, the /tmp/number file is still there.
With the addition of one line, "rm /tmp/number" before the script is ended, the /tmp/number file is removed without rebooting.
End of script example:
gtkdialog3 -p MAIN_DIALOG
rm /tmp/number
unset -f add
unset MAIN_DIALOG
Comments?
But would it not be cleaner to add one line to the end of the script to remove the file in /tmp before exiting?
I will use as an example a program written to use a /tmp file called number.
The script is run. The /tmp/number file is created and used.
Upon exiting the script, the /tmp/number file is still there.
With the addition of one line, "rm /tmp/number" before the script is ended, the /tmp/number file is removed without rebooting.
End of script example:
gtkdialog3 -p MAIN_DIALOG
rm /tmp/number
unset -f add
unset MAIN_DIALOG
Comments?