Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.arch.embedded > #31984
| From | Grant Edwards <invalid@invalid.invalid> |
|---|---|
| Newsgroups | comp.arch.embedded |
| Subject | Re: Linux Embedded: how to get info from a running service |
| Date | 2023-08-08 14:31 +0000 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <uatjj6$p6u$1@reader2.panix.com> (permalink) |
| References | <uarnls$314pb$1@dont-email.me> <uat5ap$3c0fm$1@dont-email.me> <uate87$39nhe$1@dont-email.me> |
On 2023-08-08, pozz <pozzugno@gmail.com> wrote: > Sincerely I don't like your solution. First of all, you are writing > regularly on a normal file in the filesystem. Ok, maybe I can use a > tmpfs filesystem in RAM. > > Another issue I see is synchronization. Without a sync mechanism, the > reader could read bad data, because the writer is writing to it. There is a trivial way to deal with that which has been used since time immemorial on Unix: Write to a temporary file, then close and reanme it. The open() and rename() system calls are atomic with respect to each other. The task calling open() will get either the old file or the new file, never something "in between".
Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Linux Embedded: how to get info from a running service pozz <pozzugno@gmail.com> - 2023-08-07 23:28 +0200
Re: Linux Embedded: how to get info from a running service David Brown <david.brown@hesbynett.no> - 2023-08-08 12:27 +0200
Re: Linux Embedded: how to get info from a running service pozz <pozzugno@gmail.com> - 2023-08-08 14:59 +0200
Re: Linux Embedded: how to get info from a running service Grant Edwards <invalid@invalid.invalid> - 2023-08-08 14:31 +0000
Re: Linux Embedded: how to get info from a running service David Brown <david.brown@hesbynett.no> - 2023-08-08 16:31 +0200
Re: Linux Embedded: how to get info from a running service pozz <pozzugno@gmail.com> - 2023-08-08 17:14 +0200
Re: Linux Embedded: how to get info from a running service David Brown <david.brown@hesbynett.no> - 2023-08-08 18:54 +0200
Re: Linux Embedded: how to get info from a running service pozz <pozzugno@gmail.com> - 2023-08-09 09:27 +0200
Re: Linux Embedded: how to get info from a running service David Brown <david.brown@hesbynett.no> - 2023-08-09 10:29 +0200
Re: Linux Embedded: how to get info from a running service Grant Edwards <invalid@invalid.invalid> - 2023-08-09 13:00 +0000
csiph-web