Nп/п : 2 из 100
 От   : Ralf Fassel                         2:5075/128        14 сен 23 17:29:46
 К    : The Natural Philosopher                               14 сен 23 18:31:02
 Тема : Re: Weird code crash
----------------------------------------------------------------------------------
                                                                                 
@MSGID: <ygamsxoixhx.fsf@akutech.de> c618bd88
@REPLY: 1@dont-email.me> a0d70510
@REPLYADDR Ralf Fassel <ralfixx@gmx.de>
@REPLYTO 2:5075/128 Ralf Fassel
@CHRS: CP866 2
@RFC: 1 0
@RFC-Message-ID: <ygamsxoixhx.fsf@akutech.de>
@RFC-References: 1@dont-email.me>
@TZUTC: 0200
@PID: Gnus/5.13 (Gnus v5.13) Emacs/27.2
(gnu/linux)
@TID: FIDOGATE-5.12-ge4e8b94
* The Natural Philosopher <tnp@invalid.invalid>
| One possibility is that it is opening and reading a file at the
| precise time another process is writing it...in both cases the read
| and write
| operations are atomic and done with C code.
>
| READ
| ====
| fp=fopen(fullname, "r");
| len=fread(filbuf,1,255,fp); // read entire file

Check for fp != NULL is missing here in this example code before
fread().  If this also in the production version, it might be a problem
if the file is not accessible for any reason.

R`
--- Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
 * Origin: usenet.network (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5058/104 5075/128
@PATH: 5075/128 5020/1042 4441



   GoldED+ VK   │                                                 │   09:55:30    
                                                                                
В этой области больше нет сообщений.

Остаться здесь
Перейти к списку сообщений
Перейти к списку эх