----------------------------------------------------------------------------------
@MSGID: 4@dont-email.me> 334c88f5
@REPLY: <ygamsxoixhx.fsf@akutech.de> c618bd88
@REPLYADDR The Natural Philosopher
<tnp@invalid.invalid>
@REPLYTO 2:5075/128 The Natural Philosopher
@CHRS: CP866 2
@RFC: 1 0
@RFC-Message-ID: 4@dont-email.me>
@RFC-References: 1@dont-email.me>
<ygamsxoixhx.fsf@akutech.de>
@TZUTC: 0100
@PID: Mozilla/5.0 (X11; Linux x86_64; rv:102.0)
Gecko/20100101 Thunderbird/102.15.1
@TID: FIDOGATE-5.12-ge4e8b94
On 14/09/2023 16:29, Ralf Fassel wrote:
> * 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`
Ralf, I already put that in this morning, re compiled the code and after
an hour, it crashed again.
The filename is built by scanning a directory so the filename must exist.
The code runs as root, so there are no perms issues
I`ve put in checks to avoid trying to read empty files
I am leaning towards possibly a cracked solder joint or board.
--
The New Left are the people they warned you about.
--- Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
* Origin: A little, after lunch (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