×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    22

    close() fails when open() with O_BINARY?

    Hi there,

    I just stumbled across this:

    Code:
    int mode = O_RDWR | O_CREAT | O_BINARY;
    int fd = open("temp.tmp", mode);	
    write(fd, "TEST", 4);	
    close(fd);
    Which causes the emulator to break with a halt signal. When removing the O_BINARY flag it works ok. Does anyone know anything about this?

    Thanks

  2. #2
    Registered User
    Join Date
    Apr 2008
    Posts
    6

    Unhappy Re: close() fails when open() with O_BINARY?

    I met the same problem with 3rd FP1+Open C MR. Pls suggest if any idea. Thanks.

  3. #3
    Registered User
    Join Date
    Mar 2008
    Posts
    22

    Re: close() fails when open() with O_BINARY?

    Quote Originally Posted by wuhzjJin1 View Post
    I met the same problem with 3rd FP1+Open C MR. Pls suggest if any idea. Thanks.
    I didn't find any answers to this, my advice is to redefine O_BINARY to 0 or don't use it at all.

  4. #4
    Registered User
    Join Date
    Apr 2008
    Posts
    6

    Question Re: close() fails when open() with O_BINARY?

    Hi Pales,

    Thanks for you reply.

    According to document of openc, O_BINARY is not supported. right?
    OpenC plus-in MR: crash error when calling close()
    OpenC plus-in: no error.

    If the O_BINARY is not supported, then
    What's the default file mode on symbian? is it TEXT or BINARY? In our application, binary mode is required.

    Regards,
    -Jin

  5. #5
    Registered User
    Join Date
    Mar 2008
    Posts
    22

    Re: close() fails when open() with O_BINARY?

    I'm not 100% sure yet, but I've got SQLite working by redefining O_BINARY to 0 and our unit tests don't report any error, so I'd say that the default mode is indeed binary (which actually makes more sense than text).
    Last edited by pailes; 2008-04-23 at 14:30.

  6. #6
    Registered User
    Join Date
    Apr 2008
    Posts
    6

    Smile Re: close() fails when open() with O_BINARY?

    Hi pailes,

    I see. Thanks so much.

    Best regards,
    -Jin

  7. #7
    Registered User
    Join Date
    May 2009
    Posts
    6

    Re: close() fails when open() with O_BINARY?

    Pailes,

    Can you share a working sqlite version on symbian?

    Thanks,
    Angelo

Similar Threads

  1. N75 flip open and flip close event capture.
    By ravinder007 in forum Symbian User Interface
    Replies: 5
    Last Post: 2007-11-06, 18:59
  2. User notice on bluetooth connection open / close
    By sventy in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2005-06-27, 11:55
  3. Open and close httpconnections
    By Nuria in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2004-10-21, 15:27
  4. CMdaAudioRecorderUtility - File Open on a descripter fails.
    By abhishekmishra in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2002-11-14, 11:07
  5. open and close connection in the MMS Library
    By cmingoia in forum General Messaging
    Replies: 1
    Last Post: 2002-09-17, 10:54

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×