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 19:49:14 GMT Lines: 32 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> <10j2pfc$2eoas$1@dont-email.me> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net 72a8mFTkLkdqqEftMemXZAh4YPbncJOLvifeAYiu0vgKa498gM Cancel-Lock: sha1:5ocCo4232smkVrHHlaefpZCsxBQ= sha256:+s9HkeET5LSpdl4EA3KZ/L552vIRXoEV98nhsDHr6HM= User-Agent: Pan/0.162 (Pokrosvk) Xref: csiph.com comp.os.linux.misc:80189 On Wed, 31 Dec 2025 09:13:16 +0000, Nuno Silva wrote: > On 2025-12-31, 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)); > > Unless coffee is playing tricks on me, > > perror("Oh shit!"); > > ought to be the same except for an additional colon. > > Its online manual page (section 3p here, hence POSIX) seems to indicate > it's also in the C standard. Yes, and it is used quite frequently in the code base. I was simplifying things with a standard call. The real function would be log_error("Oh shit! %s\n", strerror(errno)); The problem with perror() is Windows services and most of the legacy GUIs are not attached to a console. Even if they were most of the users would never look at a message in a terminal. Write it to the application log and there is a record.