Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #161528

Re: Calling exit in main

From Kaz Kylheku <563-365-8930@kylheku.com>
Newsgroups comp.lang.c
Subject Re: Calling exit in main
Date 2021-06-28 16:45 +0000
Organization A noiseless patient Spider
Message-ID <20210628093146.219@kylheku.com> (permalink)
References (5 earlier) <sb4645$abl$1@gioia.aioe.org> <87wnqit15r.fsf@nosuchdomain.example.com> <sb51jo$1k4g$1@gioia.aioe.org> <20210625100530.656@kylheku.com> <sb6khn$1gbo$1@gioia.aioe.org>

Show all headers | View raw


On 2021-06-26, Kli-Kla-Klawitter <kliklaklawitter69@gmail.com> wrote:
> Am 25.06.2021 um 19:14 schrieb Kaz Kylheku:
>> On 2021-06-25, Kli-Kla-Klawitter <kliklaklawitter69@gmail.com> wrote:
>>> printf() flushes asynchronously in its own thread on some OSs.
>> 
>> Can you name one?
>
> Windows before Win10, some Linux-distrubutions with newer glibcs.

You're now just making shit up.

Windows doesn't have a printf function that is documented for
applications. C compilers for Windows must provide a printf in their
run-time support library.

(There is a library in the system folder called MSVCRT.DLL or something
like that. Using this is like sticking a fork in the toaster;
it is not documented for use by non-Microsoft applications.
It is not offered as part of a C implementation at all, let alone as
a conforming library part of a C implementation. Therefore, I will
not discuss it further.)

Both versions of the program, with the return 0 from main or exit(0)
can be fully expected to have externally indistinguishable behavior
on every version of glibc from the past 20 years.
(Which would be the case even if glibc had a separate thread for
flushing stdio buffers; it positively does not).

-- 
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Calling exit in main Mehdi Amini <atorrses@gmail.com> - 2021-06-25 10:46 +0430
  Re: Calling exit in main Kli-Kla-Klawitter <kliklaklawitter69@gmail.com> - 2021-06-25 08:19 +0200
    Re: Calling exit in main Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-06-25 00:48 -0700
      Re: Calling exit in main Kli-Kla-Klawitter <kliklaklawitter69@gmail.com> - 2021-06-25 10:08 +0200
        Re: Calling exit in main Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-06-25 01:38 -0700
          Re: Calling exit in main Kli-Kla-Klawitter <kliklaklawitter69@gmail.com> - 2021-06-25 11:03 +0200
            Re: Calling exit in main Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-06-25 08:27 -0700
              Re: Calling exit in main Kli-Kla-Klawitter <kliklaklawitter69@gmail.com> - 2021-06-25 18:52 +0200
                Re: Calling exit in main Kaz Kylheku <563-365-8930@kylheku.com> - 2021-06-25 17:14 +0000
                Re: Calling exit in main scott@slp53.sl.home (Scott Lurndal) - 2021-06-25 18:17 +0000
                Re: Calling exit in main Kaz Kylheku <563-365-8930@kylheku.com> - 2021-06-25 18:48 +0000
                Re: Calling exit in main Real Troll <real.troll@trolls.com> - 2021-06-25 20:21 +0100
                Re: Calling exit in main Kli-Kla-Klawitter <kliklaklawitter69@gmail.com> - 2021-06-26 09:21 +0200
                Re: Calling exit in main Kaz Kylheku <563-365-8930@kylheku.com> - 2021-06-28 16:45 +0000
                Re: Calling exit in main Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-06-28 18:14 +0100
                Re: Calling exit in main Richard Damon <Richard@Damon-Family.org> - 2021-06-25 13:33 -0400
    Re: Calling exit in main Kaz Kylheku <563-365-8930@kylheku.com> - 2021-06-25 15:05 +0000
  Re: Calling exit in main Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-06-25 01:34 -0700
  Re: Calling exit in main James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-06-25 11:51 -0400
    Re: Calling exit in main Kaz Kylheku <563-365-8930@kylheku.com> - 2021-06-25 16:13 +0000
    Re: Calling exit in main Guillaume <message@bottle.org> - 2021-06-25 18:48 +0200
      Re: Calling exit in main Kaz Kylheku <563-365-8930@kylheku.com> - 2021-06-25 17:05 +0000
        Re: Calling exit in main Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2021-06-25 15:22 -0600
          Re: Calling exit in main Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2021-06-25 15:29 -0600
      Re: Calling exit in main James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-06-25 14:50 -0400
        Re: Calling exit in main James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-06-25 14:59 -0400
      Re: Calling exit in main Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-06-25 13:40 -0700
      Re: Calling exit in main Jens Schweikhardt <usenet@schweikhardt.net> - 2021-06-26 08:25 +0000
  Re: Calling exit in main Andrey Tarasevich <andreytarasevich@hotmail.com> - 2021-06-25 10:42 -0700
    Re: Calling exit in main James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-06-25 14:51 -0400

csiph-web