• OT: Windows (Was: Re: Open Source does not mean easily re-compile-able)

    From Salvador Mirzo@21:1/5 to Muttley@dastardlyhq.com on Sat Jan 4 08:31:05 2025
    Muttley@dastardlyhq.com writes:

    On Fri, 03 Jan 2025 18:15:25 GMT
    scott@slp53.sl.home (Scott Lurndal) gabbled:
    Paul <nospam@needed.invalid> writes:
    On Thu, 1/2/2025 11:29 AM, Scott Lurndal wrote:

    Why would you expect the link step to require a lot of
    memory? The linker builds an elf executable from the contents
    of ELF object files, one ELF section at a time. It doesn't
    construct the entire ELF executable in memory before writing it out.


    It's based on experience, not imagination.

    I've built Thunderbird on both Windows and Linux.
    It was the Windows build that left a bad taste.
    Once you repeatedly have build failures during linking,
    you are always looking for it.


    Ah, well windows. You need not elaborate.

    I've been fortunate to have never built software in a
    microsoft environment (aside an optical jukebox driver
    for NT3.51 once on a contract job - even then I did
    all the editing on unix and just compiled and tested
    on the windows box).

    I did a Windows C++ job for a year. I still can't believe how complicated Visual Studio (2017 IIRC) made the most basic things such as setting library and include paths which were buried 2 or 3 levels down in some sub menu not to mention all the "project" BS which forced a certain structure on to your code filesystem layout which I didn't particularly want. Also the fact that console and GUI apps require a totally different project setup and boiler plate
    code from the start is just mind boggling.

    They always try to make things pretty and easy to use, but you end up
    with that. I think the only way to tolerate that is to be born and
    raised in such thing. Modularization is likely the most important thing
    in programming and it's hard to minimally praise Microsoft on
    modularization. For instance, is there any Windows software that
    handles a TCP connection in an accept-fork-exec fashion?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Salvador Mirzo@21:1/5 to Lawrence D'Oliveiro on Sat Jan 4 19:17:15 2025
    Lawrence D'Oliveiro <ldo@nz.invalid> writes:

    On Sat, 04 Jan 2025 08:31:05 -0300, Salvador Mirzo wrote:

    For instance, is there any Windows software that
    handles a TCP connection in an accept-fork-exec fashion?

    Almost certainly not. Because process creation is an expensive operation
    on Windows.

    Windows NT was masterminded by Dave Cutler, who was previously responsible for the VMS OS at his previous employer, DEC. He was a Unix-hater, part of
    a bunch of them at DEC. They would instinctively turn away from Unix ways
    of doing things, like forking multiple processes. So the systems they
    created did not encourage such techniques.

    Is that Dave with a YouTube channel?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Salvador Mirzo on Sun Jan 5 00:47:19 2025
    On Sat, 04 Jan 2025 19:17:15 -0300, Salvador Mirzo wrote:

    Lawrence D'Oliveiro <ldo@nz.invalid> writes:

    Windows NT was masterminded by Dave Cutler ...

    Is that Dave with a YouTube channel?

    No, that’s a different former Microsoftie, but he has had Cutler on his channel for an extended interview.

    I found it ironic that there was a PiDP-11, I think it was, placed within arm’s reach behind the guy during the entire interview. You know, the
    PDP-11 emulator that runs on a Linux-based Raspberry Pi. I wonder if the Unix-hater ever noticed that ...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@dastardlyhq.com@21:1/5 to All on Sun Jan 5 16:40:33 2025
    On Sat, 4 Jan 2025 22:13:05 -0000 (UTC)
    Lawrence D'Oliveiro <ldo@nz.invalid> gabbled:
    On Sat, 04 Jan 2025 08:31:05 -0300, Salvador Mirzo wrote:

    For instance, is there any Windows software that
    handles a TCP connection in an accept-fork-exec fashion?

    Almost certainly not. Because process creation is an expensive operation
    on Windows.

    Windows NT was masterminded by Dave Cutler, who was previously responsible >for the VMS OS at his previous employer, DEC. He was a Unix-hater, part of
    a bunch of them at DEC. They would instinctively turn away from Unix ways
    of doing things, like forking multiple processes. So the systems they
    created did not encourage such techniques.

    Presumably VMS relied heavily on multithreading then like Windows or was a process expected to everything itself sequentially?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to Muttley@dastardlyhq.com on Sun Jan 5 17:14:14 2025
    Muttley@dastardlyhq.com writes:
    On Sat, 4 Jan 2025 22:13:05 -0000 (UTC)
    Lawrence D'Oliveiro <ldo@nz.invalid> gabbled:
    On Sat, 04 Jan 2025 08:31:05 -0300, Salvador Mirzo wrote:

    For instance, is there any Windows software that
    handles a TCP connection in an accept-fork-exec fashion?

    Almost certainly not. Because process creation is an expensive operation
    on Windows.

    Windows NT was masterminded by Dave Cutler, who was previously responsible >>for the VMS OS at his previous employer, DEC. He was a Unix-hater, part of >>a bunch of them at DEC. They would instinctively turn away from Unix ways >>of doing things, like forking multiple processes. So the systems they >>created did not encourage such techniques.

    Presumably VMS relied heavily on multithreading then like Windows or was a >process expected to everything itself sequentially?

    The first shared memory multiprocessor VAX was the 11/782. It was
    not considered SMP. I worked with four 11/780's sharing a 4MB MA-780
    for three years in the early 80s - the shared memory could be used
    primarily for inter-process communications (e.g. mailboxes) or one
    could install commonly used program read-only 'text' regions in the shared memory to reduce the memory presure on each of the 780s. I developed
    a DECnet ACP to support transport within the cluster via MA-780.

    VMS itself did not leverage threads in the modern sense at that point.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Muttley@dastardlyhq.com on Sun Jan 5 21:09:55 2025
    In article <vlecm0$1465i$1@dont-email.me>, <Muttley@dastardlyhq.com> wrote: >On Sat, 4 Jan 2025 22:13:05 -0000 (UTC)
    Lawrence D'Oliveiro <ldo@nz.invalid> gabbled:
    On Sat, 04 Jan 2025 08:31:05 -0300, Salvador Mirzo wrote:

    For instance, is there any Windows software that
    handles a TCP connection in an accept-fork-exec fashion?

    Almost certainly not. Because process creation is an expensive operation
    on Windows.

    Windows NT was masterminded by Dave Cutler, who was previously responsible >>for the VMS OS at his previous employer, DEC. He was a Unix-hater, part of >>a bunch of them at DEC. They would instinctively turn away from Unix ways >>of doing things, like forking multiple processes. So the systems they >>created did not encourage such techniques.

    Presumably VMS relied heavily on multithreading then like Windows or was a >process expected to everything itself sequentially?

    Many system services on VMS are asynchronous, and the system
    architecture provides a mechanisms to signal completion; ASTs,
    mailboxes, etc. Thus, many programs (not all) on VMS are
    written in a callback/closure style.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Mon Jan 6 08:36:27 2025
    On Sun, 5 Jan 2025 21:09:55 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vlecm0$1465i$1@dont-email.me>, <Muttley@dastardlyhq.com> wrote: >>On Sat, 4 Jan 2025 22:13:05 -0000 (UTC)
    Lawrence D'Oliveiro <ldo@nz.invalid> gabbled:
    On Sat, 04 Jan 2025 08:31:05 -0300, Salvador Mirzo wrote:

    For instance, is there any Windows software that
    handles a TCP connection in an accept-fork-exec fashion?

    Almost certainly not. Because process creation is an expensive operation >>>on Windows.

    Windows NT was masterminded by Dave Cutler, who was previously responsible >>>for the VMS OS at his previous employer, DEC. He was a Unix-hater, part of >>>a bunch of them at DEC. They would instinctively turn away from Unix ways >>>of doing things, like forking multiple processes. So the systems they >>>created did not encourage such techniques.

    Presumably VMS relied heavily on multithreading then like Windows or was a >>process expected to everything itself sequentially?

    Many system services on VMS are asynchronous, and the system
    architecture provides a mechanisms to signal completion; ASTs,
    mailboxes, etc. Thus, many programs (not all) on VMS are
    written in a callback/closure style.

    I imagine that could become complicated very quickly and presumably relies
    on the OS providing the signalling mechanisms for everything you might
    want to do - eg waiting for a socket connection (or whatever the decnet equivalent was).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Muttley@DastardlyHQ.org on Mon Jan 6 14:08:44 2025
    In article <vlg4mb$1hi6d$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >On Sun, 5 Jan 2025 21:09:55 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vlecm0$1465i$1@dont-email.me>, <Muttley@dastardlyhq.com> wrote: >>>On Sat, 4 Jan 2025 22:13:05 -0000 (UTC)
    Lawrence D'Oliveiro <ldo@nz.invalid> gabbled:
    On Sat, 04 Jan 2025 08:31:05 -0300, Salvador Mirzo wrote:

    For instance, is there any Windows software that
    handles a TCP connection in an accept-fork-exec fashion?

    Almost certainly not. Because process creation is an expensive operation >>>>on Windows.

    Windows NT was masterminded by Dave Cutler, who was previously responsible >>>>for the VMS OS at his previous employer, DEC. He was a Unix-hater, part of >>>>a bunch of them at DEC. They would instinctively turn away from Unix ways >>>>of doing things, like forking multiple processes. So the systems they >>>>created did not encourage such techniques.

    Presumably VMS relied heavily on multithreading then like Windows or was a >>>process expected to everything itself sequentially?

    Many system services on VMS are asynchronous, and the system
    architecture provides a mechanisms to signal completion; ASTs,
    mailboxes, etc. Thus, many programs (not all) on VMS are
    written in a callback/closure style.

    I imagine that could become complicated very quickly and presumably relies
    on the OS providing the signalling mechanisms for everything you might
    want to do - eg waiting for a socket connection (or whatever the decnet >equivalent was).

    It's a fairly common way to structure software even today. As I
    said, the OS provides asychronous notification mechanisms (ASTs)
    and IPC (mailboxes etc) for signaling operation completion.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to Muttley@DastardlyHQ.org on Mon Jan 6 15:02:49 2025
    Muttley@DastardlyHQ.org writes:
    On Sun, 5 Jan 2025 21:09:55 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vlecm0$1465i$1@dont-email.me>, <Muttley@dastardlyhq.com> wrote: >>>On Sat, 4 Jan 2025 22:13:05 -0000 (UTC)
    Lawrence D'Oliveiro <ldo@nz.invalid> gabbled:
    On Sat, 04 Jan 2025 08:31:05 -0300, Salvador Mirzo wrote:

    For instance, is there any Windows software that
    handles a TCP connection in an accept-fork-exec fashion?

    Almost certainly not. Because process creation is an expensive operation >>>>on Windows.

    Windows NT was masterminded by Dave Cutler, who was previously responsible >>>>for the VMS OS at his previous employer, DEC. He was a Unix-hater, part of >>>>a bunch of them at DEC. They would instinctively turn away from Unix ways >>>>of doing things, like forking multiple processes. So the systems they >>>>created did not encourage such techniques.

    Presumably VMS relied heavily on multithreading then like Windows or was a >>>process expected to everything itself sequentially?

    Many system services on VMS are asynchronous, and the system
    architecture provides a mechanisms to signal completion; ASTs,
    mailboxes, etc. Thus, many programs (not all) on VMS are
    written in a callback/closure style.

    I imagine that could become complicated very quickly and presumably relies
    on the OS providing the signalling mechanisms for everything you might
    want to do - eg waiting for a socket connection (or whatever the decnet >equivalent was).

    Actually, it was straightfoward to use and rather elegent. You
    could build a nice asynchronous transfer algorithm just using AST's
    a and/or event flags.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Mon Jan 6 14:21:48 2025
    On Mon, 6 Jan 2025 14:08:44 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vlg4mb$1hi6d$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>On Sun, 5 Jan 2025 21:09:55 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vlecm0$1465i$1@dont-email.me>, <Muttley@dastardlyhq.com> wrote: >>>>On Sat, 4 Jan 2025 22:13:05 -0000 (UTC)
    Lawrence D'Oliveiro <ldo@nz.invalid> gabbled:
    On Sat, 04 Jan 2025 08:31:05 -0300, Salvador Mirzo wrote:

    For instance, is there any Windows software that
    handles a TCP connection in an accept-fork-exec fashion?

    Almost certainly not. Because process creation is an expensive operation >>>>>on Windows.

    Windows NT was masterminded by Dave Cutler, who was previously responsible

    for the VMS OS at his previous employer, DEC. He was a Unix-hater, part of

    a bunch of them at DEC. They would instinctively turn away from Unix ways >>>>>of doing things, like forking multiple processes. So the systems they >>>>>created did not encourage such techniques.

    Presumably VMS relied heavily on multithreading then like Windows or was a >>>>process expected to everything itself sequentially?

    Many system services on VMS are asynchronous, and the system
    architecture provides a mechanisms to signal completion; ASTs,
    mailboxes, etc. Thus, many programs (not all) on VMS are
    written in a callback/closure style.

    I imagine that could become complicated very quickly and presumably relies >>on the OS providing the signalling mechanisms for everything you might
    want to do - eg waiting for a socket connection (or whatever the decnet >>equivalent was).

    It's a fairly common way to structure software even today. As I

    In Windows yes, which frankly is probably not a coincidence. Not so much
    in unix unless you're writing a GUI program.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to Muttley@DastardlyHQ.org on Mon Jan 6 15:05:33 2025
    Muttley@DastardlyHQ.org writes:
    On Mon, 6 Jan 2025 14:08:44 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vlg4mb$1hi6d$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>>On Sun, 5 Jan 2025 21:09:55 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vlecm0$1465i$1@dont-email.me>, <Muttley@dastardlyhq.com> wrote:
    On Sat, 4 Jan 2025 22:13:05 -0000 (UTC)
    Lawrence D'Oliveiro <ldo@nz.invalid> gabbled:
    On Sat, 04 Jan 2025 08:31:05 -0300, Salvador Mirzo wrote:

    For instance, is there any Windows software that
    handles a TCP connection in an accept-fork-exec fashion?

    Almost certainly not. Because process creation is an expensive operation >>>>>>on Windows.

    Windows NT was masterminded by Dave Cutler, who was previously responsible

    for the VMS OS at his previous employer, DEC. He was a Unix-hater, part of

    a bunch of them at DEC. They would instinctively turn away from Unix ways >>>>>>of doing things, like forking multiple processes. So the systems they >>>>>>created did not encourage such techniques.

    Presumably VMS relied heavily on multithreading then like Windows or was a >>>>>process expected to everything itself sequentially?

    Many system services on VMS are asynchronous, and the system >>>>architecture provides a mechanisms to signal completion; ASTs, >>>>mailboxes, etc. Thus, many programs (not all) on VMS are
    written in a callback/closure style.

    I imagine that could become complicated very quickly and presumably relies >>>on the OS providing the signalling mechanisms for everything you might >>>want to do - eg waiting for a socket connection (or whatever the decnet >>>equivalent was).

    It's a fairly common way to structure software even today. As I

    In Windows yes, which frankly is probably not a coincidence. Not so much
    in unix unless you're writing a GUI program.

    ASTs and unix signals have similar semantics. It's certainly possible to
    use, for example, SIGIO in a similar manner to the VMS AST, where the
    AST signals I/O completion and the AST handler initiates a subsequent operation.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Mon Jan 6 15:55:19 2025
    On Mon, 06 Jan 2025 15:05:33 GMT
    scott@slp53.sl.home (Scott Lurndal) wibbled:
    Muttley@DastardlyHQ.org writes:
    In Windows yes, which frankly is probably not a coincidence. Not so much
    in unix unless you're writing a GUI program.

    ASTs and unix signals have similar semantics. It's certainly possible to >use, for example, SIGIO in a similar manner to the VMS AST, where the
    AST signals I/O completion and the AST handler initiates a subsequent >operation.

    Unix signals should only be used to set flags that are then read later. Doing anything complicated in a signal handler is asking for trouble as you have
    no idea where the program was when the signal occured and there can be all sorts of re-entrant issues or even deadlocks if using mutexes.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Muttley@DastardlyHQ.org on Mon Jan 6 15:22:51 2025
    In article <vlgots$1le5s$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >On Mon, 6 Jan 2025 14:08:44 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vlg4mb$1hi6d$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>>On Sun, 5 Jan 2025 21:09:55 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vlecm0$1465i$1@dont-email.me>, <Muttley@dastardlyhq.com> wrote:
    On Sat, 4 Jan 2025 22:13:05 -0000 (UTC)
    Lawrence D'Oliveiro <ldo@nz.invalid> gabbled:
    On Sat, 04 Jan 2025 08:31:05 -0300, Salvador Mirzo wrote:

    For instance, is there any Windows software that
    handles a TCP connection in an accept-fork-exec fashion?

    Almost certainly not. Because process creation is an expensive operation >>>>>>on Windows.

    Windows NT was masterminded by Dave Cutler, who was previously responsible

    for the VMS OS at his previous employer, DEC. He was a Unix-hater, part of

    a bunch of them at DEC. They would instinctively turn away from Unix ways >>>>>>of doing things, like forking multiple processes. So the systems they >>>>>>created did not encourage such techniques.

    Presumably VMS relied heavily on multithreading then like Windows or was a >>>>>process expected to everything itself sequentially?

    Many system services on VMS are asynchronous, and the system >>>>architecture provides a mechanisms to signal completion; ASTs, >>>>mailboxes, etc. Thus, many programs (not all) on VMS are
    written in a callback/closure style.

    I imagine that could become complicated very quickly and presumably relies >>>on the OS providing the signalling mechanisms for everything you might >>>want to do - eg waiting for a socket connection (or whatever the decnet >>>equivalent was).

    It's a fairly common way to structure software even today. As I

    In Windows yes, which frankly is probably not a coincidence. Not so much
    in unix unless you're writing a GUI program.

    Very much in Unix, actually. The kernel is highly asynchronous
    (it must be, to match the hardware), and has been since the
    early 1970s. Many user programs similarly.

    Historically, many systems have provided direct support for
    asynchronous programming on Unix. Going back to the early
    commerical Unix days, masscomp's real time Unix had ASTs, not
    signals, to support asynch IO directly from userspace. More
    recently, POSIX.1b and POSIX AIO are widely supported. Polling
    interfaces like kqueue and epoll, etc, exist largely to support
    multiplexing asynchronous tasks, though not using the callback
    model per se (one polls a set of e.g. file descriptors and
    dispatches explicitly based on their states as reported by the
    polling interface). Most recently, things like io_uring on
    Linux are designed specifically to support asynch IO in user
    programs.

    Granted, the Unix system interface is not particularly
    asynchronous-friendly, but that is by design. As Doug McIlroy
    put it,

    |The infrastructure had to be asynchronous. The whole point was
    |to surmount that difficult model and keep everyday programming
    |simple. User visibility of asynchrony was held to a minimum:
    |fork(), signal(), wait(). Signal() was there first and
    |foremost to support SIGKILL; it did not purport to provide a
    |sound basis for asynchronous IPC. (https://tuhs.org/mailman3/hyperkitty/list/tuhs@tuhs.org/message/IAAO2MRTMSX3C54YGTNOTIT4FEQA73IR/)

    This was fine for writing `cat` and `cp` etc, which were largely
    synchronous anyway. Less so for server-style programs or
    programs that had to multiplex data from many sources generally.

    This early decision to favor the comprehensibility of one class
    of program in the system call interface has had reverberations
    through time, leading to much complexity. This is one reason
    that, for example, the Go runtime has to jump through so many
    hoops to mux goroutines onto the underlying OS-provided thread
    abstraction; or that the implementation of async executors for
    Rust is hard (cf Tokio). In that same message referenced above,
    Doug continues:

    |The complexity of sigaction() is evidence that asynchrony
    |remains untamed 40 years on.

    This is unfair. It's evidence that grafting it onto an existing
    highly synchronous system interface that was simply not designed
    to accommodate it in the first place is very hard, even 50 years
    after the fact.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Mon Jan 6 16:00:33 2025
    On Mon, 6 Jan 2025 15:22:51 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vlgots$1le5s$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>In Windows yes, which frankly is probably not a coincidence. Not so much
    in unix unless you're writing a GUI program.

    Very much in Unix, actually. The kernel is highly asynchronous
    (it must be, to match the hardware), and has been since the
    early 1970s. Many user programs similarly.

    Historically, many systems have provided direct support for
    asynchronous programming on Unix. Going back to the early
    commerical Unix days, masscomp's real time Unix had ASTs, not
    signals, to support asynch IO directly from userspace. More
    recently, POSIX.1b and POSIX AIO are widely supported. Polling
    interfaces like kqueue and epoll, etc, exist largely to support

    Multiplexing is not asychronous, its simply offloading status checking to
    the kernel. The program using is still very much sequential , at least at
    that point.

    Posix AIO is not asynch in the strict sense , its more "ok kernel, go do this and I'll check how you're doing later". Proper asynch where the program execution path gets bounced around between various callbacks is something
    else entirely.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to Muttley@DastardlyHQ.org on Mon Jan 6 16:46:56 2025
    Muttley@DastardlyHQ.org writes:
    On Mon, 06 Jan 2025 15:05:33 GMT
    scott@slp53.sl.home (Scott Lurndal) wibbled:
    Muttley@DastardlyHQ.org writes:
    In Windows yes, which frankly is probably not a coincidence. Not so much >>>in unix unless you're writing a GUI program.

    ASTs and unix signals have similar semantics. It's certainly possible to >>use, for example, SIGIO in a similar manner to the VMS AST, where the
    AST signals I/O completion and the AST handler initiates a subsequent >>operation.

    Unix signals should only be used to set flags that are then read later.

    You're opinion is not widely shared. Note that the POSIX specification carefully notes which interfaces are not signal-safe.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Muttley@DastardlyHQ.org on Mon Jan 6 16:39:49 2025
    In article <vlgun1$1minf$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >On Mon, 6 Jan 2025 15:22:51 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vlgots$1le5s$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>>In Windows yes, which frankly is probably not a coincidence. Not so much >>>in unix unless you're writing a GUI program.

    Very much in Unix, actually. The kernel is highly asynchronous
    (it must be, to match the hardware), and has been since the
    early 1970s. Many user programs similarly.

    Historically, many systems have provided direct support for
    asynchronous programming on Unix. Going back to the early
    commerical Unix days, masscomp's real time Unix had ASTs, not
    signals, to support asynch IO directly from userspace. More
    recently, POSIX.1b and POSIX AIO are widely supported. Polling
    interfaces like kqueue and epoll, etc, exist largely to support

    Multiplexing is not asychronous, its simply offloading status checking to
    the kernel.

    Of course. It's a means to allow a program to respond to
    asynchronous events.

    The program using is still very much sequential , at least at
    that point.

    But the events are not. That's the point. This allows a
    program to initiate a non-blocking IO operation (like, say,
    establishing a TCP connection using the sockets API), go do
    something else, and check it's status later.

    Posix AIO is not asynch in the strict sense , its more "ok kernel, go do this >and I'll check how you're doing later". Proper asynch where the program >execution path gets bounced around between various callbacks is something >else entirely.

    The POSIX AIO interface allows the kernel to generate a signal
    to inform the program that an IO operation has completed, e.g.,
    by setting up the `aio_sigevent` and `SIGEV_SIGNAL`. It doesn't
    get much more asynchronous than that.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Kuyper@21:1/5 to Scott Lurndal on Mon Jan 6 12:42:48 2025
    On 1/6/25 11:46, Scott Lurndal wrote:
    Muttley@DastardlyHQ.org writes:
    ...
    Unix signals should only be used to set flags that are then read later.

    You're opinion is not widely shared. Note that the POSIX specification carefully notes which interfaces are not signal-safe.

    What precisely does "signal-safe" mean? As I understand it, it is
    supposed to be safe for a signal to interrupt standard library routines,
    but that it's not safe for a signal handler to call most of those
    functions. There's just a few exceptions, described below.

    The C standard says the following about signal handlers:
    "The functions in the standard library are not guaranteed to be
    reentrant and may modify objects with static or thread storage duration.
    239)" (7.1.4p4)
    Footnote 239 says "Thus, a signal handler cannot, in general, call
    standard library functions."

    "If the signal occurs other than as the result of calling the abort or
    raise function, the behavior is undefined if the signal handler refers
    to any object with static or thread storage duration that is not a
    lock-free atomic object and that is not declared with the constexpr storage-class specifier other than by assigning a value to an object
    declared as volatile sig_atomic_t, or the signal handler calls any
    function in the standard library other than
    — the abort function,
    — the _Exit function,
    — the quick_exit function,
    — the functions in <stdatomic.h> (except where explicitly stated
    otherwise) when the atomic arguments are lock-free,
    — the atomic_is_lock_free function with any atomic argument, or
    — the signal function with the first argument equal to the signal number corresponding to the signal that caused the invocation of the handler. Furthermore, if such a call to the signal function results in a SIG_ERR
    return, the object designated by errno has an indeterminate representation.310)" (7.14.1.1p5)
    Footnote 310 says "If any signal is generated by an asynchronous signal handler, the behavior is undefined."

    "If a signal occurs other than as the result of calling the abort or
    raise functions, the behavior is undefined if the signal handler reads
    or modifies an atomic object that has an indeterminate representation." (7.17.2p2)

    "If a signal occurs other than as the result of calling the abort or
    raise functions, the behavior is undefined if the signal handler calls
    the atomic_init generic function." (7.17.2.1p4)

    The POSIX standard claims that its version of <signal.h> conforms to the
    C standard, and as far as I can see, the POSIX standard doesn't say
    anything to define the behavior that is undefined by the C standard.

    Could you demonstrate how, within the above restrictions, a signal
    handler that doesn't cause the program to exit in one fashion or another
    could do anything useful other than "set flags that are read later"?
    I'm not saying it cannot be done. I claim no expertise in this kind of programming - I never needed to write signal handlers. However, the last
    time I considered the matter carefully (which was two or three versions
    of the C standard ago) I couldn't figure out how to do much more than
    that. At that time I did not consider how POSIX affects the issue, and I
    don't know enough about POSIX signals to evaluate that issue.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kalevi Kolttonen@21:1/5 to Muttley@dastardlyhq.org on Mon Jan 6 17:53:20 2025
    Muttley@dastardlyhq.org wrote:
    Unix signals should only be used to set flags that are then read later. Doing anything complicated in a signal handler is asking for trouble as you have
    no idea where the program was when the signal occured and there can be all sorts of re-entrant issues or even deadlocks if using mutexes.

    That is what I have learned, too, but I cannot remember the
    source. Maybe one of Richard Stevens' UNIX books.

    I am no expert, but I guess if you need to do async programming
    on UNIX/Linux userspace, your best is to use POSIX Threads.

    br,
    KK

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to jameskuyper@alumni.caltech.edu on Mon Jan 6 18:16:31 2025
    In article <vlh4mo$1nccc$1@dont-email.me>,
    James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
    On 1/6/25 11:46, Scott Lurndal wrote:
    Muttley@DastardlyHQ.org writes:
    ...
    Unix signals should only be used to set flags that are then read later.

    You're opinion is not widely shared. Note that the POSIX specification
    carefully notes which interfaces are not signal-safe.

    What precisely does "signal-safe" mean? As I understand it, it is
    supposed to be safe for a signal to interrupt standard library routines,
    but that it's not safe for a signal handler to call most of those
    functions. There's just a few exceptions, described below.

    From POSIX 2024, sectino 2.4 ("Signal Concepts"):

    |The following table defines a set of functions and
    |function-like macros that shall be async-signal-safe.
    |Therefore, applications can call them, without restriction,
    |from signal-catching functions. Note that, although there is
    |no restriction on the calls themselves, for certain functions
    |there are restrictions on subsequent behavior after the
    |function is called from a signal-catching function (see longjmp()). (https://pubs.opengroup.org/onlinepubs/9799919799/functions/V2_chap02.html#tag_16_04)

    (The table mentioned above includes over 200 functions.)

    The C standard says the following about signal handlers:
    "The functions in the standard library are not guaranteed to be
    reentrant and may modify objects with static or thread storage duration. >239)" (7.1.4p4)
    Footnote 239 says "Thus, a signal handler cannot, in general, call
    standard library functions."

    This is comp.unix.programmer, not comp.lang.c.

    [snip]

    "If a signal occurs other than as the result of calling the abort or
    raise functions, the behavior is undefined if the signal handler reads
    or modifies an atomic object that has an indeterminate representation." >(7.17.2p2)

    "If a signal occurs other than as the result of calling the abort or
    raise functions, the behavior is undefined if the signal handler calls
    the atomic_init generic function." (7.17.2.1p4)

    The POSIX standard claims that its version of <signal.h> conforms to the
    C standard, and as far as I can see, the POSIX standard doesn't say
    anything to define the behavior that is undefined by the C standard.

    This is factually incorrect.

    Could you demonstrate how, within the above restrictions, a signal
    handler that doesn't cause the program to exit in one fashion or another >could do anything useful other than "set flags that are read later"?

    Those restrictions don't apply in this context. But a trivial
    example:

    void
    reaper(int signo)
    {
    (void)signo;
    wait(NULL);
    }


    /* ... */
    signal(SIGCHLD, reaper);

    I'm not saying it cannot be done. I claim no expertise in this kind of >programming - I never needed to write signal handlers.

    Perhaps read up on the matter before commenting, then?

    However, the last
    time I considered the matter carefully (which was two or three versions
    of the C standard ago) I couldn't figure out how to do much more than
    that. At that time I did not consider how POSIX affects the issue, and I >don't know enough about POSIX signals to evaluate that issue.

    In strict C, this is correct. But while POSIX includes ISO C as
    a subset, it extends allowable behavior in lots of places to
    both standardize the behavior of existing programs as well as
    make it possible to write useful programs on Unix-style systems.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to James Kuyper on Mon Jan 6 18:52:28 2025
    James Kuyper <jameskuyper@alumni.caltech.edu> writes:
    On 1/6/25 11:46, Scott Lurndal wrote:
    Muttley@DastardlyHQ.org writes:
    ...
    Unix signals should only be used to set flags that are then read later.

    You're opinion is not widely shared. Note that the POSIX specification
    carefully notes which interfaces are not signal-safe.


    Could you demonstrate how, within the above restrictions, a signal
    handler that doesn't cause the program to exit in one fashion or another >could do anything useful other than "set flags that are read later"?
    I'm not saying it cannot be done. I claim no expertise in this kind of >programming - I never needed to write signal handlers. However, the last
    time I considered the matter carefully (which was two or three versions
    of the C standard ago) I couldn't figure out how to do much more than
    that. At that time I did not consider how POSIX affects the issue, and I >don't know enough about POSIX signals to evaluate that issue.

    Augmenting Dan's well-written response, I'd point out that those
    POSIX interfaces (many of which are system calls, not library
    functions) are designed to work with signals. One common
    technique is to call longjmp() from within a SIGINT handler;
    all the application must do is mask the signal if/when executing
    in a non-async-signal-safe critical section. Note that a signal
    (with a few exceptions) will not interrupt a system call, and when
    it does, the system call returns EINTR to the caller without any
    other caller-visible side effects (either the system call fully
    completes before the signal is delivered, or it has no effect).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rainer Weikusat@21:1/5 to James Kuyper on Mon Jan 6 18:24:24 2025
    James Kuyper <jameskuyper@alumni.caltech.edu> writes:
    On 1/6/25 11:46, Scott Lurndal wrote:
    Muttley@DastardlyHQ.org writes:
    ...
    Unix signals should only be used to set flags that are then read later.

    You're opinion is not widely shared. Note that the POSIX specification
    carefully notes which interfaces are not signal-safe.

    What precisely does "signal-safe" mean?

    The UNIX standard has meanwhile started to contradict itself on this
    topic because of the apparent attempt to follow the (pretty silly) C++
    memory model incorporated into C for no particular reason. But the
    relevant part of the UNIX definition (still part of the current
    definition) used to be

    In the presence of signals, all functions defined by this volume
    of POSIX.1-2024 shall behave as defined when called from or
    interrupted by a signal-catching function, with the exception
    that when a signal interrupts an unsafe function or
    function-like macro, or equivalent (such as the processing
    equivalent to exit() performed after a return from the initial
    call to main()), and the signal-catching function calls an
    unsafe function or function-like macro, the behavior is
    undefined.

    This text is below the list of async-signal safe interfaces. It
    contradicts the

    the behavior is undefined if:

    [...]

    The signal handler calls any function or function-like macro
    defined in this standard other than one of the functions and
    macros specified below as being async-signal-safe.

    immediately above it.

    https://pubs.opengroup.org/onlinepubs/9799919799/functions/V2_chap02.html#tag_16_04

    When ignoring the apparent attempt at making signals really impossible
    to use, "async signal-safe" is really quite simple: Any handler can do
    anything provided it doesn't invoke some kind of not async signal safe interface. A handler which didn't interrupt an interface that's not
    async signal safe can anything, including calling unsafe functions.

    A usual way to achieve the latter is to keep signals blocked except when calling an async signal safe functions, eg, pselect, ppoll or
    sigsuspend.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Muttley on Mon Jan 6 20:26:15 2025
    On Mon, 6 Jan 2025 14:21:48 -0000 (UTC), Muttley wrote:

    Not so much in unix unless you're writing a GUI program.

    In *nix, select/poll works well when the performance bottleneck resides in
    the I/O. async/await lets you linearize the logic of your handlers for
    easier comprehension, instead of breaking them up into separate calback
    stages.

    async/await is also useful in GUI programs, for the same reason.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Kalevi Kolttonen on Mon Jan 6 20:28:43 2025
    On Mon, 6 Jan 2025 17:53:20 -0000 (UTC), Kalevi Kolttonen wrote:

    I am no expert, but I guess if you need to do async programming on
    UNIX/Linux userspace, your best is to use POSIX Threads.

    Threads are something you normally want to avoid, unless CPU usage is the bottleneck in your application.

    In the case where the limiting factor is I/O or network bandwidth, or a
    GUI app waiting for user input, then async/await is a more convenient
    paradigm.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to Lawrence D'Oliveiro on Mon Jan 6 20:36:47 2025
    Lawrence D'Oliveiro <ldo@nz.invalid> writes:
    On Mon, 6 Jan 2025 17:53:20 -0000 (UTC), Kalevi Kolttonen wrote:

    I am no expert, but I guess if you need to do async programming on
    UNIX/Linux userspace, your best is to use POSIX Threads.

    Threads are something you normally want to avoid, unless CPU usage is the >bottleneck in your application.

    Complete and utter nonsense.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kenny McCormack@21:1/5 to Scott Lurndal on Mon Jan 6 20:38:28 2025
    In article <z9XeP.3$TgDc.2@fx38.iad>, Scott Lurndal <slp53@pacbell.net> wrote: >Lawrence D'Oliveiro <ldo@nz.invalid> writes:
    On Mon, 6 Jan 2025 17:53:20 -0000 (UTC), Kalevi Kolttonen wrote:

    I am no expert, but I guess if you need to do async programming on
    UNIX/Linux userspace, your best is to use POSIX Threads.

    Threads are something you normally want to avoid, unless CPU usage is the >>bottleneck in your application.

    Complete and utter nonsense.

    As you would expect, cosidering the source.

    --
    Just for a change of pace, this sig is *not* an obscure reference to comp.lang.c...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Muttley on Mon Jan 6 20:27:15 2025
    On Mon, 6 Jan 2025 16:00:33 -0000 (UTC), Muttley wrote:

    Posix AIO is not asynch in the strict sense , its more "ok kernel, go do
    this and I'll check how you're doing later".

    POSIX has “real-time signals”, which are very similar to VMS ASTs.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nicolas George@21:1/5 to All on Tue Jan 7 00:49:32 2025
    Kalevi Kolttonen, dans le message <vlh5ag$1nruu$1@dont-email.me>, a
    Θcritá:
    I am no expert, but I guess if you need to do async programming
    on UNIX/Linux userspace, your best is to use POSIX Threads.

    Very common misconception. The communication mechanisms between POSIX
    threads and Unix I/O are completely alien to each-other: it is not possible
    to poll() on a thread condition, nor is it it possible to set up a condition
    to be woken by data on a file descriptor. As a result, anybody who tries to
    use threads to solve problems of I/O concurrency ends up having to implement
    a poll() or equivalent loop in each thread, defeating the purpose.

    POSIX threads are good to improve on computation concurrency, but they do
    not make I/O concurrency simpler, quite the opposite.

    The same might not be true for other kinds of threads.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Nicolas George on Tue Jan 7 02:14:11 2025
    On 07 Jan 2025 00:49:32 GMT, Nicolas George wrote:

    The communication mechanisms between POSIX
    threads and Unix I/O are completely alien to each-other: it is not
    possible to poll() on a thread condition, nor is it it possible to set
    up a condition to be woken by data on a file descriptor.

    Linux offers signalfd, so you can indeed use poll(2) in a thread to be
    woken up by any file descriptor, including a signal one (and that includes POSIX real-time signals).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Tue Jan 7 08:36:29 2025
    On Mon, 06 Jan 2025 16:46:56 GMT
    scott@slp53.sl.home (Scott Lurndal) wibbled:
    Muttley@DastardlyHQ.org writes:
    On Mon, 06 Jan 2025 15:05:33 GMT
    scott@slp53.sl.home (Scott Lurndal) wibbled:
    Muttley@DastardlyHQ.org writes:
    In Windows yes, which frankly is probably not a coincidence. Not so much >>>>in unix unless you're writing a GUI program.

    ASTs and unix signals have similar semantics. It's certainly possible to >>>use, for example, SIGIO in a similar manner to the VMS AST, where the
    AST signals I/O completion and the AST handler initiates a subsequent >>>operation.

    Unix signals should only be used to set flags that are then read later.

    You're opinion is not widely shared. Note that the POSIX specification >carefully notes which interfaces are not signal-safe.

    ITYF it is VERY widely shared and having a signal safe API function is only step 2 - plenty of the functions in the program itself or 3rd party library functions are probably not re-entrant safe and even if they are, having
    code stomp over itself - eg if in the middle of writing a log message then a signal is generated which tried to write a log message itself - is a very
    poor way to write code.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Tue Jan 7 08:37:03 2025
    On Mon, 6 Jan 2025 17:53:20 -0000 (UTC)
    kalevi@kolttonen.fi (Kalevi Kolttonen) wibbled:
    Muttley@dastardlyhq.org wrote:
    Unix signals should only be used to set flags that are then read later. Doing

    anything complicated in a signal handler is asking for trouble as you have >> no idea where the program was when the signal occured and there can be all >> sorts of re-entrant issues or even deadlocks if using mutexes.

    That is what I have learned, too, but I cannot remember the
    source. Maybe one of Richard Stevens' UNIX books.

    I am no expert, but I guess if you need to do async programming
    on UNIX/Linux userspace, your best is to use POSIX Threads.

    Agreed.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to before on Tue Jan 7 08:34:30 2025
    On Mon, 6 Jan 2025 16:39:49 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vlgun1$1minf$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>On Mon, 6 Jan 2025 15:22:51 -0000 (UTC)
    Multiplexing is not asychronous, its simply offloading status checking to >>the kernel.

    Of course. It's a means to allow a program to respond to
    asynchronous events.

    Thats not the same as the program itself being asynch.

    The program using is still very much sequential , at least at
    that point.

    But the events are not. That's the point. This allows a
    program to initiate a non-blocking IO operation (like, say,
    establishing a TCP connection using the sockets API), go do
    something else, and check it's status later.

    Thats not proper asych, its still sequential. Proper asynch is when the
    program execution path is directly modified by external events. Otherwise
    you could claim simply using the standard file I/O system is asynchronous programming as there's no guarantee that any data has been written to the disk before write(), fprintf() etc return.

    Posix AIO is not asynch in the strict sense , its more "ok kernel, go do this >>and I'll check how you're doing later". Proper asynch where the program >>execution path gets bounced around between various callbacks is something >>else entirely.

    The POSIX AIO interface allows the kernel to generate a signal
    to inform the program that an IO operation has completed, e.g.,
    by setting up the `aio_sigevent` and `SIGEV_SIGNAL`. It doesn't
    get much more asynchronous than that.

    Sure, but as I've said before, signals should only set flags to be processed later.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nicolas George@21:1/5 to All on Tue Jan 7 08:59:28 2025
    Lawrence D'Oliveiro , dans le message <vli2lj$1t3lt$8@dont-email.me>, a
    Θcritá:
    Linux offers signalfd, so you can indeed use poll(2) in a thread to be
    woken up by any file descriptor, including a signal one (and that includes POSIX real-time signals).

    Proving my point that you need to use poll() even when doing threads.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to nicolas$george@salle-s.org on Tue Jan 7 13:59:27 2025
    In article <677c7a1b$0$28501$426a74cc@news.free.fr>,
    Nicolas George <nicolas$george@salle-s.org> wrote:
    Kalevi Kolttonen, dans le message <vlh5ag$1nruu$1@dont-email.me>, a
    Θcritá:
    I am no expert, but I guess if you need to do async programming
    on UNIX/Linux userspace, your best is to use POSIX Threads.

    Very common misconception.

    This is correct. Threads are a concurrency mechanism. You use
    them to write (more or less) sequential execution flows that run
    concurrently with respect to one another. They are not needed
    to do "async programming UNIX/Linux userspace". Indeed, in some
    sense they're sort of the antithesis of async programming.

    The communication mechanisms between POSIX
    threads and Unix I/O are completely alien to each-other: it is not possible >to poll() on a thread condition, nor is it it possible to set up a condition >to be woken by data on a file descriptor. As a result, anybody who tries to >use threads to solve problems of I/O concurrency ends up having to implement >a poll() or equivalent loop in each thread, defeating the purpose.

    This, however, does not follow. I don't see why "poll" is
    strictly required for IO concurrency.

    In addition to signalfd etc, there is no reason you cannot, say,
    have a signal handler that broadcasts on a condition variable
    after an asynchronous IO operation completes, thus waking up a
    thread.

    More generally, in the context of a multithreaded program,
    (assuming the POSIX threading model) the "condition to be woken
    by data on a file descriptor" is that the IO operation on which
    the thread was blocked has completed or been interrupted. In a
    system with kernel scheduled threads, this simply means that the
    thread becomes runnable again, and will be resumed at some
    point; this is exactly analogous to the sort of state
    transitions a process goes through in a traditional Unix-style
    kernel when blocked on IO.

    Moreover, nothing prevents a program from, say, sharing a
    producer/consumer queue between threads where one extracts
    entries and performs IO on them while the other prepares IO
    operations to be performed by the worker. For that matter, one
    can have multiple IO threads pushing work into a queue that's
    executed by a pool of worker threads.

    POSIX threads are good to improve on computation concurrency, but they do
    not make I/O concurrency simpler, quite the opposite.

    The same might not be true for other kinds of threads.

    A nice property of POSIX threads is that, in _most_
    implementations, if you go off and initiate some blocking
    operation, such as performing (blocking) IO on a file descriptor
    of some sort, other runnable threads in the system can continue
    executing. Thus, it follows that you can have multiple IO
    operations in separate threads pending at one time. In that
    sense, one can leverage threads for IO concurrency (indeed, many
    programs do just that). Threads can block independently without
    impeding execution of the overall program.

    Of course, not all POSIX thread implementations are capable of
    doing this: consider a purely userspace "green" thread
    implementation; executing a single blocking system call blocks
    the whole program. In those, in many cases, blocking IO is
    emulated at the library level (which translates "normal" IO
    operations into their non-blocking counterparts) to give the
    illusion of sequential program flow; of course, the simulacrum
    is inexact at best, which is why most systems push thread
    management up into the kernel.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Tue Jan 7 14:05:41 2025
    On Tue, 7 Jan 2025 13:18:54 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vlip2c$24ccb$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>On Mon, 06 Jan 2025 16:46:56 GMT
    ITYF it is VERY widely shared and having a signal safe API function is only >>step 2 - plenty of the functions in the program itself or 3rd party library >>functions are probably not re-entrant safe and even if they are, having >>code stomp over itself - eg if in the middle of writing a log message then a >>signal is generated which tried to write a log message itself - is a very >>poor way to write code.

    So don't write code that way. It does not follow that the only
    thing you can do in a signal handler is an some atomic flag
    somewhere.

    Just because you can doesn't mean you should. C lets you do a lot of things that are a Bad Idea.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Muttley@DastardlyHQ.org on Tue Jan 7 13:18:54 2025
    In article <vlip2c$24ccb$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >On Mon, 06 Jan 2025 16:46:56 GMT
    scott@slp53.sl.home (Scott Lurndal) wibbled:
    Muttley@DastardlyHQ.org writes:
    On Mon, 06 Jan 2025 15:05:33 GMT
    scott@slp53.sl.home (Scott Lurndal) wibbled:
    Muttley@DastardlyHQ.org writes:
    In Windows yes, which frankly is probably not a coincidence. Not so much >>>>>in unix unless you're writing a GUI program.

    ASTs and unix signals have similar semantics. It's certainly possible to >>>>use, for example, SIGIO in a similar manner to the VMS AST, where the >>>>AST signals I/O completion and the AST handler initiates a subsequent >>>>operation.

    Unix signals should only be used to set flags that are then read later.

    You're opinion is not widely shared. Note that the POSIX specification >>carefully notes which interfaces are not signal-safe.

    ITYF it is VERY widely shared and having a signal safe API function is only >step 2 - plenty of the functions in the program itself or 3rd party library >functions are probably not re-entrant safe and even if they are, having
    code stomp over itself - eg if in the middle of writing a log message then a >signal is generated which tried to write a log message itself - is a very >poor way to write code.

    So don't write code that way. It does not follow that the only
    thing you can do in a signal handler is an some atomic flag
    somewhere.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Muttley@DastardlyHQ.org on Tue Jan 7 14:13:29 2025
    In article <vlioum$24bqm$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >On Mon, 6 Jan 2025 16:39:49 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vlgun1$1minf$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>>On Mon, 6 Jan 2025 15:22:51 -0000 (UTC)
    Multiplexing is not asychronous, its simply offloading status checking to >>>the kernel.

    Of course. It's a means to allow a program to respond to
    asynchronous events.

    Thats not the same as the program itself being asynch.

    Isn't it? The point is that the program kicks off multiple
    asynchronous operations; the issue comes when figuring out what
    to do when they complete. In general, there are only really two
    choices here: either poll their completion status, or expect to
    be notified by some kind of an event. In a POSIX-y environment, `poll`/`select` etc give you the former; signals give you the
    latter.

    The program using is still very much sequential , at least at
    that point.

    But the events are not. That's the point. This allows a
    program to initiate a non-blocking IO operation (like, say,
    establishing a TCP connection using the sockets API), go do
    something else, and check it's status later.

    Thats not proper asych, its still sequential. Proper asynch is when the >program execution path is directly modified by external events. Otherwise
    you could claim simply using the standard file I/O system is asynchronous >programming as there's no guarantee that any data has been written to the disk >before write(), fprintf() etc return.

    This is conflating multiple things. Most IO operations dealing
    with the actual hardware _are_ asynchronous (this is what
    McIlroy meant in the quote I posted earlier). The system call
    interface gives the program the illusion of those happening
    sequentially, but that's not how the devices really work.

    It turns out the simple model of early research Unix was
    insufficient for handling all sorts of important use cases,
    hence why interfaces like `select` and `poll` were added.

    Posix AIO is not asynch in the strict sense , its more "ok kernel, go do this
    and I'll check how you're doing later". Proper asynch where the program >>>execution path gets bounced around between various callbacks is something >>>else entirely.

    The POSIX AIO interface allows the kernel to generate a signal
    to inform the program that an IO operation has completed, e.g.,
    by setting up the `aio_sigevent` and `SIGEV_SIGNAL`. It doesn't
    get much more asynchronous than that.

    Sure, but as I've said before, signals should only set flags to be processed >later.

    You said that, but that flies in the face of 50 years of
    evidence to the contrary and the letter of the standard. This
    doesn't mean that you should do arbitrary amounts of work in a
    signal handler, but there's no reason that, say, one couldn't
    push an event onto a queue and signal a condition variable or
    something similar.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Muttley@DastardlyHQ.org on Tue Jan 7 14:14:38 2025
    In article <vljcbk$27v6l$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >On Tue, 7 Jan 2025 13:18:54 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vlip2c$24ccb$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>>On Mon, 06 Jan 2025 16:46:56 GMT
    ITYF it is VERY widely shared and having a signal safe API function is only >>>step 2 - plenty of the functions in the program itself or 3rd party library >>>functions are probably not re-entrant safe and even if they are, having >>>code stomp over itself - eg if in the middle of writing a log message then a >>>signal is generated which tried to write a log message itself - is a very >>>poor way to write code.

    So don't write code that way. It does not follow that the only
    thing you can do in a signal handler is an some atomic flag
    somewhere.

    Just because you can doesn't mean you should. C lets you do a lot of things >that are a Bad Idea.

    I have to ask at this point: have you ever written a concurrent
    program under Unix? One that used signals? For that matter,
    have you ever written a program that used `fork()` and caught a
    `SIGCHLD`?

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to Nicolas George on Tue Jan 7 14:59:48 2025
    Nicolas George <nicolas$george@salle-s.org> writes:
    Lawrence D'Oliveiro , dans le message <vli2lj$1t3lt$8@dont-email.me>, a
    Θcritá:
    Linux offers signalfd, so you can indeed use poll(2) in a thread to be
    woken up by any file descriptor, including a signal one (and that includes >> POSIX real-time signals).

    Proving my point that you need to use poll() even when doing threads.

    It "proves" no such thing.

    An I/O thread can coordinate other threads using
    posix condition variables, system V semaphores, pipes, etc.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Tue Jan 7 15:13:52 2025
    On Tue, 7 Jan 2025 14:14:38 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vljcbk$27v6l$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>On Tue, 7 Jan 2025 13:18:54 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vlip2c$24ccb$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>>>On Mon, 06 Jan 2025 16:46:56 GMT
    ITYF it is VERY widely shared and having a signal safe API function is only >>>>step 2 - plenty of the functions in the program itself or 3rd party library >>>>functions are probably not re-entrant safe and even if they are, having >>>>code stomp over itself - eg if in the middle of writing a log message then >a
    signal is generated which tried to write a log message itself - is a very >>>>poor way to write code.

    So don't write code that way. It does not follow that the only
    thing you can do in a signal handler is an some atomic flag
    somewhere.

    Just because you can doesn't mean you should. C lets you do a lot of things >>that are a Bad Idea.

    I have to ask at this point: have you ever written a concurrent
    program under Unix? One that used signals? For that matter,
    have you ever written a program that used `fork()` and caught a
    `SIGCHLD`?

    Is that supposed to be a serious question?

    The only thing that should ever be done in a child exit handler is a wait*()
    or set a flag.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Tue Jan 7 15:11:31 2025
    On Tue, 7 Jan 2025 14:13:29 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vlioum$24bqm$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>On Mon, 6 Jan 2025 16:39:49 -0000 (UTC)
    Thats not the same as the program itself being asynch.

    Isn't it? The point is that the program kicks off multiple

    Not, it isn't. Using operating system facilities is standard programming, its not asych programming whereby the program execution will be automatically
    be diverted when an operation completes.

    Thats not proper asych, its still sequential. Proper asynch is when the >>program execution path is directly modified by external events. Otherwise >>you could claim simply using the standard file I/O system is asynchronous >>programming as there's no guarantee that any data has been written to the >disk
    before write(), fprintf() etc return.

    This is conflating multiple things. Most IO operations dealing
    with the actual hardware _are_ asynchronous (this is what
    McIlroy meant in the quote I posted earlier). The system call
    interface gives the program the illusion of those happening
    sequentially, but that's not how the devices really work.

    And? By your definition its still asynchronous programming.

    Sure, but as I've said before, signals should only set flags to be processed >>later.

    You said that, but that flies in the face of 50 years of
    evidence to the contrary and the letter of the standard. This

    Please don't just make stuff up.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Muttley@DastardlyHQ.org on Tue Jan 7 15:35:44 2025
    In article <vljgbg$28o6f$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >On Tue, 7 Jan 2025 14:14:38 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vljcbk$27v6l$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>>On Tue, 7 Jan 2025 13:18:54 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vlip2c$24ccb$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote:
    On Mon, 06 Jan 2025 16:46:56 GMT
    ITYF it is VERY widely shared and having a signal safe API function is only
    step 2 - plenty of the functions in the program itself or 3rd party library
    functions are probably not re-entrant safe and even if they are, having >>>>>code stomp over itself - eg if in the middle of writing a log message then >>a
    signal is generated which tried to write a log message itself - is a very >>>>>poor way to write code.

    So don't write code that way. It does not follow that the only
    thing you can do in a signal handler is an some atomic flag
    somewhere.

    Just because you can doesn't mean you should. C lets you do a lot of things >>>that are a Bad Idea.

    I have to ask at this point: have you ever written a concurrent
    program under Unix? One that used signals? For that matter,
    have you ever written a program that used `fork()` and caught a
    `SIGCHLD`?

    Is that supposed to be a serious question?

    Yes.

    The only thing that should ever be done in a child exit handler is a wait*() >or set a flag.

    I think perhaps you should try to write some complex programs in
    the Unix environment before making such categorial statement.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to Dan Cross on Tue Jan 7 15:24:11 2025
    cross@spitfire.i.gajendra.net (Dan Cross) writes:
    In article <vlioum$24bqm$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote:

    Thats not proper asych, its still sequential. Proper asynch is when the >>program execution path is directly modified by external events. Otherwise >>you could claim simply using the standard file I/O system is asynchronous >>programming as there's no guarantee that any data has been written to the disk
    before write(), fprintf() etc return.

    This is conflating multiple things. Most IO operations dealing
    with the actual hardware _are_ asynchronous (this is what
    McIlroy meant in the quote I posted earlier). The system call
    interface gives the program the illusion of those happening
    sequentially, but that's not how the devices really work.

    Indeed, and it was subsequently recognized that more than
    the 'sync'[*] system call was required for applications to
    ensure data was successfully written to the underlying
    device.

    Applications in those days (e.g. fsck) would access the
    raw character device using the unbuffered read() and
    write() system calls rather than using stdio. A key
    characteristic of raw devices were that the hardware DMA would
    use the application buffer directly rather than copying
    the data to the kernel buffer pool first.

    [*] I recall using 'sync;sync;sync' from the Sixth Edition
    command line more than once, before rebooting.

    Subsequently APIs like fdatasync(2) and open flags
    such as O_DIRECT and O_DSYNC were added.


    It turns out the simple model of early research Unix was
    insufficient for handling all sorts of important use cases,
    hence why interfaces like `select` and `poll` were added.

    Although to be fair, select(2) originated with BSD and is
    a bit less flexible than poll(2).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Tue Jan 7 15:53:57 2025
    On Tue, 7 Jan 2025 15:35:44 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vljgbg$28o6f$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>On Tue, 7 Jan 2025 14:14:38 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vljcbk$27v6l$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>>>On Tue, 7 Jan 2025 13:18:54 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vlip2c$24ccb$1@dont-email.me>, <Muttley@DastardlyHQ.org> >wrote:
    On Mon, 06 Jan 2025 16:46:56 GMT
    ITYF it is VERY widely shared and having a signal safe API function is >only
    step 2 - plenty of the functions in the program itself or 3rd party >library
    functions are probably not re-entrant safe and even if they are, having >>>>>>code stomp over itself - eg if in the middle of writing a log message then

    a
    signal is generated which tried to write a log message itself - is a very >>>>>>poor way to write code.

    So don't write code that way. It does not follow that the only
    thing you can do in a signal handler is an some atomic flag >>>>>somewhere.

    Just because you can doesn't mean you should. C lets you do a lot of things >>>>that are a Bad Idea.

    I have to ask at this point: have you ever written a concurrent
    program under Unix? One that used signals? For that matter,
    have you ever written a program that used `fork()` and caught a >>>`SIGCHLD`?

    Is that supposed to be a serious question?

    Yes.

    The only thing that should ever be done in a child exit handler is a wait*() >>or set a flag.

    I think perhaps you should try to write some complex programs in
    the Unix environment before making such categorial statement.

    Don't be patronising. I've probably written more unix software in 30 years
    than you've had hot dinners including a fully featured telnetd and numerous other servers for work and play. And in the places I've worked which included finance/banking, aerospace and government, the advice was almost always NOT to use signals in the first place unless there was no choice - eg SIGCHLD - but if you did then do very little in the handler and nothing that could cause any re-entrancy issues.

    I suspect its you who needs a bit more practice at writing large multi process and multi threaded applications.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nicolas George@21:1/5 to All on Tue Jan 7 15:54:48 2025
    Dan Cross, dans le message <vljbvv$gl9$1@reader2.panix.com>, a Θcritá:
    This, however, does not follow. I don't see why "poll" is
    strictly required for IO concurrency.

    Well, try to do implement anything non-trivial involving I/O concurrency, including timeouts, clients causing other clients to abort, etc., with
    the common denominator of POSIX threads and come back telling us how you managed that.

    I tried, and stopped trying using threads for I/O concurrency.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Tue Jan 7 15:56:46 2025
    On 07 Jan 2025 15:54:48 GMT
    Nicolas George <nicolas$george@salle-s.org> wibbled:
    Dan Cross, dans le message <vljbvv$gl9$1@reader2.panix.com>, a Θcritá:
    This, however, does not follow. I don't see why "poll" is
    strictly required for IO concurrency.

    Well, try to do implement anything non-trivial involving I/O concurrency, >including timeouts, clients causing other clients to abort, etc., with
    the common denominator of POSIX threads and come back telling us how you >managed that.

    I tried, and stopped trying using threads for I/O concurrency.

    For some mad reason it seems to be the way to do it in Windows and also Java IIRC.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Muttley@DastardlyHQ.org on Tue Jan 7 16:02:51 2025
    In article <vljg72$28nj0$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >On Tue, 7 Jan 2025 14:13:29 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vlioum$24bqm$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>>On Mon, 6 Jan 2025 16:39:49 -0000 (UTC)
    Thats not the same as the program itself being asynch.

    Isn't it? The point is that the program kicks off multiple

    Not, it isn't. Using operating system facilities is standard programming, its >not asych programming whereby the program execution will be automatically
    be diverted when an operation completes.

    Thats not proper asych, its still sequential. Proper asynch is when the >>>program execution path is directly modified by external events. Otherwise >>>you could claim simply using the standard file I/O system is asynchronous >>>programming as there's no guarantee that any data has been written to the >>disk
    before write(), fprintf() etc return.

    This is conflating multiple things. Most IO operations dealing
    with the actual hardware _are_ asynchronous (this is what
    McIlroy meant in the quote I posted earlier). The system call
    interface gives the program the illusion of those happening
    sequentially, but that's not how the devices really work.

    And? By your definition its still asynchronous programming.

    In the kernel, it sure is. Unix programmers have been writing
    asynchronous programs (using e.g. `fork`) since 1970.

    Sure, but as I've said before, signals should only set flags to be processed >>>later.

    You said that, but that flies in the face of 50 years of
    evidence to the contrary and the letter of the standard. This

    Please don't just make stuff up.

    Hmm. I wonder what shell you use, if you use Unix at all.

    Here for example is the signal handler for SIGINT in bash: https://git.savannah.gnu.org/cgit/bash.git/tree/sig.c?h=devel#n691

    You'll notice that it's rather more complex than just "set a
    flag or `wait`.

    Here's the handler in `zsh`: https://github.com/zsh-users/zsh/blob/263659acb73d0222e641dfd8d37e48e96582de02/Src/signals.c#L399

    You'll again notice that it does rather more than just "set a
    flag or wait."

    Here's the SIGWINCH handler for good 'ol `script` from
    OpenBSD: https://github.com/openbsd/src/blob/6d253f95424ee0054c798f493d12377911cd3668/usr.bin/script/script.c#L224

    Wow, that one does ioctl's modifying PTY state and signals an
    entire process group. That's definitely a bit more than just
    "setting a flag or wait."

    Here's an example from Postgres: https://github.com/postgres/postgres/blob/5b291d1c9c09d75982c3270bfa61d4e822087b6a/src/backend/storage/ipc/latch.c#L2269

    Wow, that one writes to a pipe. Definitely a bit more than just
    "setting a flag or wait."

    Those are just a few examples. If one cares to look, one will
    find many more in non-trivial programs used in production daily.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Muttley@DastardlyHQ.org on Tue Jan 7 16:10:55 2025
    In article <vljiml$296n5$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >On Tue, 7 Jan 2025 15:35:44 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vljgbg$28o6f$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>>>[snip]

    I have to ask at this point: have you ever written a concurrent
    program under Unix? One that used signals? For that matter,
    have you ever written a program that used `fork()` and caught a >>>>`SIGCHLD`?

    Is that supposed to be a serious question?

    Yes.

    The only thing that should ever be done in a child exit handler is a wait*() >>>or set a flag.

    I think perhaps you should try to write some complex programs in
    the Unix environment before making such categorial statement.

    Don't be patronising.

    Wow, that's rich coming from you, my guy.

    I've probably written more unix software in 30 years
    than you've had hot dinners including a fully featured telnetd and numerous >other servers for work and play. And in the places I've worked which included >finance/banking, aerospace and government,

    "For play" implies things that could be, or are, open source.
    So post a link to code, then.

    Bluntly, I don't believe that any of this is true. Your posts
    here show a distinct lack of relevant experience and knowledge.

    the advice was almost always NOT to
    use signals in the first place unless there was no choice - eg SIGCHLD - but if
    you did then do very little in the handler and nothing that could cause any >re-entrancy issues.

    Earlier you said you should _only_ set a flag in a signal
    handler. Then you moved the goal posts to say that you could
    call `wait` (presumably after I posted that example). How
    you're just saying that you should do "very little that could
    cause any re-entrancy issues", which is something I more or
    less said a few posts ago, but again moving those pesky goal
    posts when it suits you.

    So which is it?

    I suspect its you who needs a bit more practice at writing large multi process >and multi threaded applications.

    *shrug* Feel free to look up some things that I've written, if
    you like. Perhaps you'll learn something.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rainer Weikusat@21:1/5 to Dan Cross on Tue Jan 7 16:13:41 2025
    cross@spitfire.i.gajendra.net (Dan Cross) writes:

    [...]

    there is no reason you cannot, say, have a signal handler that
    broadcasts on a condition variable after an asynchronous IO operation completes, thus waking up a thread.

    The pthread_cond_* calls are not async-signal safe and hence, this is
    either undefined behaviour (newly introduced with POSIX.1-2024) or
    undefined behaviour if the signal handler interrupted something that
    isn't async-signal safe (prior to POSIX.1-2024 and still retained in the current text).

    However, POSIX semaphores can safely be used for that.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to nicolas$george@salle-s.org on Tue Jan 7 16:17:15 2025
    In article <677d4e48$0$28053$426a74cc@news.free.fr>,
    Nicolas George <nicolas$george@salle-s.org> wrote:
    Dan Cross, dans le message <vljbvv$gl9$1@reader2.panix.com>, a Θcritá:
    This, however, does not follow. I don't see why "poll" is
    strictly required for IO concurrency.

    Well, try to do implement anything non-trivial involving I/O concurrency, >including timeouts, clients causing other clients to abort, etc., with
    the common denominator of POSIX threads and come back telling us how you >managed that.

    Well, this is rather more involved than what you'd originally
    said, which was just IO concurrency.

    But if you've got a dedicated IO thread with a known tid, I
    don't see why you couldn't do this with
    `pthread_cond_timedwait` and signals.

    But at this point, I'll gladly admit that `poll` et al may be
    more convenient, if not required.

    I tried, and stopped trying using threads for I/O concurrency.

    I'm not saying it's easy.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to rweikusat@talktalk.net on Tue Jan 7 17:01:09 2025
    In article <87ttaa7gay.fsf@doppelsaurus.mobileactivedefense.com>,
    Rainer Weikusat <rweikusat@talktalk.net> wrote:
    cross@spitfire.i.gajendra.net (Dan Cross) writes:

    [...]

    there is no reason you cannot, say, have a signal handler that
    broadcasts on a condition variable after an asynchronous IO operation
    completes, thus waking up a thread.

    The pthread_cond_* calls are not async-signal safe and hence, this is
    either undefined behaviour (newly introduced with POSIX.1-2024) or
    undefined behaviour if the signal handler interrupted something that
    isn't async-signal safe (prior to POSIX.1-2024 and still retained in the >current text).

    You are correct; I was wrong about condvars. From: https://pubs.opengroup.org/onlinepubs/9799919799/functions/pthread_cond_broadcast.html

    |It is not safe to use the pthread_cond_signal() function in a
    |signal handler that is invoked asynchronously. Even if it were
    |safe, there would still be a race between the test of the
    |Boolean pthread_cond_wait() that could not be efficiently
    |eliminated.
    |
    |Mutexes and condition variables are thus not suitable for
    |releasing a waiting thread by signaling from code running in a
    |signal handler.

    (Curiously they make no mention of `pthread_cond_broadcast`
    here; I suppose the same rationale applies.)

    However, POSIX semaphores can safely be used for that.

    Another mechanism might be to have a thread blocked in `sigwait`
    or `sigtimedwait` and use `pthread_kill` to signal it.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Tue Jan 7 16:56:38 2025
    On Tue, 7 Jan 2025 16:02:51 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vljg72$28nj0$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>On Tue, 7 Jan 2025 14:13:29 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    This is conflating multiple things. Most IO operations dealing
    with the actual hardware _are_ asynchronous (this is what
    McIlroy meant in the quote I posted earlier). The system call
    interface gives the program the illusion of those happening
    sequentially, but that's not how the devices really work.

    And? By your definition its still asynchronous programming.

    In the kernel, it sure is. Unix programmers have been writing
    asynchronous programs (using e.g. `fork`) since 1970.

    Thats not what we're discussion here and you know it.

    Please don't just make stuff up.

    Hmm. I wonder what shell you use, if you use Unix at all.

    Stupid comments really are your forte arn't they.

    Here for example is the signal handler for SIGINT in bash: >https://git.savannah.gnu.org/cgit/bash.git/tree/sig.c?h=devel#n691

    Basically sets flags.

    Here's the SIGWINCH handler for good 'ol `script` from
    OpenBSD: >https://github.com/openbsd/src/blob/6d253f95424ee0054c798f493d12377911cd3668/us
    r.bin/script/script.c#L224

    Not a clever way to do it because an xterm and other terminal progs can indirectly cause a whole load of SIGWINCH to be created if someone is resizing it and only the final one really needs the ioctl call done. Better to set a flag then manually do a call when appropriate.

    Those are just a few examples. If one cares to look, one will
    find many more in non-trivial programs used in production daily.

    There are always exceptions to every rule. You seem to be so desperate to
    win this argument I can only assume your fragile ego has been burst by
    someone having the temerity to disagree with you. Tough, suck it up.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Tue Jan 7 17:01:49 2025
    On Tue, 7 Jan 2025 16:10:55 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vljiml$296n5$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>On Tue, 7 Jan 2025 15:35:44 -0000 (UTC)
    I think perhaps you should try to write some complex programs in
    the Unix environment before making such categorial statement.

    Don't be patronising.

    Wow, that's rich coming from you, my guy.

    "My guy?" LOL, how old are you, 12? :)

    I've probably written more unix software in 30 years
    than you've had hot dinners including a fully featured telnetd and numerous >>other servers for work and play. And in the places I've worked which included >>finance/banking, aerospace and government,

    "For play" implies things that could be, or are, open source.
    So post a link to code, then.

    Nope, I like my relative anonymity here and I don't need to prove anything to some twat with a chip on his shoulder getting worked up over technical trivia.

    Bluntly, I don't believe that any of this is true. Your posts

    Believe what you like, I couldn't give a rats arse.

    here show a distinct lack of relevant experience and knowledge.

    Whatever you say genius.

    *shrug* Feel free to look up some things that I've written, if
    you like. Perhaps you'll learn something.

    Is this yours?

    https://github.com/dancrossnyc

    Am I supposed to be impressed?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kenny McCormack@21:1/5 to Dan Cross on Tue Jan 7 17:16:29 2025
    In article <vljjmf$g76$2@reader2.panix.com>,
    Dan Cross <cross@spitfire.i.gajendra.net> wrote:
    ...
    "For play" implies things that could be, or are, open source.
    So post a link to code, then.

    Bluntly, I don't believe that any of this is true. Your posts
    here show a distinct lack of relevant experience and knowledge.

    Or dementia. Lot of that going around in the world today.

    Many Usenet posters fall into this category. They may have been smart/accomplished once upon a time, but that was years/decades ago, and
    now they're just living on memories.

    Seriously, I've seen a lot of this over the years, and we should cut this
    guy some slack.

    --
    After 4 years of disastrous screwups, Trump now favors 3 policies that I support:
    1) $2K/pp stimulus money. Who doesn't want more money?
    2) Water pressure. My shower doesn't work very well; I want Donnie to come fix it.
    3) Repeal of Section 230. This will lead to the demise of Face/Twit/Gram. Yey!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Muttley@DastardlyHQ.org on Tue Jan 7 17:23:01 2025
    In article <vljmlt$29vt3$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >On Tue, 7 Jan 2025 16:10:55 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vljiml$296n5$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>>On Tue, 7 Jan 2025 15:35:44 -0000 (UTC)
    I think perhaps you should try to write some complex programs in
    the Unix environment before making such categorial statement.

    Don't be patronising.

    Wow, that's rich coming from you, my guy.

    "My guy?" LOL, how old are you, 12? :)

    I've probably written more unix software in 30 years
    than you've had hot dinners including a fully featured telnetd and numerous >>>other servers for work and play. And in the places I've worked which included
    finance/banking, aerospace and government,

    "For play" implies things that could be, or are, open source.
    So post a link to code, then.

    Nope, I like my relative anonymity here and I don't need to prove anything to >some twat with a chip on his shoulder getting worked up over technical trivia.

    Ok. So we're just supposed to take your word for it, I guess.
    Got it.

    Bluntly, I don't believe that any of this is true. Your posts

    Believe what you like, I couldn't give a rats arse.

    You also have no evidence to back up your claims, it seems.

    here show a distinct lack of relevant experience and knowledge.

    Whatever you say genius.

    *shrug* Feel free to look up some things that I've written, if
    you like. Perhaps you'll learn something.

    Is this yours?

    https://github.com/dancrossnyc

    Yup, that's me.

    Am I supposed to be impressed?

    *shrug* I think my credentials speak for themselves. I really
    don't care whether you're impressed or not.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Scott Lurndal on Tue Jan 7 17:31:37 2025
    In article <vGbfP.54357$XfF8.7280@fx04.iad>,
    Scott Lurndal <slp53@pacbell.net> wrote:
    cross@spitfire.i.gajendra.net (Dan Cross) writes:
    In article <vlioum$24bqm$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote:

    Thats not proper asych, its still sequential. Proper asynch is when the >>>program execution path is directly modified by external events. Otherwise >>>you could claim simply using the standard file I/O system is asynchronous >>>programming as there's no guarantee that any data has been written to the disk
    before write(), fprintf() etc return.

    This is conflating multiple things. Most IO operations dealing
    with the actual hardware _are_ asynchronous (this is what
    McIlroy meant in the quote I posted earlier). The system call
    interface gives the program the illusion of those happening
    sequentially, but that's not how the devices really work.

    Indeed, and it was subsequently recognized that more than
    the 'sync'[*] system call was required for applications to
    ensure data was successfully written to the underlying
    device.

    Yup.

    Applications in those days (e.g. fsck) would access the
    raw character device using the unbuffered read() and
    write() system calls rather than using stdio. A key
    characteristic of raw devices were that the hardware DMA would
    use the application buffer directly rather than copying
    the data to the kernel buffer pool first.

    They still do!

    [*] I recall using 'sync;sync;sync' from the Sixth Edition
    command line more than once, before rebooting.


    I've always felt the triple-sync thing was kind of superstition.

    But this makes some sense when one considers that a sync would
    trigger additional IO requests that would be scheduled, but
    not necessarily completed.

    Still, once disk drivers started optimizing write order and
    thus divorcing ordering of requests to the device from the
    chronological order the requests arrived in, all bets were out
    the window.

    Subsequently APIs like fdatasync(2) and open flags
    such as O_DIRECT and O_DSYNC were added.

    It turns out the simple model of early research Unix was
    insufficient for handling all sorts of important use cases,
    hence why interfaces like `select` and `poll` were added.

    Although to be fair, select(2) originated with BSD and is
    a bit less flexible than poll(2).

    This is fair.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Muttley@DastardlyHQ.org on Tue Jan 7 17:19:56 2025
    In article <vljmc6$29tkd$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >On Tue, 7 Jan 2025 16:02:51 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vljg72$28nj0$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>>On Tue, 7 Jan 2025 14:13:29 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    This is conflating multiple things. Most IO operations dealing
    with the actual hardware _are_ asynchronous (this is what
    McIlroy meant in the quote I posted earlier). The system call >>>>interface gives the program the illusion of those happening >>>>sequentially, but that's not how the devices really work.

    And? By your definition its still asynchronous programming.

    In the kernel, it sure is. Unix programmers have been writing
    asynchronous programs (using e.g. `fork`) since 1970.

    Thats not what we're discussion here and you know it.

    Actually, it is.

    Please don't just make stuff up.

    Hmm. I wonder what shell you use, if you use Unix at all.

    Stupid comments really are your forte arn't they.

    I see that you can't support your argument.

    Here for example is the signal handler for SIGINT in bash: >>https://git.savannah.gnu.org/cgit/bash.git/tree/sig.c?h=devel#n691

    Basically sets flags.

    Did you actually read and understand any of that code?

    Here's the SIGWINCH handler for good 'ol `script` from
    OpenBSD: >>https://github.com/openbsd/src/blob/6d253f95424ee0054c798f493d12377911cd3668/us
    r.bin/script/script.c#L224

    Not a clever way to do it because an xterm and other terminal progs can >indirectly cause a whole load of SIGWINCH to be created if someone is resizing >it and only the final one really needs the ioctl call done. Better to set a >flag then manually do a call when appropriate.

    Ok. You may even be right! But tell me: where would you check
    those flags?

    Regardless, here you are, again, moving the goalposts in the
    face of evidence that contradicted your earlier position.

    Those are just a few examples. If one cares to look, one will
    find many more in non-trivial programs used in production daily.

    There are always exceptions to every rule. You seem to be so desperate to
    win this argument I can only assume your fragile ego has been burst by >someone having the temerity to disagree with you. Tough, suck it up.

    Ah, here we go. The classic attempt at an insult.

    Look, you made categorical, definitive statements. Those
    statements were factually incorrect. I pointed that out. You
    seem to be pretty upset about that and want to argument the
    point, no matter how much evidence to the contrary you are
    presented with.

    Perhaps I am not the one with the fragile ego that needs to suck
    it up when disagreed with.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Kenny McCormack on Tue Jan 7 17:40:18 2025
    In article <vljnhd$2mih3$1@news.xmission.com>,
    Kenny McCormack <gazelle@shell.xmission.com> wrote:
    In article <vljjmf$g76$2@reader2.panix.com>,
    Dan Cross <cross@spitfire.i.gajendra.net> wrote:
    ...
    "For play" implies things that could be, or are, open source.
    So post a link to code, then.

    Bluntly, I don't believe that any of this is true. Your posts
    here show a distinct lack of relevant experience and knowledge.

    Or dementia. Lot of that going around in the world today.

    Many Usenet posters fall into this category. They may have been >smart/accomplished once upon a time, but that was years/decades ago, and
    now they're just living on memories.

    Seriously, I've seen a lot of this over the years, and we should cut this
    guy some slack.

    A lot of USENET folks talk the talk without ever having walked
    the walk, but you could be right.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to Dan Cross on Tue Jan 7 19:09:53 2025
    cross@spitfire.i.gajendra.net (Dan Cross) writes:
    In article <vGbfP.54357$XfF8.7280@fx04.iad>,
    Scott Lurndal <slp53@pacbell.net> wrote:
    cross@spitfire.i.gajendra.net (Dan Cross) writes:
    In article <vlioum$24bqm$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote:

    Applications in those days (e.g. fsck) would access the
    raw character device using the unbuffered read() and
    write() system calls rather than using stdio. A key
    characteristic of raw devices were that the hardware DMA would
    use the application buffer directly rather than copying
    the data to the kernel buffer pool first.

    They still do!

    Well, not on linux. Even O_DIRECT still goes through
    the file cache, last I checked.

    I submitted a 'raw device' patch to the linux mailing
    list in the late 90s while at SGI. It wasn't accepted because
    O_DIRECT was considered sufficient, even with the spurious
    copy. The overhead of pinning the user space pages was
    considered onerous.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Muttley on Wed Jan 8 02:36:01 2025
    On Tue, 7 Jan 2025 15:56:46 -0000 (UTC), Muttley wrote:

    On 07 Jan 2025 15:54:48 GMT Nicolas George <nicolas$george@salle-s.org> wibbled:

    I tried, and stopped trying using threads for I/O concurrency.

    For some mad reason it seems to be the way to do it in Windows and also
    Java IIRC.

    Remember the era: it was the 1990s, when threads were still a new thing to
    PC OSes, and they were considered the best way to do everything involving nondeterminism, including GUIs.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Nicolas George on Wed Jan 8 02:36:56 2025
    On 07 Jan 2025 08:59:28 GMT, Nicolas George wrote:

    Lawrence D'Oliveiro , dans le message <vli2lj$1t3lt$8@dont-email.me>, a
    écrit :

    Linux offers signalfd, so you can indeed use poll(2) in a thread to be
    woken up by any file descriptor, including a signal one (and that
    includes POSIX real-time signals).

    Proving my point that you need to use poll() even when doing threads.

    But you said “it is not possible to poll() on a thread condition”, when it fact such usage is commonplace, as I pointed out.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to Lawrence D'Oliveiro on Wed Jan 8 03:23:13 2025
    Lawrence D'Oliveiro <ldo@nz.invalid> writes:
    On 07 Jan 2025 08:59:28 GMT, Nicolas George wrote:

    Lawrence D'Oliveiro , dans le message <vli2lj$1t3lt$8@dont-email.me>, a
    écrit :

    Linux offers signalfd, so you can indeed use poll(2) in a thread to be
    woken up by any file descriptor, including a signal one (and that
    includes POSIX real-time signals).

    Proving my point that you need to use poll() even when doing threads.

    But you said “it is not possible to poll() on a thread condition”, when it >fact such usage is commonplace, as I pointed out.

    It is perfectly possible to poll() on a thread condition. See pipe(2).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nicolas George@21:1/5 to All on Wed Jan 8 07:52:24 2025
    Scott Lurndal, dans le message <BcmfP.289889$aTp4.50420@fx09.iad>, a
    Θcritá:
    It is perfectly possible to poll() on a thread condition. See pipe(2).

    It is possible to write code to wake a thread blocked in poll(). I have not tried to deny this. It is not possible to poll() directly on a thread condition. You have not disproved that.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Wed Jan 8 08:23:49 2025
    On Tue, 7 Jan 2025 17:23:01 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vljmlt$29vt3$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>On Tue, 7 Jan 2025 16:10:55 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    Nope, I like my relative anonymity here and I don't need to prove anything to >>some twat with a chip on his shoulder getting worked up over technical trivia.


    Ok. So we're just supposed to take your word for it, I guess.
    Got it.

    In one.

    Believe what you like, I couldn't give a rats arse.

    You also have no evidence to back up your claims, it seems.

    Plenty of evidence out there.

    Am I supposed to be impressed?

    *shrug* I think my credentials speak for themselves. I really
    don't care whether you're impressed or not.

    What credentials? You work for some neverheardofit software house and have mostly done a load of forks of other peoples code. Standard dev stuff, nothing special.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Wed Jan 8 08:27:45 2025
    On Wed, 8 Jan 2025 02:36:01 -0000 (UTC)
    Lawrence D'Oliveiro <ldo@nz.invalid> wibbled:
    On Tue, 7 Jan 2025 15:56:46 -0000 (UTC), Muttley wrote:

    On 07 Jan 2025 15:54:48 GMT Nicolas George <nicolas$george@salle-s.org>
    wibbled:

    I tried, and stopped trying using threads for I/O concurrency.

    For some mad reason it seems to be the way to do it in Windows and also
    Java IIRC.

    Remember the era: it was the 1990s, when threads were still a new thing to
    PC OSes, and they were considered the best way to do everything involving >nondeterminism, including GUIs.

    Unfortunately there are still far to many programmers around for whom threads are their go to hammer no matter what problem they're trying to solve.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Wed Jan 8 08:26:06 2025
    On Tue, 07 Jan 2025 19:09:53 GMT
    scott@slp53.sl.home (Scott Lurndal) wibbled:
    cross@spitfire.i.gajendra.net (Dan Cross) writes:
    In article <vGbfP.54357$XfF8.7280@fx04.iad>,
    Scott Lurndal <slp53@pacbell.net> wrote:
    cross@spitfire.i.gajendra.net (Dan Cross) writes:
    In article <vlioum$24bqm$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote:


    Applications in those days (e.g. fsck) would access the
    raw character device using the unbuffered read() and
    write() system calls rather than using stdio. A key
    characteristic of raw devices were that the hardware DMA would
    use the application buffer directly rather than copying
    the data to the kernel buffer pool first.

    They still do!

    Well, not on linux. Even O_DIRECT still goes through
    the file cache, last I checked.

    I submitted a 'raw device' patch to the linux mailing
    list in the late 90s while at SGI. It wasn't accepted because
    O_DIRECT was considered sufficient, even with the spurious
    copy. The overhead of pinning the user space pages was
    considered onerous.

    I vaguely remember Oracle complaining about this back in the day meaning
    they couldn't guarantee their RDBMS transaction writes on Linux. Not sure
    if or when it was solved.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Wed Jan 8 08:20:42 2025
    On Tue, 7 Jan 2025 17:19:56 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vljmc6$29tkd$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>On Tue, 7 Jan 2025 16:02:51 -0000 (UTC)
    In the kernel, it sure is. Unix programmers have been writing >>>asynchronous programs (using e.g. `fork`) since 1970.

    Thats not what we're discussion here and you know it.

    Actually, it is.

    Ah ok, goalposts moved. Why not some straw men while you're at it?

    https://git.savannah.gnu.org/cgit/bash.git/tree/sig.c?h=devel#n691

    Basically sets flags.

    Did you actually read and understand any of that code?

    Did you?


    Not a clever way to do it because an xterm and other terminal progs can >>indirectly cause a whole load of SIGWINCH to be created if someone is >resizing
    it and only the final one really needs the ioctl call done. Better to set a >>flag then manually do a call when appropriate.

    Ok. You may even be right! But tell me: where would you check
    those flags?

    Presuably a genius like you would know most terminal programs have a seperate thread or a multiplex timeout in order to flash the cursor. You work out
    the rest.

    Regardless, here you are, again, moving the goalposts in the
    face of evidence that contradicted your earlier position.

    Irony, love it.

    There are always exceptions to every rule. You seem to be so desperate to >>win this argument I can only assume your fragile ego has been burst by >>someone having the temerity to disagree with you. Tough, suck it up.

    Ah, here we go. The classic attempt at an insult.

    If the shoe fits.

    Look, you made categorical, definitive statements. Those
    statements were factually incorrect. I pointed that out. You

    No, I stated the majority approach to using signals. You disagree which is fine, but don't pretent your view is THE view, it isn't.

    Perhaps I am not the one with the fragile ego that needs to suck
    it up when disagreed with.

    Ego size on usenet is almost always correlated with the verbiage of a reply.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to nicolas$george@salle-s.org on Wed Jan 8 12:21:59 2025
    In article <677e2eb8$0$375$426a34cc@news.free.fr>,
    Nicolas George <nicolas$george@salle-s.org> wrote:
    Scott Lurndal, dans le message <BcmfP.289889$aTp4.50420@fx09.iad>, a
    Θcritá:
    It is perfectly possible to poll() on a thread condition. See pipe(2).

    It is possible to write code to wake a thread blocked in poll(). I have not >tried to deny this. It is not possible to poll() directly on a thread >condition. You have not disproved that.

    I think it's important to define what you mean when you write,
    "thread condition." What, exactly, is that? Perhaps you mean
    a condition variable? If so, that's true, but I fail to see
    the relevance: people write multithreaded code that does IO in
    multiple all the time; there are some techniques that are common
    for this (Scott alluded to the so-called "pipe trick", due to
    Bernstein) and some that are less common. It may be harder or
    easier depending on which techniques you employ, but it's all
    doable.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Muttley@DastardlyHQ.org on Wed Jan 8 12:19:13 2025
    In article <vllcml$2mqb8$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >On Tue, 7 Jan 2025 17:23:01 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vljmlt$29vt3$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>>On Tue, 7 Jan 2025 16:10:55 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    Nope, I like my relative anonymity here and I don't need to prove anything to
    some twat with a chip on his shoulder getting worked up over technical trivia.


    Ok. So we're just supposed to take your word for it, I guess.
    Got it.

    In one.

    Believe what you like, I couldn't give a rats arse.

    You also have no evidence to back up your claims, it seems.

    Plenty of evidence out there.

    Plenty of contradictory evidence, you mean.

    Am I supposed to be impressed?

    *shrug* I think my credentials speak for themselves. I really
    don't care whether you're impressed or not.

    What credentials? You work for some neverheardofit software house and have >mostly done a load of forks of other peoples code. Standard dev stuff, nothing >special.

    Yeah, ok, sure.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Muttley@DastardlyHQ.org on Wed Jan 8 13:00:01 2025
    In article <vllcgq$2mphu$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >On Tue, 7 Jan 2025 17:19:56 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vljmc6$29tkd$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>>On Tue, 7 Jan 2025 16:02:51 -0000 (UTC)
    In the kernel, it sure is. Unix programmers have been writing >>>>asynchronous programs (using e.g. `fork`) since 1970.

    Thats not what we're discussion here and you know it.

    Actually, it is.

    Ah ok, goalposts moved. Why not some straw men while you're at it?

    https://git.savannah.gnu.org/cgit/bash.git/tree/sig.c?h=devel#n691

    Basically sets flags.

    Did you actually read and understand any of that code?

    Did you?

    Yes. I see that the call chains invoked from that handler wind
    up calling things like `malloc`. I guess you couldn't read the
    code well enough to see that for yourself.

    Not a clever way to do it because an xterm and other terminal progs can >>>indirectly cause a whole load of SIGWINCH to be created if someone is >>resizing
    it and only the final one really needs the ioctl call done. Better to set a >>>flag then manually do a call when appropriate.

    Ok. You may even be right! But tell me: where would you check
    those flags?

    Presuably a genius like you would know most terminal programs have a seperate >thread or a multiplex timeout in order to flash the cursor. You work out
    the rest.

    Right, handwave away those very real concerns. We're talking
    about Unix here, not code running on some microcontroller; code
    might be sitting in some tight loop doing computation for
    arbitrarily long.

    Regardless, here you are, again, moving the goalposts in the
    face of evidence that contradicted your earlier position.

    Irony, love it.

    There are always exceptions to every rule. You seem to be so desperate to >>>win this argument I can only assume your fragile ego has been burst by >>>someone having the temerity to disagree with you. Tough, suck it up.

    Ah, here we go. The classic attempt at an insult.

    If the shoe fits.

    Look, you made categorical, definitive statements. Those
    statements were factually incorrect. I pointed that out. You

    No, I stated the majority approach to using signals. You disagree which is >fine, but don't pretent your view is THE view, it isn't.

    Bluntly, I don't see any evidence that you are qualified enough
    to make any statement regarding the "majority approach" to,
    well, just about anything related to the domain, let alone the
    industry writ large. On the other hand, despite you assuring us
    that we should just take your word for it that you're some kind
    of expert, I see plenty of evidence in the form of factually
    incorrect statements to conclude that you don't know what you're
    about generally.

    In other words, no, I'm not just taking your word for it, but
    instead trusting the evidence before me.

    Perhaps I am not the one with the fragile ego that needs to suck
    it up when disagreed with.

    Ego size on usenet is almost always correlated with the verbiage of a reply.

    I'm not the one who started with dishing out insults at the
    first person who disagreed with me.

    Feel free to have the last word, but absent some actually
    technical point, I'm done with you.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Wed Jan 8 13:36:50 2025
    On Wed, 8 Jan 2025 12:19:13 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vllcml$2mqb8$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>On Tue, 7 Jan 2025 17:23:01 -0000 (UTC)
    You also have no evidence to back up your claims, it seems.

    Plenty of evidence out there.

    Plenty of contradictory evidence, you mean.

    Probably for both methods.

    What credentials? You work for some neverheardofit software house and have >>mostly done a load of forks of other peoples code. Standard dev stuff, nothing

    special.

    Yeah, ok, sure.

    Hacking other peoples code doesn't impress me. They've done all the hard work.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nicolas George@21:1/5 to All on Wed Jan 8 14:01:07 2025
    Dan Cross, dans le message <vllql7$sn6$2@reader2.panix.com>, a écrit :
    I think it's important to define what you mean when you write,
    "thread condition." What, exactly, is that? Perhaps you mean
    a condition variable?

    Yes, of course that is what “thread condition” means in the context of a discussion about POSIX threads.

    If so, that's true, but I fail to see
    the relevance: people write multithreaded code that does IO in
    multiple all the time; there are some techniques that are common
    for this (Scott alluded to the so-called "pipe trick", due to
    Bernstein) and some that are less common.

    Yes: there are some techniques that are common to implement I/O concurrency
    and that work in the context of threads. You are arguing my point for me:
    the threads did not make implementing the I/O concurrency simpler; quite the opposite it they made them harder, as proven by the fact that “techniques” had to be deployed.

    POSIX threads do not make I/O concurrency easier, they are not made for
    that, they are for performance.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Wed Jan 8 13:40:40 2025
    On Wed, 8 Jan 2025 13:00:01 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vllcgq$2mphu$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>On Tue, 7 Jan 2025 17:19:56 -0000 (UTC)
    Presuably a genius like you would know most terminal programs have a seperate >>thread or a multiplex timeout in order to flash the cursor. You work out >>the rest.

    Right, handwave away those very real concerns. We're talking
    about Unix here, not code running on some microcontroller; code

    Oops, awkward fact avoided eh? :)

    And you don't think microcontrollers can run linux with X on top?

    No, I stated the majority approach to using signals. You disagree which is >>fine, but don't pretent your view is THE view, it isn't.

    Bluntly, I don't see any evidence that you are qualified enough
    to make any statement regarding the "majority approach" to,

    I don't need to prove myself to argue with some random troll on a newsgroup.
    If you can't handle that thats your problem, not mine.

    Ego size on usenet is almost always correlated with the verbiage of a reply.

    I'm not the one who started with dishing out insults at the
    first person who disagreed with me.

    Define insult. However here's one: you're clearly a thin skinned snowflake.

    Feel free to have the last word, but absent some actually
    technical point, I'm done with you.

    Suits me mate.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Wed Jan 8 15:05:20 2025
    On 08 Jan 2025 14:01:07 GMT
    Nicolas George <nicolas$george@salle-s.org> wibbled:
    Dan Cross, dans le message <vllql7$sn6$2@reader2.panix.com>, a écrit :
    I think it's important to define what you mean when you write,
    "thread condition." What, exactly, is that? Perhaps you mean
    a condition variable?

    Yes, of course that is what “thread condition” means in the context of a >discussion about POSIX threads.

    No, they're called condition variables, not thread conditions which implies something rather different. Surely an experienced genius like you would know that.

    POSIX threads do not make I/O concurrency easier, they are not made for
    that, they are for performance.

    Not really. They're made for multitasking in situations where multiplexing would be too complicated or impossible and multiprocess would be overkill or too resource intensive. On a single core CPU using threads could actually slow a program down compared to using a single thread.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to nicolas$george@salle-s.org on Wed Jan 8 14:41:22 2025
    In article <677e8523$0$28061$426a34cc@news.free.fr>,
    Nicolas George <nicolas$george@salle-s.org> wrote:
    Dan Cross, dans le message <vllql7$sn6$2@reader2.panix.com>, a écrit :
    I think it's important to define what you mean when you write,
    "thread condition." What, exactly, is that? Perhaps you mean
    a condition variable?

    Yes, of course that is what “thread condition” means in the context of a >discussion about POSIX threads.

    Not really. A condition variable is a synchronization
    primitive; it is not inherently an attribute of a thread. When
    one phrases it as "thread condition" one gives the impression
    that one is talking about some aspect of the thread itself, such
    as its state, or the "condition" that it is in, in a similar way
    that one might talk about the condition of a patient in a
    doctor's office.

    As always, in computing, it's better to be precise.

    If so, that's true, but I fail to see
    the relevance: people write multithreaded code that does IO in
    multiple all the time; there are some techniques that are common
    for this (Scott alluded to the so-called "pipe trick", due to
    Bernstein) and some that are less common.

    Yes: there are some techniques that are common to implement I/O concurrency >and that work in the context of threads. You are arguing my point for me:
    the threads did not make implementing the I/O concurrency simpler; quite the >opposite it they made them harder, as proven by the fact that “techniques” >had to be deployed.

    That's a silly argument. "Techniques" had to be developed for
    literally all of this stuff.

    Moreover, things like the self pipe trick are independent of
    threads. That's a "technique" for avoiding races between signal
    delivery and "select" etc. That it can be usefully employed in
    a threaded context doesn't say much either for or against
    threads.

    POSIX threads do not make I/O concurrency easier, they are not made for
    that, they are for performance.

    This is a specious statement that is not backed up by evidence
    and is trivially false (two threads can execute blocking "write"
    calls on two file descriptors concurrently).

    The assertion that POSIX threads are for "performance" deserves
    some citation. POSIX threads might enable one to write parallel
    code, thus facilitating higher performance than single-threaded
    code, or they might not, depending on the implementation and the
    host computer (e.g., if executed on a uniprocessor machine).

    Fundamentally, threads are about having multiple control flows
    that execute concurrently in a single address space. That's it,
    really.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to Muttley@DastardlyHQ.org on Wed Jan 8 16:05:13 2025
    Muttley@DastardlyHQ.org writes:
    On Wed, 8 Jan 2025 13:00:01 -0000 (UTC)


    I don't need to prove myself to argue with some random troll on a newsgroup. >If you can't handle that thats your problem, not mine.

    Look in the mirror, nameless troll.

    Dan is well known and respected in the Unix world. You, not so much.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tim Rentsch@21:1/5 to Scott Lurndal on Wed Jan 8 09:55:28 2025
    scott@slp53.sl.home (Scott Lurndal) writes:

    Muttley@DastardlyHQ.org writes:

    On Wed, 8 Jan 2025 13:00:01 -0000 (UTC)
    [...]
    I don't need to prove myself to argue with some random troll on a
    newsgroup. If you can't handle that thats your problem, not mine.

    Look in the mirror, nameless troll. [...]

    If you wouldn't mind a question, I'm wondering why you continue
    to take the bait.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Scott Lurndal on Wed Jan 8 18:38:27 2025
    In article <ZmxfP.284330$Uup4.225209@fx10.iad>,
    Scott Lurndal <slp53@pacbell.net> wrote:
    Dan is well known and respected in the Unix world. You, not so much.

    Thank you, Scott.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to Muttley@DastardlyHQ.org on Wed Jan 8 20:27:54 2025
    On 2025-01-08, Muttley@DastardlyHQ.org <Muttley@DastardlyHQ.org> wrote:
    I don't need to prove myself to argue with some random troll on a newsgroup. If you can't handle that thats your problem, not mine.

    I have to say, that's pretty tone deaf, as a reply to Dan Cross.

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @Kazinator@mstdn.ca

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Muttley on Thu Jan 9 04:39:35 2025
    On Wed, 8 Jan 2025 08:26:06 -0000 (UTC), Muttley wrote:

    I vaguely remember Oracle complaining about this back in the day meaning
    they couldn't guarantee their RDBMS transaction writes on Linux.

    Blame the hard drive vendors for putting stupid caches on their drives.
    It’s not a Linux-specific problem.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Wed Jan 15 16:47:38 2025
    On Wed, 8 Jan 2025 20:27:54 -0000 (UTC)
    Kaz Kylheku <643-408-1753@kylheku.com> wibbled:
    On 2025-01-08, Muttley@DastardlyHQ.org <Muttley@DastardlyHQ.org> wrote:
    I don't need to prove myself to argue with some random troll on a newsgroup. >> If you can't handle that thats your problem, not mine.

    I have to say, that's pretty tone deaf, as a reply to Dan Cross.

    Sorry if I don't hero worship like you. If I think someone's talking bollocks then I'll call it out.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Wed Jan 15 16:46:39 2025
    On Wed, 08 Jan 2025 16:05:13 GMT
    scott@slp53.sl.home (Scott Lurndal) wibbled:
    Muttley@DastardlyHQ.org writes:
    On Wed, 8 Jan 2025 13:00:01 -0000 (UTC)


    I don't need to prove myself to argue with some random troll on a newsgroup. >>If you can't handle that thats your problem, not mine.

    Look in the mirror, nameless troll.

    The usual "i don't agree with you so you must be a troll" attitude.


    Dan is well known and respected in the Unix world. You, not so much.

    Is he? Never heard of him until recently. What exactly has he done thats
    so impressive? His github certainly gives no clue. Lots of forks of other peoples stuff. BFD.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to Muttley@DastardlyHQ.org on Wed Jan 15 20:27:41 2025
    On 2025-01-15, Muttley@DastardlyHQ.org <Muttley@DastardlyHQ.org> wrote:
    On Wed, 8 Jan 2025 20:27:54 -0000 (UTC)
    Kaz Kylheku <643-408-1753@kylheku.com> wibbled:
    On 2025-01-08, Muttley@DastardlyHQ.org <Muttley@DastardlyHQ.org> wrote:
    I don't need to prove myself to argue with some random troll on a newsgroup.
    If you can't handle that thats your problem, not mine.

    I have to say, that's pretty tone deaf, as a reply to Dan Cross.

    Sorry if I don't hero worship like you. If I think someone's talking bollocks then I'll call it out.

    Glad you understand the concept.

    Dan Cross being a random troll in a newsgroup is an example of bollocks,
    and it's being called out.

    Even if Dan happened to be caught talking bollocks, it still wouldn't
    make him a troll, or random. It's simply not factual or rational.

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @Kazinator@mstdn.ca

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to Muttley@DastardlyHQ.org on Wed Jan 15 20:20:44 2025
    On 2025-01-15, Muttley@DastardlyHQ.org <Muttley@DastardlyHQ.org> wrote:
    The usual "i don't agree with you so you must be a troll" attitude.

    Rather, it is this accusation that is an extremely common trope.
    Rarely is it true.

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @Kazinator@mstdn.ca

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to 643-408-1753@kylheku.com on Wed Jan 15 22:55:16 2025
    In article <20250115122111.406@kylheku.com>,
    Kaz Kylheku <643-408-1753@kylheku.com> wrote:
    [snip]
    Dan Cross being a random troll in a newsgroup is an example of bollocks,
    and it's being called out.

    Thanks, Kaz. That's kind of you.

    Even if Dan happened to be caught talking bollocks, it still wouldn't
    make him a troll, or random. It's simply not factual or rational.

    In fairness, most of what I say is probably bollocks. :-D

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Thu Jan 16 09:43:13 2025
    On Wed, 15 Jan 2025 20:27:41 -0000 (UTC)
    Kaz Kylheku <643-408-1753@kylheku.com> wibbled:
    On 2025-01-15, Muttley@DastardlyHQ.org <Muttley@DastardlyHQ.org> wrote:
    On Wed, 8 Jan 2025 20:27:54 -0000 (UTC)
    Kaz Kylheku <643-408-1753@kylheku.com> wibbled:
    On 2025-01-08, Muttley@DastardlyHQ.org <Muttley@DastardlyHQ.org> wrote:
    I don't need to prove myself to argue with some random troll on a >newsgroup.
    If you can't handle that thats your problem, not mine.

    I have to say, that's pretty tone deaf, as a reply to Dan Cross.

    Sorry if I don't hero worship like you. If I think someone's talking bollocks

    then I'll call it out.

    Glad you understand the concept.

    Dan Cross being a random troll in a newsgroup is an example of bollocks,
    and it's being called out.

    I've rarely seen him post here but keep holding a candle for his magnificence if it makes you feel better.

    Even if Dan happened to be caught talking bollocks, it still wouldn't
    make him a troll, or random. It's simply not factual or rational.

    If someone talks a load of rubbish in reply to someone and also accuses that someone of being clueless instead of actually arguing the point then I'd say that was trolling.

    Incidentaly no one has said what this wunderkind has actually done that deserves such praise. Given that he looks late 20s in his picture he's certaiunly no greybeard with a long history of contributions.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Thu Jan 16 09:40:43 2025
    On Wed, 15 Jan 2025 20:20:44 -0000 (UTC)
    Kaz Kylheku <643-408-1753@kylheku.com> wibbled:
    On 2025-01-15, Muttley@DastardlyHQ.org <Muttley@DastardlyHQ.org> wrote:
    The usual "i don't agree with you so you must be a troll" attitude.

    Rather, it is this accusation that is an extremely common trope.
    Rarely is it true.

    Its very often true. Calling someone a troll in a newsgroup is a drop-the-mic and walk off because you've lost the argument. Exactly the same as calling someone a racist/xenophone/whatever IRL when you run out of debating ability.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Salvador Mirzo@21:1/5 to Lawrence D'Oliveiro on Thu Jan 9 22:27:46 2025
    Lawrence D'Oliveiro <ldo@nz.invalid> writes:

    On Sat, 04 Jan 2025 19:17:15 -0300, Salvador Mirzo wrote:

    Lawrence D'Oliveiro <ldo@nz.invalid> writes:

    Windows NT was masterminded by Dave Cutler ...

    Is that Dave with a YouTube channel?

    No, that’s a different former Microsoftie, but he has had Cutler on his channel for an extended interview.

    I found it ironic that there was a PiDP-11, I think it was, placed within arm’s reach behind the guy during the entire interview. You know, the PDP-11 emulator that runs on a Linux-based Raspberry Pi. I wonder if the Unix-hater ever noticed that ...

    LOL. Can you find a link to this interview? Sounded very interesting.

    --
    Thanks!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nicolas George@21:1/5 to All on Thu Jan 16 15:01:56 2025
    Muttley@DastardlyHQ.org, dans le message <vmak6r$3eq9o$1@dont-email.me>,
    a Θcritá:
    Its very often true. Calling someone a troll in a newsgroup is a drop-the-mic and walk off because you've lost the argument.

    From what I have seen recently, calling you a troll is cutting oneself with Hanlon's razor.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Muttley@DastardlyHQ.org on Thu Jan 16 14:51:40 2025
    In article <vmakbg$3eqtn$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >[snip]
    Given that he looks late 20s in his picture he's
    certaiunly no greybeard with a long history of contributions.

    I wish I were still in my late 20s. Perhaps my knees would hurt
    less.

    And if only my hair (and beard) were more colorful, but sadly, I
    went almost totally gray in Afghanistan. Perhaps I'll turn out
    lucky and have eventually have silver hair like my grandmother
    had.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Muttley@DastardlyHQ.org@21:1/5 to All on Thu Jan 16 15:47:50 2025
    On Thu, 16 Jan 2025 14:51:40 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    In article <vmakbg$3eqtn$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>[snip]
    Given that he looks late 20s in his picture he's
    certaiunly no greybeard with a long history of contributions.

    I wish I were still in my late 20s. Perhaps my knees would hurt
    less.

    You need to update your photo.

    And if only my hair (and beard) were more colorful, but sadly, I
    went almost totally gray in Afghanistan. Perhaps I'll turn out

    The humblebrag vet stuff isn't going to get you any brownie points with me mate.
    2 of my family also served there and they don't act like dicks in online forums.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to Dan Cross on Thu Jan 16 15:56:45 2025
    cross@spitfire.i.gajendra.net (Dan Cross) writes:
    In article <vmakbg$3eqtn$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>[snip]
    Given that he looks late 20s in his picture he's
    certaiunly no greybeard with a long history of contributions.

    I wish I were still in my late 20s. Perhaps my knees would hurt
    less.

    Weren't you at Murray Hill, before the move to Summit?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Scott Lurndal on Thu Jan 16 16:53:05 2025
    In article <1%9iP.816684$oR74.514042@fx16.iad>,
    Scott Lurndal <slp53@pacbell.net> wrote:
    cross@spitfire.i.gajendra.net (Dan Cross) writes:
    In article <vmakbg$3eqtn$1@dont-email.me>, <Muttley@DastardlyHQ.org> wrote: >>>[snip]
    Given that he looks late 20s in his picture he's
    certaiunly no greybeard with a long history of contributions.

    I wish I were still in my late 20s. Perhaps my knees would hurt
    less.

    Weren't you at Murray Hill, before the move to Summit?

    Ha, no; I used to just go down there to hang around the Unix
    room, but never worked for the labs.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to Muttley@DastardlyHQ.org on Thu Jan 16 17:34:10 2025
    On 2025-01-16, Muttley@DastardlyHQ.org <Muttley@DastardlyHQ.org> wrote:
    On Thu, 16 Jan 2025 14:51:40 -0000 (UTC)
    cross@spitfire.i.gajendra.net (Dan Cross) wibbled:
    And if only my hair (and beard) were more colorful, but sadly, I
    went almost totally gray in Afghanistan. Perhaps I'll turn out
    2 of my family also served there and they don't act like dicks in online forums.

    1 of your family, on the other hand, ...

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @Kazinator@mstdn.ca

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)