Closed Bug 72014 Opened 24 years ago Closed 24 years ago

DBM temporary file problems on OS/2

Categories

(SeaMonkey :: General, defect, P2)

x86
OS/2
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.2

People

(Reporter: nelson, Assigned: rrelyea)

References

Details

(Whiteboard: critical for 0.9.2)

Attachments

(5 files)

All the problems reported against DBM on Windows in bug 69753 also affect DBM on OS/2. Those problems have been fixed for windows, but not for OS/2. Please see bug 69753 for the full description and the patches.
Michael Kaply <mkaply@us.ibm.com> might be willing to work on this bug.
Blocks: 69752
Priority: -- → P2
Target Milestone: --- → 3.3
This seems to be the only necessary change. Please let me know if I missed something (OS/2 does not have a TEMPORARY flag for open()). Also, I liked your suggestion for rewriting gettemp. I just looked and OS/2 contains several functions that create and manipulate temporary files, which are deleted once the process ends. Are you still thinking of doing this?
Adding myself to cc.
Is this change just to get OS/2 to compile? It seems that this will still leave temparary files around (though that's what the old code did as well). If you have an OS/2 specific function that can open a temp file which automatically gets deleted on process end or on close that would be preferable. Nelson do we need a superreview on this (because it's DBM code?). bob
The OS/2 code compiles fine with the patches from 69753. This patch is just to get the temp file opened as a binary, whereas it was defaulting to text before. I mentioned the temp file function because nelsonb had said something about it in 69753. In order to use it, though, would require a rewrite of mktemp.c.
Javier and I spoke today. As I understand it, OS/2 has a function that takes no arguments and returns a FILE * for a temporary file that is opened binary read/write, and that will disappear when the program terminates. If it is possible to extract the fd from the FILE, then it should be possible to rewrite the function mkstempflags in mktemp.c to use this OS/2 function, ignoring the input arguments. I recoomend that.
Ok, so ignore the first patch. This second patch include a rewrite of mkstemp, which calls the tmpfile() function. The tmpfile() function creates a temporary file which is deleted once the program has finished executing. I also rewrote h_page.c to make use of this function for os/2. I still need to study if the filename is actually used. The function tmpfile() does not return a filename. For this reason, I also need to keep around mktemp and gettemp (which return filenames), because mktemp is used in the jpeg code.
Created a better patch that bypasses most of open_temp() and just sets the hash fd.
OK, Javier, I like the patch, are we ready for a superreview? bob
yes, i think it's ready to go...
Who is the right sr for this?
sr=blizzard
Is this bug fixed now?
a= asa@mozilla.org for checkin to the trunk. (on behalf of drivers)
Blocks: 83989
Just to clarify this is approved for 0.9.2 too.
Whiteboard: critical for 0.9.2
Target Milestone: 3.3 → 3.2.2
I checked in Javier's last patch on the trunk (edited to imitate the existing coding style of the modified files). Since the tree is supposed to branch for 0.9.2 tomorrow morning, this fix will be in 0.9.2 as well.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
I am changing the product to Browser because mozilla/dbm is not part of NSS. I am setting target milestone to mozilla0.9.2.
Component: Libraries → Browser-General
Product: NSS → Browser
Target Milestone: 3.2.2 → mozilla0.9.2
Version: 3.0 → other
verify fixed by looking at code changes.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: