Different behavior of fopen("w") under freedos and msdos? (Developers)
Hi,
I tested my program (compiled in djgpp) on write-protected floppy and found there's very different behavior what happen if run under msdos and freedos 2038.
Under msdos I got null pointer as expected according to ansi c spec. If I then tried to write to NULL by fwrite() program crashed.
Under freedos it opened something (NUL device?) and fopen returned a valid pointer. fwrite() didn't crashed, fclose() didn't return error. But of course file was not created. I think this is a bad idea because application may confuse user with notification that file was successfully created blabla and it isn't. I would suggest to return null as ususal...
---
DOS gives me freedom to unlimited HW access.
Complete thread:
- Different behavior of fopen("w") under freedos and msdos? - RayeR, 16.03.2011, 00:55 (Developers)
- Different behavior of fopen("w") under freedos and msdos? - ecm, 16.03.2011, 18:27
- Different behavior of fopen("w") under freedos and msdos? - RayeR, 17.03.2011, 14:58
- Creating files: Lack of error checking in TF kernel - ecm, 17.03.2011, 15:40
- Creating files: Lack of error checking in TF kernel - ecm, 08.04.2011, 21:38
- Creating files: Lack of error checking in TF kernel - RayeR, 10.04.2011, 00:25
- Creating files: Lack of error checking in TF kernel - ecm, 10.04.2011, 00:35
- Creating files: Lack of error checking in TF kernel - RayeR, 10.04.2011, 00:25
- Creating files: Lack of error checking in TF kernel - DOS386, 03.05.2011, 09:56
- Creating files: Lack of error checking in TF kernel - ecm, 03.05.2011, 18:03
- Creating files: Lack of error checking in TF kernel - DOS386, 04.05.2011, 11:14
- Terminology - ecm, 04.05.2011, 14:07
- Creating files: Lack of error checking in TF kernel - DOS386, 04.05.2011, 11:14
- Creating files: Lack of error checking in TF kernel - RayeR, 04.05.2011, 18:48
- Creating files: Lack of error checking in TF kernel - ecm, 03.05.2011, 18:03
- Creating files: Lack of error checking in TF kernel - ecm, 08.04.2011, 21:38
- Creating files: Lack of error checking in TF kernel - ecm, 17.03.2011, 15:40
- Different behavior of fopen("w") under freedos and msdos? - RayeR, 17.03.2011, 14:58
- Different behavior of fopen("w") under freedos and msdos? - ecm, 16.03.2011, 18:27