Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: rbowman Newsgroups: comp.os.linux.misc Subject: Re: Service startup errors Date: 31 Dec 2025 08:24:20 GMT Lines: 33 Message-ID: References: <10if6e3$kag3$1@dont-email.me> <10igm6l$10hm7$2@dont-email.me> <10igpir$1086g$16@dont-email.me> <20251226090654.00000d42@gmail.com> <10is5pn$h12h$5@dont-email.me> <7cj82mxbaa.ln2@Telcontar.valinor> <10iscj0$jd63$2@dont-email.me> <8dV4R.92219$4H_9.80362@fx37.iad> <10j29ft$2acp4$2@dont-email.me> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net ENFoOHZQfsLv+zJHDlwRgQF6o1uiu9/ubjyq+q9ZR86xkPg+51 Cancel-Lock: sha1:HkA0VqllZfVk0aYV516BrD+TJx4= sha256:UIQE+CT5qqqRgifG/tgs6qQkNqCRcxAM3WP5270Enko= User-Agent: Pan/0.162 (Pokrosvk) Xref: csiph.com comp.os.linux.misc:80157 On Wed, 31 Dec 2025 04:40:29 +0000, vallor wrote: > At 31 Dec 2025 03:12:29 GMT, rbowman wrote: > >> On Tue, 30 Dec 2025 18:53:56 GMT, Charlie Gibbs wrote: >> >> > But if it means something to them, it's still miles ahead of a >> > "something went wrong" message. If you're lucky you might find a >> > list of what the error codes mean. >> >> https://www.thegeekstuff.com/2010/10/linux-error-codes/ >> >> printf("Oh shit! %s\n", strerror(errno)); > > Some of those look a bit silly when errno is 0... > > ("Oh shit! Success") There is usually a conditional. void* foo; foo = malloc(1000); if (foo == NULL) { printf("malloc had a little problem %s\n", strerror(errno)); } I usually did test malloc/calloc returns and logged the error although if malloc was failing I was skeptical of the log ever being written. I do remember catching a calloc() error where the number of elements was less than 0 so I guess it wasn't in vain.