Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Potential dead-lock in sal/osl/unx/signal.c | ||
---|---|---|---|
Product: | porting | Reporter: | tora3 |
Component: | code | Assignee: | AOO issues mailing list <issues> |
Status: | CONFIRMED --- | QA Contact: | |
Severity: | Trivial | ||
Priority: | P3 | CC: | issues, shinji.enoki |
Version: | DEV300m39 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | Unix, all | ||
Issue Type: | DEFECT | Latest Confirmation in: | --- |
Developer Difficulty: | --- |
Description
tora3
2009-01-30 14:51:56 UTC
There could be many ways to solve this type of potential problems. For fread(), use open(), read(), and close(), instead. (proposal) int fd = open( filename, O_RDONLY ); if ( fd != -1 ) sal_uInt8 buffer[4096]; nBytesRead = read( fd, buffer, sizeof(buffer) ); On Solaris 10, open(), read(), and close(), are Async-Signal-Safe. For fprintf(), use setbuf() to make the stream 'unbuffered.' (proposal) FILE *xmlout = fdopen( fdxml , "w" ); setbuf(xmlout, NULL); fprintf( xmlout, "<errormail:Stack type=\"%s\">\n", STACKTYPE ); etc. etc. etc. ... Reset assigne to the default "issues@openoffice.apache.org". |