Still, somebody had to decide to make the MS-DOS COPY command refuse
to copy zero-length files - something which CP/M's PIP did happily.
In article <11bhpo6$2lpjl$1@dont-email.me>, <boltar@caprica.universe> wrote:
Lynn McGuire <lynnmcguire5@gmail.com> gabbled:
On 10/23/2026 11:06 AM, Peter Flass wrote:Gates when he put his mind to it could certainly program. Even Sinclair
Bill Gates never earned a degree. He seemed to do ok.
From what I understand, he wasn't a very good programmer, though.
Bill Gates wrote the Microsoft Basic compiler and interpreter for the
Altair 8080 in 2K of ram using assembly language. Take that as you will. >>
required 4K for BASIC in the ZX80 for example. But some of his technical
(and business) decisions leave a lot to be desired.
But the ZX80 (and most later MBASICs) had floating point.
--scott
On Fri, 23 Oct 2026 23:31:41 GMT, Charlie Gibbs wrote:
On 2026-10-23, Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
What was that error message? I was expecting something like rCLDISK
ERRORrCY or rCLI/O ERRORrCY. Instead, it said
IrCOm having trouble with the disk.
The idea of an error message phrased in plain, approachable
language (using a first-person pronoun, even) instead of technical
terms?? That was a revelation.
Unfortunately it's not the kind of revelation I welcome. Back in my
mainframe days, I learned to hate catch-all error messages; they're
the sign of a programmer who's too lazy to try to help the user. If
something goes wrong, I want to be given some clues as to where to
look. But more and more these days, your typical error message is
"Something went wrong." Nothing more. This kind of conduct should be
condemned.
This was not like that though, was it? On systems of that era, you
would typically get something like rCLDISK ERRORrCY or rCLI/O ERRORrCY. The plain-language message was no less specific than that.
Do you want more detail about what went wrong? Perhaps a CRC
validation failure? Sector-addressing failure? Missing address/data
marks? Invalid GCR/RLL encoding?
That kind of low-level detail might be helpful to somebody (perhaps a hardware engineer) trying to fix the problem. And perhaps it should
appear in a system log somewhere.
And it wouldnrCOt have mattered much in this case, anyway, since it
would have been obvious to anybodyrCi sitting or standing in front of the machine, that the most likely cause was the fact that there was no
disk in the drive.
rCiAnybody who had made much use of floppy disks on micros, anyway.
On 10/23/2026 8:44 PM, Lawrence DrCOOliveiro wrote:
On Fri, 23 Oct 2026 23:31:41 GMT, Charlie Gibbs wrote:
On 2026-10-23, Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
What was that error message? I was expecting something like rCLDISK
ERRORrCY or rCLI/O ERRORrCY. Instead, it said
IrCOm having trouble with the disk.
The idea of an error message phrased in plain, approachable
language (using a first-person pronoun, even) instead of technical
terms?? That was a revelation.
Unfortunately it's not the kind of revelation I welcome. Back in my
mainframe days, I learned to hate catch-all error messages; they're
the sign of a programmer who's too lazy to try to help the user. If
something goes wrong, I want to be given some clues as to where to
look. But more and more these days, your typical error message is
"Something went wrong." Nothing more. This kind of conduct should be
condemned.
This was not like that though, was it? On systems of that era, you
would typically get something like rCLDISK ERRORrCY or rCLI/O ERRORrCY. The >> plain-language message was no less specific than that.
Do you want more detail about what went wrong? Perhaps a CRC
validation failure? Sector-addressing failure? Missing address/data
marks? Invalid GCR/RLL encoding?
That kind of low-level detail might be helpful to somebody (perhaps a
hardware engineer) trying to fix the problem. And perhaps it should
appear in a system log somewhere.
And it wouldnrCOt have mattered much in this case, anyway, since it
would have been obvious to anybodyrCi sitting or standing in front of the
machine, that the most likely cause was the fact that there was no
disk in the drive.
rCiAnybody who had made much use of floppy disks on micros, anyway.
Iirc, BASIC had a fun error. I cannot remember the damn exact phrase, it
was something like expression too complex or something.
In article <11bj08r$309uk$1@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/24/26 09:41, Dan Cross wrote:
In article <11bhppd$2lpkc$1@dont-email.me>,
<boltar@caprica.universe> wrote:
On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>,
<boltar@caprica.universe> wrote:
On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>,
<boltar@battlestar.co.uk> wrote:
You need an OS to do threading properly too. Theres a reason
green threads in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an
operating system. I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading
library but not a process library. Its perfectly possible to
simulate a multiprocess enviroment.
So write a simulator in your language of choice. You don't need
the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
Take your time...
What, pray tell, do you think that a _thread_ is? And how is it
different from a _process_? For that matter, what do you think
that a _process_ is?
Please, take all the time you need to answer.
Threads share resources such as address space, files, etc. A process
runs in its own address space. (at least these days, before virtual >memory, who knows?)
Indeed, but I'm hoping Mr Boltar will chime in with his answers,
so that we can understand why thinks that a language like C
should introduce a *process* model, and how threads are similar.
- Dan C.
On Sat, 24 Oct 2026 21:24:58 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
In article <11bj08r$309uk$1@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/24/26 09:41, Dan Cross wrote:
In article <11bhppd$2lpkc$1@dont-email.me>,
<boltar@caprica.universe> wrote:
On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>,
<boltar@caprica.universe> wrote:
On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>,
<boltar@battlestar.co.uk> wrote:
You need an OS to do threading properly too. Theres a reason
green threads in java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an
operating system. I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a threading
library but not a process library. Its perfectly possible to
simulate a multiprocess enviroment.
So write a simulator in your language of choice. You don't need
the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
Take your time...
What, pray tell, do you think that a _thread_ is? And how is it
different from a _process_? For that matter, what do you think
that a _process_ is?
Please, take all the time you need to answer.
Threads share resources such as address space, files, etc. A process
runs in its own address space. (at least these days, before virtual
memory, who knows?)
Indeed, but I'm hoping Mr Boltar will chime in with his answers,
so that we can understand why thinks that a language like C
should introduce a *process* model, and how threads are similar.
- Dan C.
First, he was talking about C++. Unlike me, he does not appear to care
about C.
Second, while in theory threads can be implemented by C++
compilers+language support library, in practice I had never seen it
done.
All I had seen is C++ threads implemented in library as thin
wrapper atop of the OS (or RT executive) implementation.
I can not see while the same can't be done for processes, with
API modeled on posix_spawn() or Windows CreateProcess().
It does not look like variety in this field is bigger than in case of >threads. More like it is smaller.
Now, would it be the first thing I would want like addition to C++
standard library? No it would not be.
The first thing would be IPv4 communication, sockets, poll etc...
In article <20261025011151.000038ef@yahoo.com>,
Michael S <already5chosen@yahoo.com> wrote:
On Sat, 24 Oct 2026 21:24:58 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
In article <11bj08r$309uk$1@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/24/26 09:41, Dan Cross wrote:
In article <11bhppd$2lpkc$1@dont-email.me>,
<boltar@caprica.universe> wrote:
On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>,
<boltar@caprica.universe> wrote:
On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>,
<boltar@battlestar.co.uk> wrote:
You need an OS to do threading properly too. Theres a
reason green threads in java were a joke.
Weird that you think you need a operating system for
threads, yet you want C to standardize processes which also
... need an operating system. I mean, POSIX already does
an ok job of standardizing the sorts of process-y things
you would expect from, you know, an operating system.
I'm simply pointing out the inconsistency in having a
threading library but not a process library. Its perfectly
possible to simulate a multiprocess enviroment.
So write a simulator in your language of choice. You don't
need the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
Take your time...
What, pray tell, do you think that a _thread_ is? And how is it
different from a _process_? For that matter, what do you think
that a _process_ is?
Please, take all the time you need to answer.
Threads share resources such as address space, files, etc. A
process runs in its own address space. (at least these days,
before virtual memory, who knows?)
Indeed, but I'm hoping Mr Boltar will chime in with his answers,
so that we can understand why thinks that a language like C
should introduce a *process* model, and how threads are similar.
- Dan C.
First, he was talking about C++. Unlike me, he does not appear to
care about C.
First, he's a big boy, and I'm sure he can answer for himself.
But ok then, C++, not C. The questions still stand.
Second, while in theory threads can be implemented by C++ >compilers+language support library, in practice I had never seen it
done.
This is not saying much about anything aside from the countours
of your own experience, I'm afraid.
All I had seen is C++ threads implemented in library as thin
wrapper atop of the OS (or RT executive) implementation.
In the late 1990s, into the early 2000s, most "threads" on
Unix-style systems were implemented in userspace, in the C
library, often by exposing the "normal" system call endpoints
in the library, but making them thin wrappers around equivalent
asynchronous system calls.
There was even a paper about using the Xinu pedagogical system
from Doug Comer to implement something very close to threads on
4.2BSD, with signals and a context saving/restoration primitive
to approximate a timer interrupt.
For a more recent historical example the FreeBSD MP library was
initially implemented this way, as were pre-LinuxThreasd threads
on Linux; Solaris threads up until Solaris 2.6 or so similarly.
Of course, it wasn't a great way to do things because if
something _did_ block...well, there went your concurrency.
Making Unix systems multithreaded was challenging because of
decades of software that was written assuming a single-threaded
userspace environment (the kernel had been "multithreaded" since
very near the start, even if much of the system was written
assuming a single processor; but parallelism is not the same
thing as concurrency), and this was compounded because people
were trying to implement complex M:N threading models; Sun did
this, and FreeBSD tried with their KSEs; the Linux people did
not. While cool in theory, M:N threading relied on very
specific usage patterns to work well in practice, and almost no
one actually wrote software that way, so you ended up with
userspace threads fighting the kernel scheeduler, and vice
versa.
More recently, the Akaros research system introduced the notion
of a "many-core process" and pushed fine-grained "thread"
scheduling entirely to userspace; the kernel is totally unaware
of how userspace schedules anything. That system uses an N:C
model, where $C$ is the number of *cores* assigned to a process
(all system calls in Akaros are asychronous by design, to avoid
the pitfalls of user-threads blocking on synchronous kernel
services that beset Unix).
I can not see while the same can't be done for processes, with
API modeled on posix_spawn() or Windows CreateProcess().
C, and C++, have had `system()` for as long as I can remember,
if you just want to run a program (note that both `posix_spawn`
and `CreateProcess` take the names of programs to run in that
new process).
It does not look like variety in this field is bigger than in case of >threads. More like it is smaller.
Nope. But if you think differently, see the questions above.
Now, would it be the first thing I would want like addition to C++
standard library? No it would not be.
The first thing would be IPv4 communication, sockets, poll etc...
POSIX has all of that. POSIX also has a process model. Why not
just make POSIX a part of the language, then? (Answer that and
you may start to understand why this is harder than it looks
for C++ [and C].)
- Dan C.
In article <11bhpo6$2lpjl$1@dont-email.me>, <boltar@caprica.universe> wrote:
Lynn McGuire <lynnmcguire5@gmail.com> gabbled:
On 10/23/2026 11:06 AM, Peter Flass wrote:
Bill Gates never earned a degree. He seemed to do ok.
From what I understand, he wasn't a very good programmer, though.
Bill Gates wrote the Microsoft Basic compiler and interpreter for the >>>Altair 8080 in 2K of ram using assembly language. Take that as you will.
Gates when he put his mind to it could certainly program. Even Sinclair >>required 4K for BASIC in the ZX80 for example. But some of his technical >>(and business) decisions leave a lot to be desired.
But the ZX80 (and most later MBASICs) had floating point.
--scott
In article <20261025011151.000038ef@yahoo.com>,
Now, would it be the first thing I would want like addition to C++
standard library? No it would not be.
The first thing would be IPv4 communication, sockets, poll etc...
POSIX has all of that. POSIX also has a process model. Why not
just make POSIX a part of the language, then? (Answer that and
you may start to understand why this is harder than it looks
for C++ [and C].)
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
In article <20261025011151.000038ef@yahoo.com>,
Michael S <already5chosen@yahoo.com> wrote:
[snip]
Second, while in theory threads can be implemented by C++
compilers+language support library, in practice I had never seen it
done.
This is not saying much about anything aside from the countours
of your own experience, I'm afraid.
[snip history showing a long line of "OS Threads" implemented
as a library]
How any of this trivia has anything to do with real-world
implementations of C++11 threads?
I mentioned that in one of my earlier responses to boltar.
However there exist situation in which system() is not a satisfactory >replacement for spawn(), most often because overhead of launching shell >sometimes matters.
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows threading >model/api are? Yet somehow C++ provides a common wrapper for both. There is >no reason the same can't be done for processes and your irrelevant waffle >about past issues of threading on *nix don't change that.
On Sat, 24 Oct 2026 21:24:58 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
Indeed, but I'm hoping Mr Boltar will chime in with his answers,
so that we can understand why thinks that a language like C
should introduce a *process* model, and how threads are similar.
- Dan C.
First, he was talking about C++. Unlike me, he does not appear to care
about C.
Second, while in theory threads can be implemented by C++
compilers+language support library, in practice I had never seen it
done. All I had seen is C++ threads implemented in library as thin
wrapper atop of the OS (or RT executive) implementation.
I can not see while the same can't be done for processes, with
API modeled on posix_spawn() or Windows CreateProcess().
It does not look like variety in this field is bigger than in case of >threads. More like it is smaller.
Now, would it be the first thing I would want like addition to C++
standard library? No it would not be.
The first thing would be IPv4 communication, sockets, poll etc...
In article <20261025084234.0000449c@yahoo.com>,<snip>
Michael S <already5chosen@yahoo.com> wrote:
How any of this trivia has anything to do with real-world
implementations of C++11 threads?
Your statement, "while in theory threads can be implemented by
C++ compilers+language support library, in practice I had never
seen it done" is probably strictly true: you, individually, have
never seen it done.
But that does not imply that it has never been done. In
fact, it has; many times over. There are complications, but it
can be done. That is what I was telling you, supported by
examples.
On Fri, 23 Oct 2026 21:00:30 -0000 (UTC), Thomas Koenig wrote:
I have one Fortran program which has an excellent graphics API, it
writes Postscript. Works fine. Can't do any mouse clicks on it and
expect anything to happen, though :-)
PostScript was a very influential graphics API, but it is only fit for
the museum nowadays. It was designed for putting marks on paper, not
for updating pixels on a computer screen.
In article <11bkfcc$104cc$1@dont-email.me>, <boltar@caprica.universe> wrote: >>On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows threading >>model/api are? Yet somehow C++ provides a common wrapper for both. There is >>no reason the same can't be done for processes and your irrelevant waffle >>about past issues of threading on *nix don't change that.
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
cross@spitfire.i.gajendra.net (Dan Cross) writes:
In article <20261025084234.0000449c@yahoo.com>,<snip>
Michael S <already5chosen@yahoo.com> wrote:
How any of this trivia has anything to do with real-world
implementations of C++11 threads?
Your statement, "while in theory threads can be implemented by
C++ compilers+language support library, in practice I had never
seen it done" is probably strictly true: you, individually, have
never seen it done.
But that does not imply that it has never been done. In
fact, it has; many times over. There are complications, but it
can be done. That is what I was telling you, supported by
examples.
Although it does, generally, rely on specific operating system
interfaces (e.g. makecontext, setcontext, et alia).
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bkfcc$104cc$1@dont-email.me>, <boltar@caprica.universe> wrote: >>>On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows threading >>>model/api are? Yet somehow C++ provides a common wrapper for both. There is >>>no reason the same can't be done for processes and your irrelevant waffle >>>about past issues of threading on *nix don't change that.
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
Stop playing games - you don't get to answer a question with a question.
Given I've been programming on unix for over 30 years and have written dozens >of applications using multi process and multi threading and sometimes using both
I'm quite well aware of the differences. Perhaps you arn't which is why you >need me to tell you. Well go do your own research.
In the meantime I'll ask one last time - why do you think C++ can provide
a threading wrapper API but not a multi process one?
Take your time.
In article <YHpDS.27364$9b8f.4666@fx39.iad>,
Scott Lurndal <slp53@pacbell.net> wrote:
cross@spitfire.i.gajendra.net (Dan Cross) writes:
In article <20261025084234.0000449c@yahoo.com>,<snip>
Michael S <already5chosen@yahoo.com> wrote:
How any of this trivia has anything to do with real-world >>>>implementations of C++11 threads?
Your statement, "while in theory threads can be implemented by
C++ compilers+language support library, in practice I had never
seen it done" is probably strictly true: you, individually, have
never seen it done.
But that does not imply that it has never been done. In
fact, it has; many times over. There are complications, but it
can be done. That is what I was telling you, supported by
examples.
Although it does, generally, rely on specific operating system
interfaces (e.g. makecontext, setcontext, et alia).
That's true. But no one said that one can use strict ISO C++ to
implement the C++ standard library.
Regardless, if you can set the stack pointer, you can build a
reasonable cooperative threading library purely in userspace,
without the OS caring.
In article <11bl9qm$10h8f$1@dont-email.me>, <boltar@caprica.universe> wrote: >>On Sun, 25 Oct 2026 13:34:58 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bkfcc$104cc$1@dont-email.me>, <boltar@caprica.universe> wrote:
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows threading >>>>model/api are? Yet somehow C++ provides a common wrapper for both. There is >>>>no reason the same can't be done for processes and your irrelevant waffle >>>>about past issues of threading on *nix don't change that.
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
Stop playing games - you don't get to answer a question with a question.
In other words, you don't know.
In the meantime I'll ask one last time - why do you think C++ can provide
a threading wrapper API but not a multi process one?
You've got system(), right? What, precisely, do you want this
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
with a question.[snip]
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
Stop playing games - you don't get to answer a question
In other words, you don't know.
Oh do piss off you bore, i'm not going to humour you while
you try to unpaint
yourself from a corner. You clearly have no idea why C++
implements one API
but not the other but you wanted to try and sound clever
anyway. Whoops, didn't
turn out quite how you expected did it?
C++ can provideIn the meantime I'll ask one last time - why do you think
a threading wrapper API but not a multi process one?
You've got system(), right? What, precisely, do you want this
system?? ROTFL!! :)
Oh dear, you really have no clue!
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
Regardless, if you can set the stack pointer, you can build a
reasonable cooperative threading library purely in userspace,
without the OS caring.
Oh really? You seem to have forgotten about the program
counter not to
mentioning pushing and popping all the other cpu registers
and flags at context
switch.
On 10/25/26 06:34, Dan Cross wrote:
In article <11bkfcc$104cc$1@dont-email.me>, <boltar@caprica.universe> wrote:
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows threading
model/api are? Yet somehow C++ provides a common wrapper for both. There >> is
no reason the same can't be done for processes and your irrelevant waffle >> about past issues of threading on *nix don't change that.
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
- Dan C.
I vote that alt.folklore.computers gets pruned from the list of
recipients, as this discussion seems irrelevant here.
In article <11bl7vr$3nprb$2@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/25/26 06:34, Dan Cross wrote:
In article <11bkfcc$104cc$1@dont-email.me>, <boltar@caprica.universe>
wrote:
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows threading >>>> model/api are? Yet somehow C++ provides a common wrapper for both. There >>>> is
no reason the same can't be done for processes and your irrelevant waffle >>>> about past issues of threading on *nix don't change that.
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
- Dan C.
I vote that alt.folklore.computers gets pruned from the list of
recipients, as this discussion seems irrelevant here.
For that matter, this entire thread has ceased to have anything to do
with rec.arts.sf.written.
Threads share resources such as address space, files, etc. A process
runs in its own address space. (at least these days, before virtual >>memory, who knows?)
With copy-on-write process models the actual difference is a bit less
clear cut.
On 10/25/2026 1:19 PM, Robert Woodward wrote:
In article <11bl7vr$3nprb$2@dont-email.me>,
-a Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/25/26 06:34, Dan Cross wrote:
In article <11bkfcc$104cc$1@dont-email.me>,-a <boltar@caprica.universe> >>>> wrote:
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows threading >>>>> model/api are? Yet somehow C++ provides a common wrapper for both.
There
is
no reason the same can't be done for processes and your irrelevant
waffle
about past issues of threading on *nix don't change that.
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
-a-a-a-a- Dan C.
I vote that alt.folklore.computers gets pruned from the list of
recipients, as this discussion seems irrelevant here.
For that matter, this entire thread has ceased to have anything to do
with rec.arts.sf.written.
Based on 40+ years of usenet experience, the only thing which will stop
the cross posting is the death of this thread.
pt
In article <11bl7vr$3nprb$2@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/25/26 06:34, Dan Cross wrote:
In article <11bkfcc$104cc$1@dont-email.me>, <boltar@caprica.universe>
wrote:
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows threading >>>> model/api are? Yet somehow C++ provides a common wrapper for both. There >>>> is
no reason the same can't be done for processes and your irrelevant waffle >>>> about past issues of threading on *nix don't change that.
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
- Dan C.
I vote that alt.folklore.computers gets pruned from the list of
recipients, as this discussion seems irrelevant here.
For that matter, this entire thread has ceased to have anything to do
with rec.arts.sf.written.
On 25/10/2026 18:19, Robert Woodward wrote:
In article <11bl7vr$3nprb$2@dont-email.me>,
-a Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/25/26 06:34, Dan Cross wrote:
In article <11bkfcc$104cc$1@dont-email.me>,-a <boltar@caprica.universe> >>>> wrote:
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows threading >>>>> model/api are? Yet somehow C++ provides a common wrapper for both.
There
is
no reason the same can't be done for processes and your irrelevant
waffle
about past issues of threading on *nix don't change that.
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
-a-a-a-a- Dan C.
I vote that alt.folklore.computers gets pruned from the list of
recipients, as this discussion seems irrelevant here.
For that matter, this entire thread has ceased to have anything to do
with rec.arts.sf.written.
Was it ever relevant to that group?-a At least one person in this thread
is renowned for his irritating habit of adding every newsgroup he can
think of to lists.-a "This post is in English - I'll add alt.languages.english to the list.-a I see there was a number mentioned - I've added sci.maths for their thoughts.-a I've just thought about
thoughts, so alt.philosophy is needed too".
David Brown wrote:
On 25/10/2026 18:19, Robert Woodward wrote:
In article <11bl7vr$3nprb$2@dont-email.me>,
-a Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/25/26 06:34, Dan Cross wrote:
In article <11bkfcc$104cc$1@dont-email.me>,-a <boltar@caprica.universe> >>>>> wrote:
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows
threading
model/api are? Yet somehow C++ provides a common wrapper for both. >>>>>> There
is
no reason the same can't be done for processes and your irrelevant >>>>>> waffle
about past issues of threading on *nix don't change that.
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
-a-a-a-a- Dan C.
I vote that alt.folklore.computers gets pruned from the list of
recipients, as this discussion seems irrelevant here.
For that matter, this entire thread has ceased to have anything to do
with rec.arts.sf.written.
Was it ever relevant to that group?-a At least one person in this
thread is renowned for his irritating habit of adding every newsgroup
he can think of to lists.-a "This post is in English - I'll add
alt.languages.english to the list.-a I see there was a number mentioned
- I've added sci.maths for their thoughts.-a I've just thought about
thoughts, so alt.philosophy is needed too".
Sorry about that. I only did it because Eternal September, if I take
away one of the Newsgroups: listings, it won't let me post. In such a
case it only allows 3 newsgroups. That won't do for this thread.
On Fr 23 Okt 2026 at 22:49, Lawrence DrCOOliveiro wrote:
PostScript was a very influential graphics API, but it is only fit
for the museum nowadays. It was designed for putting marks on
paper, not for updating pixels on a computer screen.
There was also display postscript from SUN.
On Sat, 24 Oct 2026 21:24:58 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bj08r$309uk$1@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
On 10/24/26 09:41, Dan Cross wrote:wrote:
In article <11bhppd$2lpkc$1@dont-email.me>,
<boltar@caprica.universe>
wrote:On Fri, 23 Oct 2026 20:45:27 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bf4d1$skul$1@dont-email.me>,
<boltar@caprica.universe>
wrote:On Thu, 22 Oct 2026 16:22:30 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bd7rg$2cvfs$1@dont-email.me>,
<boltar@battlestar.co.uk>
threads
You need an OS to do threading properly too. Theres a reason >>>>>>>> green
butin java were a joke.
Weird that you think you need a operating system for threads,
yet you want C to standardize processes which also ... need an >>>>>>> operating system. I mean, POSIX already does an ok job of
standardizing the sorts of process-y things you would expect
from, you know, an operating system.
I'm simply pointing out the inconsistency in having a
threading library
not a process library. Its perfectly possible to simulate a
multiprocess enviroment.
So write a simulator in your language of choice. You don't need
the language to standardize a process model for that.
Ditto threads. So why does C++ have a threading library?
Take your time...
What, pray tell, do you think that a _thread_ is? And how is it
different from a _process_? For that matter, what do you think
that a _process_ is?
Please, take all the time you need to answer.
Threads share resources such as address space, files, etc. A
process runs in its own address space. (at least these days, before >>virtual memory, who knows?)
Indeed, but I'm hoping Mr Boltar will chime in with his answers,
so that we can understand why thinks that a language like C
should introduce a *process* model, and how threads are similar.
Who mentioned C? I was talking about C++ which has a threading API
already. Do try and keep up.
In article <11bl7vr$3nprb$2@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
I vote that alt.folklore.computers gets pruned from the list of
recipients, as this discussion seems irrelevant here.
For that matter, this entire thread has ceased to have anything to do
with rec.arts.sf.written.
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <20261025011151.000038ef@yahoo.com>,
Now, would it be the first thing I would want like addition to C++ >>standard library? No it would not be.
The first thing would be IPv4 communication, sockets, poll etc...
POSIX has all of that. POSIX also has a process model. Why not
just make POSIX a part of the language, then? (Answer that and
you may start to understand why this is harder than it looks
for C++ [and C].)
No, it isn't. How similar do you think the posix and windows threading model/api are? Yet somehow C++ provides a common wrapper for both.
There is no reason the same can't be done for processes and your
irrelevant waffle about past issues of threading on *nix don't change
that.
Bill Gates wrote the Microsoft Basic compiler and interpreter for the
Altair 8080 in 2K of ram using assembly language. Take that as you will.
On Sun, 25 Oct 2026 16:31:56 +0100, Andreas Eder wrote:
On Fr 23 Okt 2026 at 22:49, Lawrence DrCOOliveiro wrote:
PostScript was a very influential graphics API, but it is only fit
for the museum nowadays. It was designed for putting marks on
paper, not for updating pixels on a computer screen.
There was also display postscript from SUN.
Display PostScript was from Adobe.
You could be thinking of NeWS, which was from Sun. It slightly
predated X11, and they pretty much abandoned it after adopting X11
wholesale, like the entire rest of the Unix industry.
But neither Display PostScript nor NeWS made any changes to the
PostScript graphics model; it was still designed around making marks
on paper, not for updating pixels on a computer screen.
On Sun, 25 Oct 2026 13:34:58 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11bkfcc$104cc$1@dont-email.me>, <boltar@caprica.universe> wrote: >>>On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
No, it isn't. How similar do you think the posix and windows threading >>>model/api are? Yet somehow C++ provides a common wrapper for both. There is >>>no reason the same can't be done for processes and your irrelevant waffle >>>about past issues of threading on *nix don't change that.
You didn't answer my questions.
What do you think that a "thread" is?
What do you think that a "process" is?
Stop playing games - you don't get to answer a question with a question. Given I've been programming on unix for over 30 years and have written dozens of applications using multi process and multi threading and sometimes using both
I'm quite well aware of the differences. Perhaps you arn't which is why you need me to tell you. Well go do your own research.
In the meantime I'll ask one last time - why do you think C++ can provide
a threading wrapper API but not a multi process one?
Take your time.
On 26/10/2026 06:19, Robert Woodward wrote:
In article <11bl7vr$3nprb$2@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
snip
I vote that alt.folklore.computers gets pruned from the list of
recipients, as this discussion seems irrelevant here.
For that matter, this entire thread has ceased to have anything to do
with rec.arts.sf.written.
Yes. You are correct, but there are several from r.a.sf.written making a contribution and although it is mainly above my pay grade, I am still reading. In Thunderbird, it is extremely easy to mark a thread as
ignored after which you will not be annoyed by further posts on that
topic. Easier than complaining.
In article <11blaui$2q6vd$1@dont-email.me>, <boltar@caprica.universe> wrote: >>anyway. Whoops, didn't
turn out quite how you expected did it?
Actually, it "turned out" juat about exactly as I expected it
would.
Oh dear, you really have no clue!
You're snotty little attitude aside, I note that you can't even
arriculate what, exactly, it is that you want. "Argument by
insult" seems about par for the course here, but using that to
hide your ignorance both doesn't work and makes you look
incredbily insecure.
Anyway, go ahead and keep flailing. Ta!
In article <11blaoq$2q6jk$1@dont-email.me>, <boltar@caprica.universe> wrote: >>On Sun, 25 Oct 2026 16:15:21 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
[snip]
Regardless, if you can set the stack pointer, you can build a
reasonable cooperative threading library purely in userspace,
without the OS caring.
Oh really? You seem to have forgotten about the program
counter not to
mentioning pushing and popping all the other cpu registers
and flags at context
switch.
One last hint: where do you think those thjngs arw stored? If
you could define what a thread is, maybe you'd have a clue
about how those are handled. :-)
According to <boltar@caprica.universe>:
Threads share resources such as address space, files, etc. A process >>>runs in its own address space. (at least these days, before virtual >>>memory, who knows?)
With copy-on-write process models the actual difference is a bit less
clear cut.
Copy-on-write (or on some older systems copy-on-touch) is an implementation >detail. Neither process can look inside the other even if they share some >unwritten or untouched pages.
On Sun, 25 Oct 2026 08:41:48 -0000 (UTC)
boltar@caprica.universe wrote:
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <20261025011151.000038ef@yahoo.com>,
Now, would it be the first thing I would want like addition to C++
standard library? No it would not be.
The first thing would be IPv4 communication, sockets, poll etc...
POSIX has all of that. POSIX also has a process model. Why not
just make POSIX a part of the language, then? (Answer that and
you may start to understand why this is harder than it looks
for C++ [and C].)
No, it isn't. How similar do you think the posix and windows threading
model/api are? Yet somehow C++ provides a common wrapper for both.
Actually, implementing C++11 (or C11) threads fully in user space on >pre-Vista Win32 (i.e. before addition of support for conditional
variables to OS API) would be quite challenging. I don't know if
anybody bothered.
I think that it is possible, but if you want it robust then it (cond. >variables) will cost you significant overhead relatively to "native" >synchronization primitives.
On Sun, 25 Oct 2026 18:17:44 -0000 (UTC)
John Levine <johnl@taugh.com> gabbled:
According to <boltar@caprica.universe>:
Threads share resources such as address space, files, etc. A process
runs in its own address space. (at least these days, before virtual
memory, who knows?)
With copy-on-write process models the actual difference is a bit less
clear cut.
Copy-on-write (or on some older systems copy-on-touch) is an implementation >> detail. Neither process can look inside the other even if they share some >> unwritten or untouched pages.
The point is they are sharing memory. In a reference implementation processes don't share any virtual memory at all - everything is copied to a new location
at fork - so you can't use sharing memory as a way to demarcate multithreading
and multiprocess.
that doesn't mean its a good idea.
On Sun, 25 Oct 2026 22:56:19 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 25 Oct 2026 08:41:48 -0000 (UTC)
boltar@caprica.universe wrote:
On Sun, 25 Oct 2026 00:28:19 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <20261025011151.000038ef@yahoo.com>,
Now, would it be the first thing I would want like addition to C++
standard library? No it would not be.
The first thing would be IPv4 communication, sockets, poll etc...
POSIX has all of that. POSIX also has a process model. Why not
just make POSIX a part of the language, then? (Answer that and
you may start to understand why this is harder than it looks
for C++ [and C].)
No, it isn't. How similar do you think the posix and windows threading
model/api are? Yet somehow C++ provides a common wrapper for both.
Actually, implementing C++11 (or C11) threads fully in user space on >>pre-Vista Win32 (i.e. before addition of support for conditional
variables to OS API) would be quite challenging. I don't know if
anybody bothered.
I think that it is possible, but if you want it robust then it (cond. >>variables) will cost you significant overhead relatively to "native" >>synchronization primitives.
C++ threading didn't have 3 level locking until 2017 making it effectively >useless IMO. Perhaps that was down to the lowest common denominator called >Windows.
On 10/26/26 02:57, boltar@caprica.universe wrote:
On Sun, 25 Oct 2026 18:17:44 -0000 (UTC)
John Levine <johnl@taugh.com> gabbled:
According to <boltar@caprica.universe>:
Threads share resources such as address space, files, etc. A process >>>>> runs in its own address space. (at least these days, before virtual
memory, who knows?)
With copy-on-write process models the actual difference is a bit less
clear cut.
Copy-on-write (or on some older systems copy-on-touch) is an implementation >>> detail. Neither process can look inside the other even if they share some >>> unwritten or untouched pages.
The point is they are sharing memory. In a reference implementation processes
don't share any virtual memory at all - everything is copied to a new location
at fork - so you can't use sharing memory as a way to demarcate multithreading
and multiprocess.
In the old days before IUCV or VMCF I did a multi-process application on
VM by using a file to pass data among processes. Surprisingly, it worked >well.
Peter Flass <Peter@Iron-Spring.com> writes:
On 10/26/26 02:57, boltar@caprica.universe wrote:
On Sun, 25 Oct 2026 18:17:44 -0000 (UTC)
John Levine <johnl@taugh.com> gabbled:
According to <boltar@caprica.universe>:
Threads share resources such as address space, files, etc. A process >>>>>> runs in its own address space. (at least these days, before virtual >>>>>> memory, who knows?)
With copy-on-write process models the actual difference is a bit less >>>>> clear cut.
Copy-on-write (or on some older systems copy-on-touch) is an implementation
detail. Neither process can look inside the other even if they share some >>>> unwritten or untouched pages.
The point is they are sharing memory. In a reference implementation processes
don't share any virtual memory at all - everything is copied to a new location
at fork - so you can't use sharing memory as a way to demarcate multithreading
and multiprocess.
In the old days before IUCV or VMCF I did a multi-process application on
VM by using a file to pass data among processes. Surprisingly, it worked
well.
Burroughs had both a synchronous 'core2core' interface between processes
as well as asynchronous storage queues. In the days of small address spaces, those were invaluable interfaces.
On 10/26/26 02:57, boltar@caprica.universe wrote:
On Sun, 25 Oct 2026 18:17:44 -0000 (UTC)
John Levine <johnl@taugh.com> gabbled:
According to <boltar@caprica.universe>:
Threads share resources such as address space, files, etc. A process >>>>> runs in its own address space. (at least these days, before virtual
memory, who knows?)
With copy-on-write process models the actual difference is a bit less
clear cut.
Copy-on-write (or on some older systems copy-on-touch) is an implementation >>> detail. Neither process can look inside the other even if they share some >>> unwritten or untouched pages.
The point is they are sharing memory. In a reference implementation processes
don't share any virtual memory at all - everything is copied to a new >location
at fork - so you can't use sharing memory as a way to demarcate >multithreading
and multiprocess.
In the old days before IUCV or VMCF I did a multi-process application on
VM by using a file to pass data among processes. Surprisingly, it worked >well.
boltar@caprica.universe writes:
C++ threading didn't have 3 level locking until 2017 making it effectively >>useless IMO. Perhaps that was down to the lowest common denominator called >>Windows.
Mind defining your terminology? "3 level locking", in particular?
Assigning a canonical "lock number" to each lock, and failing a lock
request for a lock with a lower number than that already held is
a design pattern that has been around since 1980 (in Burroughs
mainframes it was implemented in hardware). Easy enough to do
prior to C++17 in software.
And your assertion that a language that doesn't support it intrinsically
is "useless" is ridiculous.
In article <11bn80e$11hkj$1@dont-email.me>, <boltar@caprica.universe> wrote: >>Oh please, try a bit harder. You can do anything you want in ring 0 assembler,
that doesn't mean its a good idea.
As someone who is spending his morning writing 8051 code, I think it can be
a very very good idea.
On Mon, 26 Oct 2026 03:53:45 -0700
Peter Flass <Peter@Iron-Spring.com> gabbled:
On 10/26/26 02:57, boltar@caprica.universe wrote:
On Sun, 25 Oct 2026 18:17:44 -0000 (UTC)location
John Levine <johnl@taugh.com> gabbled:
According to-a <boltar@caprica.universe>:
Threads share resources such as address space, files, etc. A process >>>>>> runs in its own address space. (at least these days, before virtual >>>>>> memory, who knows?)
With copy-on-write process models the actual difference is a bit less >>>>> clear cut.
Copy-on-write (or on some older systems copy-on-touch) is an
implementation
detail.-a Neither process can look inside the other even if they
share some
unwritten or untouched pages.
The point is they are sharing memory. In a reference implementation
processes
don't share any virtual memory at all - everything is copied to a new
at fork - so you can't use sharing memory as a way to demarcatemultithreading
and multiprocess.
In the old days before IUCV or VMCF I did a multi-process application
on VM by using a file to pass data among processes. Surprisingly, it
worked well.
I'd be interested how you'd implement fork() using that method given you
need to copy the state of all file descriptors, heap, stack and global memory, current working directory, enviroment variables and a ton of other things I can't remember without googling.
On Sun, 25 Oct 2026 14:22:34 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/25/2026 1:31 AM, boltar@caprica.universe wrote:
The differences are utterly irrelevant when it comes to prividing a
common
API to the functionality but thank you for demonstrating you had no
answer
to my question.
Ummm... It is relevant. Every process has a single thread of
execution, but not all processes have multiple threads.
No shit sherlock, thanks for the heads up. Your point is?
In article <11bnlrn$ghl$1@panix2.panix.com>,
Scott Dorsey <kludge@panix.com> wrote:
In article <11bn80e$11hkj$1@dont-email.me>, <boltar@caprica.universe> wrote: >>>Oh please, try a bit harder. You can do anything you want in ring 0 assembler,
that doesn't mean its a good idea.
As someone who is spending his morning writing 8051 code, I think it can be >>a very very good idea.
The irony is that, by definition, if you are running something
in userspace, it's not in "Ring 0" anyway.
On Mon, 26 Oct 2026 14:41:54 GMT
scott@slp53.sl.home (Scott Lurndal) gabbled:
boltar@caprica.universe writes:
C++ threading didn't have 3 level locking until 2017 making it >>effectively useless IMO. Perhaps that was down to the lowest common >>denominator called Windows.
Mind defining your terminology? "3 level locking", in particular?
If you have to ask....
1. No lock
2. Write lock - Read only access, writer blocked until all readers
out of critic al section)
3. Read-write lock - all threads other than the one in section block)
This is basic stuff FFS. C++ finally got around to #2 with
shared_mutex in 2017 and its rather critical for certain algorithms.
Assigning a canonical "lock number" to each lock, and failing a lock >request for a lock with a lower number than that already held is
a design pattern that has been around since 1980 (in Burroughs
mainframes it was implemented in hardware). Easy enough to do
prior to C++17 in software.
Thats something else entirely.
And your assertion that a language that doesn't support it
intrinsically is "useless" is ridiculous.
Not useless then, just less useful.
On Sun, 25 Oct 2026 17:14:18 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <11blaui$2q6vd$1@dont-email.me>,
<boltar@caprica.universe> wrote:
anyway. Whoops, didn't
turn out quite how you expected did it?
Actually, it "turned out" juat about exactly as I expected it
would.
You have low expectations then.
Oh dear, you really have no clue!
You're snotty little attitude aside, I note that you can't even
Anyone who equates system() with multiprocess programming doesn't
know wtf they're talking about. Hows that for a snotty aside?
arriculate what, exactly, it is that you want. "Argument by
insult" seems about par for the course here, but using that to
hide your ignorance both doesn't work and makes you look
incredbily insecure.
Anyway, go ahead and keep flailing. Ta!
Go ahead and remain clueless.
On Sun, 25 Oct 2026 14:19:14 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/25/2026 1:34 AM, boltar@caprica.universe wrote:
On Sat, 24 Oct 2026 13:57:02 -0400 (EDT)
kludge@panix.com (Scott Dorsey) gabbled:
In article <11bif5s$2pam0$1@dont-email.me>,
Peter Flass <Peter@Iron-Spring.com> wrote:
You can have co-operative threads. IBM CICS used to run lots of
threads (tasks) concurrently, and ran them well.
When I learned C, there was no threading and there were only
different processes, so you had to do a fork and then synchronize
with the other process. This wasn't a dealbreaker and we did
plenty of stuff that way, but having threads available was very
nice and made for many operations becoming more convenient to
write.
Unfortunately most win32 programmers don't really understand
multiprocess programming because the w32 API is so borked so use
threads even when seperate process would be more appropriate.
Windows has what we need to run multi process. Even for a Mutex... >Remember WAIT_ABANDONED?
win32 can't do fork() making it effectively a totally useless API for
a lot of multiprocess development. Creating a brand new process is
fine if you don't need any complicated shared state such as when
kicking off something on the command line or creating a pipe
(something else win32 is shit at) but thats about it.
On Mon, 26 Oct 2026 03:53:45 -0700
Peter Flass <Peter@Iron-Spring.com> gabbled:
On 10/26/26 02:57, boltar@caprica.universe wrote:
On Sun, 25 Oct 2026 18:17:44 -0000 (UTC)location
John Levine <johnl@taugh.com> gabbled:
According to-a <boltar@caprica.universe>:
Threads share resources such as address space, files, etc. A process >>>>>> runs in its own address space. (at least these days, before virtual >>>>>> memory, who knows?)
With copy-on-write process models the actual difference is a bit less >>>>> clear cut.
Copy-on-write (or on some older systems copy-on-touch) is an
implementation
detail.-a Neither process can look inside the other even if they
share some
unwritten or untouched pages.
The point is they are sharing memory. In a reference implementation
processes
don't share any virtual memory at all - everything is copied to a new
at fork - so you can't use sharing memory as a way to demarcatemultithreading
and multiprocess.
In the old days before IUCV or VMCF I did a multi-process application
on VM by using a file to pass data among processes. Surprisingly, it
worked well.
I'd be interested how you'd implement fork() using that method given you
need to copy the state of all file descriptors, heap, stack and global memory, current working directory, enviroment variables and a ton of other things I can't remember without googling.
On 10/26/26 09:19, boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 03:53:45 -0700
Peter Flass <Peter@Iron-Spring.com> gabbled:
On 10/26/26 02:57, boltar@caprica.universe wrote:
On Sun, 25 Oct 2026 18:17:44 -0000 (UTC)location
John Levine <johnl@taugh.com> gabbled:
According to-a <boltar@caprica.universe>:
Threads share resources such as address space, files, etc. A process >>>>>>> runs in its own address space. (at least these days, before virtual >>>>>>> memory, who knows?)
With copy-on-write process models the actual difference is a bit less >>>>>> clear cut.
Copy-on-write (or on some older systems copy-on-touch) is an
implementation
detail.-a Neither process can look inside the other even if they
share some
unwritten or untouched pages.
The point is they are sharing memory. In a reference implementation
processes
don't share any virtual memory at all - everything is copied to a new
at fork - so you can't use sharing memory as a way to demarcatemultithreading
and multiprocess.
In the old days before IUCV or VMCF I did a multi-process application
on VM by using a file to pass data among processes. Surprisingly, it
worked well.
I'd be interested how you'd implement fork() using that method given you
need to copy the state of all file descriptors, heap, stack and global
memory, current working directory, enviroment variables and a ton of
other
things I can't remember without googling.
No fork. Each VM had a single thread of execution. I was happy to get multiple processes to cooperate. It was a master process (virtual
machine) that distributed work to worker machines.
On 10/26/2026 12:45 PM, Michael S wrote:
On Mon, 26 Oct 2026 16:16:46 -0000 (UTC)
boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 14:41:54 GMT
scott@slp53.sl.home (Scott Lurndal) gabbled:
boltar@caprica.universe writes:
C++ threading didn't have 3 level locking until 2017 making it
effectively useless IMO. Perhaps that was down to the lowest
common denominator called Windows.
Mind defining your terminology? "3 level locking", in
particular?
If you have to ask....
1. No lock
2. Write lock - Read only access, writer blocked until all readers
out of critic al section)
3. Read-write lock - all threads other than the one in section
block)
Windows got Slim Reader/Writer Locks in Vista (2006-11) at the same
time as conditional variables. 5 years before C++11. https://learn.microsoft.com/en-us/windows/win32/sync/slim-reader-writer--srw--locks
Of course WinXP remained popular for few more years, approximately
up until 2nd half of 2010, but that too predates publication of
C++11 in 2011-09.
This is basic stuff FFS. C++ finally got around to #2 with
shared_mutex in 2017 and its rather critical for certain
algorithms.
Assigning a canonical "lock number" to each lock, and failing a
lock request for a lock with a lower number than that already
held is a design pattern that has been around since 1980 (in
Burroughs mainframes it was implemented in hardware). Easy
enough to do prior to C++17 in software.
Thats something else entirely.
And your assertion that a language that doesn't support it
intrinsically is "useless" is ridiculous.
Not useless then, just less useful.
I never ever used what you call "3 level locking", not even byStill don't really know what he means by 3 level locking. Using lock
mistake. But then, I don't write complicated apps on "big"
computers day in day out.
hashing where an address is hashed into a lock index such that no
object needs its own lock is nothing new. But it needs to be sorted
and deduped.
Shared state? Just use memory mapped files. You don't need
pipes/sockets etc. You need to know how to properly sync things.
In the old days before IUCV or VMCF I did a multi-process application
on VM by using a file to pass data among processes. Surprisingly, it
worked well.
On Wed, 21 Oct 2026 19:01:38 -0000 (UTC)Processes are almost self-contained virtual machines. Unix has one of
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
In article <11bb1da$qfn9$1@dont-email.me>, <boltar@battlestar.co.uk> wrote: >>> Not sure why you think its conspiracy anything. I use the language on a
daily basis and everytime a new version comes out I hope they've added
something useful but since 2014 its been a law of diminishing returns.
Plus there's unexplained omissions - eg threads have been part of the core >>> language since 2011. Great, but what about processes? When do we get them? >>> Sure, I could just use fork() but then I could also just use pthread_create()
too.
One can implement a pretty reasonable threads library given the
virtual machine model of standard C or C++. Processes? With
Virtual machine? Wrong language , comp.lang.java is that way --->
their own address spaces, credentials, resource limits, IPC
mechanisms, potentially running different programs, and so on?
Not so much. You need an operating system for that, son.
You need an OS to do threading properly too. Theres a reason green threads
in java were a joke.
On 2026-10-24, Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
On 10/23/2026 8:44 PM, Lawrence DrCOOliveiro wrote:
On Fri, 23 Oct 2026 23:31:41 GMT, Charlie Gibbs wrote:
On 2026-10-23, Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
What was that error message? I was expecting something like rCLDISK
ERRORrCY or rCLI/O ERRORrCY. Instead, it said
IrCOm having trouble with the disk.
The idea of an error message phrased in plain, approachable
language (using a first-person pronoun, even) instead of technical
terms?? That was a revelation.
Unfortunately it's not the kind of revelation I welcome. Back in my
mainframe days, I learned to hate catch-all error messages; they're
the sign of a programmer who's too lazy to try to help the user. If
something goes wrong, I want to be given some clues as to where to
look. But more and more these days, your typical error message is
"Something went wrong." Nothing more. This kind of conduct should be
condemned.
This was not like that though, was it? On systems of that era, you
would typically get something like rCLDISK ERRORrCY or rCLI/O ERRORrCY. The >>> plain-language message was no less specific than that.
Do you want more detail about what went wrong? Perhaps a CRC
validation failure? Sector-addressing failure? Missing address/data
marks? Invalid GCR/RLL encoding?
That kind of low-level detail might be helpful to somebody (perhaps a
hardware engineer) trying to fix the problem. And perhaps it should
appear in a system log somewhere.
And it wouldnrCOt have mattered much in this case, anyway, since it
would have been obvious to anybodyrCi sitting or standing in front of the >>> machine, that the most likely cause was the fact that there was no
disk in the drive.
rCiAnybody who had made much use of floppy disks on micros, anyway.
Iirc, BASIC had a fun error. I cannot remember the damn exact phrase, it
was something like expression too complex or something.
"Who is General Failure and why is he reading my disk?"
On 10/23/2026 8:39 PM, Lawrence DrCOOliveiro wrote:
On Fri, 23 Oct 2026 16:58:04 -0700, Chris M. Thomasson wrote:
Keeping them up to date is, afaict, manual.
In the Linux world, we have rCLdevelopmentrCY packages versus rCLruntimerCY >> packages.
The development package contains the source includes, pkg-config
info etc. The runtime version includes the actual shared library.
So your built package has a dependency on the latter; when a user
tries to install your package, it should automatically pull in the
latter as necessary.
Example from my system:
lrwxrwxrwx 1 root root 13 Apr 24 2026 /usr/lib/x86_64-linux-gnu/libcairo.so -> libcairo.so.2
lrwxrwxrwx 1 root root 21 Apr 24 2026 /usr/lib/x86_64-linux-gnu/libcairo.so.2 -> libcairo.so.2.11804.4
-rw-r--r-- 1 root root 1366728 Apr 24 2026 /usr/lib/x86_64-linux-gnu/libcairo.so.2.11804.4
Where did these come from?
root@theon:~ # dpkg-query -S /usr/lib/x86_64-linux-gnu/libcairo.so.2
libcairo2:amd64: /usr/lib/x86_64-linux-gnu/libcairo.so.2
root@theon:~ # dpkg-query -S /usr/lib/x86_64-linux-gnu/libcairo.so
libcairo2-dev:amd64: /usr/lib/x86_64-linux-gnu/libcairo.so
Notice how the development library is not versioned, but is just a
symlink to a versioned library.
The runtime library is always versioned. This allows multiple
versions of the library to be present at once, with some older
packages, that havenrCOt been rebuilt, still depending on an older
version, while up-to-date packages make use of the newer version.
I was in the linux world for a whiel, along with solaris, etc. But
Windows, oh my. vcpkg is a big turn.
Processes are almost self-contained virtual machines. Unix has one
of the cleanest implementations around, and the fork() system call
combined with copy-on-write is very elegant. None of the other
operating system I have worked with have anything remotely like it.
VMS was also quite elegant, but so different that I think it would
be impossible to simulate one on the other (in either direction).
Threads are much simpler. Multiple strands of execution in a shared
address space. All the language needs to do is provide one shared
vocabulary to allow code portability.
To me it is obvious that threads can and should be standardized, while processes are generally not portable.
On 27/10/2026 04:44, Chris M. Thomasson wrote:
On 10/25/2026 2:45 AM, David Brown wrote:
No one is suggesting that the threads themselves are implemented
in pure, standard, portable C++.a You need an underlying OS or
support of some sort if you are going to have preemptable threads.
It's the same principle as IO and file access.
But the difference between threads and processes is very simple
from the viewpoint of C and C++.a Suppose you have a global (i.e.,
external linkage) variable :
aaaaaint x;
Two threads that have "int a = x;" see the same "x" (ignoring data
races and synchronisation).a Two processes see completely
different "x".[...]
Bingo. So, trying to imply that system is something okay for multi process, well, good luck. Daft. C/C++ has no std way to deal with
multi process. But, we can use C/C++ to program for it all day
long. Interesting.
There are, of course, languages and runtime systems that handle
processes too. An obvious example is Python. But it does it using a significantly "thicker" abstraction layer, combined with a
significant run-time system to manage it all. And as a programmer,
you have to be aware that you can't access global data from different processes, in the way you can do from different threads - you can
only use data that is explicitly shared, or of appropriate data
structures (like the process-aware queues). Behind the scenes, there
is a lot of work to pass and synchronise all this using named pipes, memmapped shared files, etc. While C++ programmers are used to there
being a certain degree of "hidden work" (unlike in C, where work is
much more explicit), this kind of thing is not at all a match for the
C++ philosophy.
And there are languages like Erlang that divide everything into micro-processes, and use the same mechanisms for controlling and
passing data around regardless of whether this little processes are
in the same thread, or different threads, different OS processes, or different computers. That works because there are very narrow and
tightly controlled mechanisms for sharing data.
Note that these are both languages that run on a VM, not compiled
languages.
On Tue, 27 Oct 2026 09:06:26 +0100
David Brown <david.brown@hesbynett.no> wrote:
[snip]
And there are languages like Erlang that divide everything into
micro-processes, and use the same mechanisms for controlling and
passing data around regardless of whether this little processes are
in the same thread, or different threads, different OS processes, or
different computers. That works because there are very narrow and
tightly controlled mechanisms for sharing data.
Note that these are both languages that run on a VM, not compiled
languages.
What you wrote about Erlang resembles MPI, which of course is readily >available for many compiled or jitted languages, including Fortran, C
and C++.
I tried to utilize MPI 20 years ago, but the thinking behind it is to >different from mine, so I ran away in horror.
In article <20261027102255.00006052@yahoo.com>,
Michael S <already5chosen@yahoo.com> wrote:
On Tue, 27 Oct 2026 09:06:26 +0100
David Brown <david.brown@hesbynett.no> wrote:
[snip]
And there are languages like Erlang that divide everything into
micro-processes, and use the same mechanisms for controlling and
passing data around regardless of whether this little processes are
in the same thread, or different threads, different OS processes, or
different computers. That works because there are very narrow and
tightly controlled mechanisms for sharing data.
Note that these are both languages that run on a VM, not compiled
languages.
What you wrote about Erlang resembles MPI, which of course is readily >>available for many compiled or jitted languages, including Fortran, C
and C++.
I tried to utilize MPI 20 years ago, but the thinking behind it is to >>different from mine, so I ran away in horror.
Erlang uses the "actor" model to represent concurrency; state is
held by each actor, and actors communicate via message passing,
potentially changing state in response to messages. This is a
model for _concurrency_, in which multiple independent threads
of execution are coordinated to some in a single system.
boltar@caprica.universe wrote:
On Sun, 25 Oct 2026 14:22:34 -0700Basically that methinks you insult too much. Your wisdom here isn't
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/25/2026 1:31 AM, boltar@caprica.universe wrote:
The differences are utterly irrelevant when it comes to prividing a
common
API to the functionality but thank you for demonstrating you had no
answer
to my question.
Ummm... It is relevant. Every process has a single thread of
execution, but not all processes have multiple threads.
No shit sherlock, thanks for the heads up. Your point is?
worth a sack of beans. I haven't learned one thing from you.
On Mon, 26 Oct 2026 16:16:46 -0000 (UTC)
boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 14:41:54 GMT
scott@slp53.sl.home (Scott Lurndal) gabbled:
boltar@caprica.universe writes:
C++ threading didn't have 3 level locking until 2017 making it
effectively useless IMO. Perhaps that was down to the lowest common
denominator called Windows.
Mind defining your terminology? "3 level locking", in particular?
If you have to ask....
1. No lock
2. Write lock - Read only access, writer blocked until all readers
out of critic al section)
3. Read-write lock - all threads other than the one in section block)
Windows got Slim Reader/Writer Locks in Vista (2006-11) at the same
time as conditional variables. 5 years before C++11.
Not useless then, just less useful.
I never ever used what you call "3 level locking", not even by mistake.
But then, I don't write complicated apps on "big" computers day in day
out.
On Mon, 26 Oct 2026 09:51:51 -0000 (UTC)
boltar@caprica.universe wrote:
Go ahead and remain clueless.
system() can do most of the same things as spawn() family.
The problem with system() is not that. Often not even an efficiency.
The problem with system() identified most easily if we ask ourself "Why
do we want xyz in standard library?"
On Mon, 26 Oct 2026 10:01:55 -0000 (UTC)
boltar@caprica.universe wrote:
win32 can't do fork() making it effectively a totally useless API for
a lot of multiprocess development. Creating a brand new process is
fine if you don't need any complicated shared state such as when
kicking off something on the command line or creating a pipe
(something else win32 is shit at) but thats about it.
You are clueless about Windows. That's o.k.
Your pretense that you know something about it is not o.k.
In that regard you are not better than LDO.
On 10/26/2026 9:19 AM, boltar@caprica.universe wrote:
I'd be interested how you'd implement fork() using that method given you
need to copy the state of all file descriptors, heap, stack and global
memory, current working directory, enviroment variables and a ton of other >> things I can't remember without googling.
Why even do that? Sigh.
On Mon, 26 Oct 2026 13:10:46 -0600
Blaine <cactus_DAC@yahoo.com> gabbled:
boltar@caprica.universe wrote:
On Sun, 25 Oct 2026 14:22:34 -0700Basically that methinks you insult too much. Your wisdom here isn't
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/25/2026 1:31 AM, boltar@caprica.universe wrote:
The differences are utterly irrelevant when it comes to prividing a >>>>> common
API to the functionality but thank you for demonstrating you had no >>>>> answer
to my question.
Ummm... It is relevant. Every process has a single thread of
execution, but not all processes have multiple threads.
No shit sherlock, thanks for the heads up. Your point is?
worth a sack of beans. I haven't learned one thing from you.
Thats your problem, not mine.
On Mon, 26 Oct 2026 13:03:25 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/26/2026 3:01 AM, boltar@caprica.universe wrote:
Creating a brand new process is fine if
you don't need any complicated shared state such as when kicking off
something
on the command line or creating a pipe (something else win32 is shit
at) but
thats about it.
Shared state? Just use memory mapped files. You don't need
pipes/sockets etc. You need to know how to properly sync things.
Oh really? So you receive an incoming connection to a socket via an
accept()
call. In unix you can fork() at that point so the connecting client has a server process all to itself with all the state instantly copied from the parent process. HOw do you mimic that in windows? Start the server process from scratch and pass it a ton of state via the command line or using some roll-your-own shared memory nonsense? Give me a break. I guess in
windows it
spawns a thread leading to the issue of a single thread crashing
bringing down
the entire application - something multiprocess completely avoids.
On Mon, 26 Oct 2026 22:04:33 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Mon, 26 Oct 2026 09:51:51 -0000 (UTC)
boltar@caprica.universe wrote:
Go ahead and remain clueless.
system() can do most of the same things as spawn() family.
Rubbish, you clearly didn't bother to spend 2 mins googling.
The problem with system() is not that. Often not even an efficiency.
The problem with system() identified most easily if we ask ourself
"Why do we want xyz in standard library?"
The problem with system is its fire and forget - all you can do with
it is collect its exit code when its done. You can't communicate with
it via pipes, you can't control it via signals (well, not easily),
you can't set its process group, tty and on and on.
Oh, and it also
fires up the default shell to do the actual execution making it
hideously inefficient.
No serious unix dev uses system() unless thay
have absolutely no choice or it really is a case of "go run this, I
don't care what happens".
On Mon, 26 Oct 2026 22:09:01 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Mon, 26 Oct 2026 10:01:55 -0000 (UTC)
boltar@caprica.universe wrote:
win32 can't do fork() making it effectively a totally useless API
for a lot of multiprocess development. Creating a brand new
process is fine if you don't need any complicated shared state
such as when kicking off something on the command line or creating
a pipe (something else win32 is shit at) but thats about it.
You are clueless about Windows. That's o.k.
Your pretense that you know something about it is not o.k.
In that regard you are not better than LDO.
OK, whats the windows API call thats the equivalent of fork()? I'm not talking about CreateProcessA() which doesn't even come close.
On Mon, 26 Oct 2026 13:19:14 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/26/2026 9:19 AM, boltar@caprica.universe wrote:
I'd be interested how you'd implement fork() using that method given you >>> need to copy the state of all file descriptors, heap, stack and
global memory, current working directory, enviroment variables and a
ton of other
things I can't remember without googling.
Why even do that? Sigh.
Why don't you go and find out and educate yourself.
On Mon, 26 Oct 2026 21:45:17 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Mon, 26 Oct 2026 16:16:46 -0000 (UTC)
boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 14:41:54 GMT
scott@slp53.sl.home (Scott Lurndal) gabbled:
boltar@caprica.universe writes:
C++ threading didn't have 3 level locking until 2017 making it
effectively useless IMO. Perhaps that was down to the lowest
common denominator called Windows.
Mind defining your terminology? "3 level locking", in
particular?
If you have to ask....
1. No lock
2. Write lock - Read only access, writer blocked until all readers
out of critic al section)
3. Read-write lock - all threads other than the one in section
block)
Windows got Slim Reader/Writer Locks in Vista (2006-11) at the same
time as conditional variables. 5 years before C++11.
And unix got pthreads in 1995. Windows a decade late as usual.
On Wed, 28 Oct 2026 09:08:44 -0000 (UTC)
boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 22:09:01 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Mon, 26 Oct 2026 10:01:55 -0000 (UTC)
boltar@caprica.universe wrote:
win32 can't do fork() making it effectively a totally useless API
for a lot of multiprocess development. Creating a brand new
process is fine if you don't need any complicated shared state
such as when kicking off something on the command line or creating
a pipe (something else win32 is shit at) but thats about it.
You are clueless about Windows. That's o.k.
Your pretense that you know something about it is not o.k.
In that regard you are not better than LDO.
OK, whats the windows API call thats the equivalent of fork()? I'm not
talking about CreateProcessA() which doesn't even come close.
There is no equivalent for fork(). But nearly all things that Posix
devs achieve by fork() followed by one or another magic incantation and
then followed by exec() can be achived on Windows as well, typically by
means of one or another magic flag in parameters of CreateProcess or
of one of it's more complicated cousins (CreateProcessAsUser, >CreateProcessWithLogon, CreateProcessWithToken, may be others). These
things never fascinated me, so I am not an expert.
Now, there were cases where Unix programmers used fork() without
following it by exec(), but I would think that in the recent 25-30 years
such programming patterns are discouraged in favor of threads.
On Wed, 28 Oct 2026 08:58:55 -0000 (UTC)
boltar@caprica.universe wrote:
And unix got pthreads in 1995. Windows a decade late as usual.
That's like if I'd say that Linux is 33 years (and counting) late
because it has no QueueUserAPC(). Of course, I am smarter than saying
such nonsense.
More relevantly, Windows (Win32) has preemptive kernel-scheduled threads
+ assortment of synchronization primitives since very beginning (1993)
- ahead of many Unixen and behind some of them. Certainly ahead of
Posix standardisation of threads.
On Thu, 29 Oct 2026 00:06:45 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Wed, 28 Oct 2026 08:58:55 -0000 (UTC)
boltar@caprica.universe wrote:
And unix got pthreads in 1995. Windows a decade late as usual.
That's like if I'd say that Linux is 33 years (and counting) late
because it has no QueueUserAPC(). Of course, I am smarter than saying
such nonsense.
More relevantly, Windows (Win32) has preemptive kernel-scheduled
threads
+ assortment of synchronization primitives since very beginning
(1993)
- ahead of many Unixen and behind some of them. Certainly ahead of
Posix standardisation of threads.
Wow, pre-emptive multitasking in 1993. Incredible technology!
On Wed, 28 Oct 2026 14:09:32 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/28/2026 2:06 AM, boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 22:04:33 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Mon, 26 Oct 2026 09:51:51 -0000 (UTC)
boltar@caprica.universe wrote:
Go ahead and remain clueless.
system() can do most of the same things as spawn() family.
Rubbish, you clearly didn't bother to spend 2 mins googling.
The problem with system() is not that. Often not even an
efficiency. The problem with system() identified most easily if
we ask ourself "Why do we want xyz in standard library?"
The problem with system is its fire and forget - all you can do
with it is collect its exit code when its done. You can't
communicate with it via pipes, you can't control it via signals
(well, not easily), you can't set its
process group, tty and on and on. Oh, and it also fires up theto
default shell
do the actual execution making it hideously inefficient. No
serious unix dev uses system() unless thay have absolutely no
choice or it really is a case of
"go run this, I don't care what happens".
Right. std::system, at least when I use it, makes the caller block
until the process is done.
Thats true. Its been so long since I used it I'd forgotten about
that. Makes it even less useful.
On Thu, 29 Oct 2026 16:22:29 -0000 (UTC)
boltar@caprica.universe wrote:
On Thu, 29 Oct 2026 00:06:45 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Wed, 28 Oct 2026 08:58:55 -0000 (UTC)
boltar@caprica.universe wrote:
And unix got pthreads in 1995. Windows a decade late as usual.
That's like if I'd say that Linux is 33 years (and counting) late
because it has no QueueUserAPC(). Of course, I am smarter than saying
such nonsense.
More relevantly, Windows (Win32) has preemptive kernel-scheduled
threads
+ assortment of synchronization primitives since very beginning
(1993)
- ahead of many Unixen and behind some of them. Certainly ahead of
Posix standardisation of threads.
Wow, pre-emptive multitasking in 1993. Incredible technology!
Not just preemptive multitasking between processes, but
kernel-scheduled threads within each process as well.
Not a novel idea, but the one that eventually won over all others.
In 1993 it was already obvious that it is going to win, but in
1988-1989, when development started, it was less trivial.
On Thu, 29 Oct 2026 16:20:39 -0000 (UTC)
boltar@caprica.universe wrote:
On Wed, 28 Oct 2026 14:09:32 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/28/2026 2:06 AM, boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 22:04:33 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Mon, 26 Oct 2026 09:51:51 -0000 (UTC)
boltar@caprica.universe wrote:
Go ahead and remain clueless.
system() can do most of the same things as spawn() family.
Rubbish, you clearly didn't bother to spend 2 mins googling.
The problem with system() is not that. Often not even an
efficiency. The problem with system() identified most easily if
we ask ourself "Why do we want xyz in standard library?"
The problem with system is its fire and forget - all you can do
with it is collect its exit code when its done. You can't
communicate with it via pipes, you can't control it via signals
(well, not easily), you can't set its
process group, tty and on and on. Oh, and it also fires up theto
default shell
do the actual execution making it hideously inefficient. No
serious unix dev uses system() unless thay have absolutely no
choice or it really is a case of
"go run this, I don't care what happens".
Right. std::system, at least when I use it, makes the caller block
until the process is done.
Thats true. Its been so long since I used it I'd forgotten about
that. Makes it even less useful.
Does it block when your command processor is bash and your command
string is "my_subprocess &"?
Michael S <already5chosen@yahoo.com> writes:
On Thu, 29 Oct 2026 16:20:39 -0000 (UTC)
boltar@caprica.universe wrote:
On Wed, 28 Oct 2026 14:09:32 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/28/2026 2:06 AM, boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 22:04:33 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Mon, 26 Oct 2026 09:51:51 -0000 (UTC)
boltar@caprica.universe wrote:
Go ahead and remain clueless.
system() can do most of the same things as spawn() family.
Rubbish, you clearly didn't bother to spend 2 mins googling.
The problem with system() is not that. Often not even an
efficiency. The problem with system() identified most easily if
we ask ourself "Why do we want xyz in standard library?"
The problem with system is its fire and forget - all you can do
with it is collect its exit code when its done. You can't
communicate with it via pipes, you can't control it via signals
(well, not easily), you can't set its
process group, tty and on and on. Oh, and it also fires up theto
default shell
do the actual execution making it hideously inefficient. No
serious unix dev uses system() unless thay have absolutely no
choice or it really is a case of
"go run this, I don't care what happens".
Right. std::system, at least when I use it, makes the caller block
until the process is done.
Thats true. Its been so long since I used it I'd forgotten about
that. Makes it even less useful.
Does it block when your command processor is bash and your command
string is "my_subprocess &"?
You might need to do 'nohup my_subprocess &' if my_subprocess
doesn't intercept SIGHUP.
Michael S <already5chosen@yahoo.com> writes:
On Thu, 29 Oct 2026 16:22:29 -0000 (UTC)
boltar@caprica.universe wrote:
On Thu, 29 Oct 2026 00:06:45 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Wed, 28 Oct 2026 08:58:55 -0000 (UTC)
boltar@caprica.universe wrote:
And unix got pthreads in 1995. Windows a decade late as usual.
That's like if I'd say that Linux is 33 years (and counting) late
because it has no QueueUserAPC(). Of course, I am smarter than saying
such nonsense.
More relevantly, Windows (Win32) has preemptive kernel-scheduled
threads
+ assortment of synchronization primitives since very beginning
(1993)
- ahead of many Unixen and behind some of them. Certainly ahead of
Posix standardisation of threads.
Wow, pre-emptive multitasking in 1993. Incredible technology!
Not just preemptive multitasking between processes, but
kernel-scheduled threads within each process as well.
Not a novel idea, but the one that eventually won over all others.
In 1993 it was already obvious that it is going to win, but in
1988-1989, when development started, it was less trivial.
The thread design for SVR4 Unix started in the late 80s and
released in 1993.
Digital published "Evolving the UNIX System Interface to
Support Multithreaded Programs" September 28, 1987.
(Paul R. McJones and Garret F. Swart).
The "The Topaz Operating System User's Guide" in that document
describes the thread interface. (DIGITAL Systems Research
Center operating system) for both VAX/Ultrix and the Firefly/Taos >implementation.
Here's a link to the paper published a couple years later:
https://softwarepreservation.computerhistory.org/modula2+/doc/McJones_Swart-Evolving-1989.pdf
And here's a link to the full technical report #21 (including the manual)
https://ftp.zx.net.nz/pub/archive/gatekeeper.dec.com/pub/DEC/SRC/research-reports/SRC-021.pdf
On Thu, 29 Oct 2026 22:26:40 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
Michael S <already5chosen@yahoo.com> writes:
On Thu, 29 Oct 2026 16:20:39 -0000 (UTC)
boltar@caprica.universe wrote:
On Wed, 28 Oct 2026 14:09:32 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/28/2026 2:06 AM, boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 22:04:33 +0200to
Michael S <already5chosen@yahoo.com> gabbled:
On Mon, 26 Oct 2026 09:51:51 -0000 (UTC)
boltar@caprica.universe wrote:
Go ahead and remain clueless.
system() can do most of the same things as spawn() family.
Rubbish, you clearly didn't bother to spend 2 mins googling.
The problem with system() is not that. Often not even an
efficiency. The problem with system() identified most easily if
we ask ourself "Why do we want xyz in standard library?"
The problem with system is its fire and forget - all you can do
with it is collect its exit code when its done. You can't
communicate with it via pipes, you can't control it via signals
(well, not easily), you can't set its
process group, tty and on and on. Oh, and it also fires up the
default shell
do the actual execution making it hideously inefficient. No
serious unix dev uses system() unless thay have absolutely no
choice or it really is a case of
"go run this, I don't care what happens".
Right. std::system, at least when I use it, makes the caller block
until the process is done.
Thats true. Its been so long since I used it I'd forgotten about
that. Makes it even less useful.
Does it block when your command processor is bash and your command
string is "my_subprocess &"?
You might need to do 'nohup my_subprocess &' if my_subprocess
doesn't intercept SIGHUP.
You are likely right. Otherwise OS will kill my_subprocess at about the
same time the caller of system() gets control back.
I would not figure it out myself.
rCLThe end of software secrecy is almost upon us. The death of closed source, and the final triumph of open source. rCY -Eric S. Raymond.
In article <20261030005434.00005458@yahoo.com>,
Michael S <already5chosen@yahoo.com> wrote:
On Thu, 29 Oct 2026 22:26:40 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
Michael S <already5chosen@yahoo.com> writes:
On Thu, 29 Oct 2026 16:20:39 -0000 (UTC)
boltar@caprica.universe wrote:
On Wed, 28 Oct 2026 14:09:32 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
On 10/28/2026 2:06 AM, boltar@caprica.universe wrote:
On Mon, 26 Oct 2026 22:04:33 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Mon, 26 Oct 2026 09:51:51 -0000 (UTC)
boltar@caprica.universe wrote:
Go ahead and remain clueless.
system() can do most of the same things as spawn() family.
Rubbish, you clearly didn't bother to spend 2 mins googling.
The problem with system() is not that. Often not even an
efficiency. The problem with system() identified most
easily if we ask ourself "Why do we want xyz in standard
library?"
The problem with system is its fire and forget - all you can
do with it is collect its exit code when its done. You can't
communicate with it via pipes, you can't control it via
signals (well, not easily), you can't set its
process group, tty and on and on. Oh, and it also fires upto
the default shell
do the actual execution making it hideously inefficient. No
serious unix dev uses system() unless thay have absolutely no
choice or it really is a case of
"go run this, I don't care what happens".
Right. std::system, at least when I use it, makes the caller
block until the process is done.
Thats true. Its been so long since I used it I'd forgotten about
that. Makes it even less useful.
Does it block when your command processor is bash and your command
string is "my_subprocess &"?
You might need to do 'nohup my_subprocess &' if my_subprocess
doesn't intercept SIGHUP.
You are likely right. Otherwise OS will kill my_subprocess at about
the same time the caller of system() gets control back.
I would not figure it out myself.
Only if you intended to close the TTY the programs were started
on. Otherwise, I don't see why it would be necessary:
```
term% cat a.c
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
int
main(void)
{
struct tm *t;
time_t now = time(NULL);
printf("Starting child, time is %s", asctime(gmtime(&now)));
sleep(5);
now = time(NULL);
printf("Bye bye, now is %s", asctime(gmtime(&now)));
}
term% cat b.c
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
int
main(void)
{
time_t now = time(NULL);
printf("Parent starting, time is %s", asctime(gmtime(&now)));
system("./a &");
printf("./a started in background\n");
sleep(2);
now = time(NULL);
printf("Ahhh!!! time is %s", asctime(gmtime(&now)));
return 0;
}
term% make a
cc -O2 -pipe -o a a.c
term% make b
cc -O2 -pipe -o b b.c
term% ./b
Parent starting, time is Fri Oct 30 02:21:06 2026
./a started in background
Starting child, time is Fri Oct 30 02:21:06 2026
Ahhh!!! time is Fri Oct 30 02:21:08 2026
term% Bye bye, now is Fri Oct 30 02:21:11 2026
```
- Dan C.
On Fri, 30 Oct 2026 02:22:43 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
In article <20261030005434.00005458@yahoo.com>,
Michael S <already5chosen@yahoo.com> wrote:
On Thu, 29 Oct 2026 22:26:40 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
Michael S <already5chosen@yahoo.com> writes:
On Thu, 29 Oct 2026 16:20:39 -0000 (UTC)
[snip]
Does it block when your command processor is bash and your command
string is "my_subprocess &"?
You might need to do 'nohup my_subprocess &' if my_subprocess
doesn't intercept SIGHUP.
You are likely right. Otherwise OS will kill my_subprocess at about
the same time the caller of system() gets control back.
I would not figure it out myself.
Only if you intended to close the TTY the programs were started
on. Otherwise, I don't see why it would be necessary:
What happens when caller is GUI-style application?
--- Synchronet 3.22a-Linux NewsLink 1.2```
term% cat a.c
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
int
main(void)
{
time_t now = time(NULL);
printf("Starting child, time is %s", asctime(gmtime(&now)));
sleep(5);
now = time(NULL);
printf("Bye bye, now is %s", asctime(gmtime(&now)));
}
term% cat b.c
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
int
main(void)
{
time_t now = time(NULL);
printf("Parent starting, time is %s", asctime(gmtime(&now)));
system("./a &");
printf("./a started in background\n");
sleep(2);
now = time(NULL);
printf("Ahhh!!! time is %s", asctime(gmtime(&now)));
return 0;
}
term% make a
cc -O2 -pipe -o a a.c
term% make b
cc -O2 -pipe -o b b.c
term% ./b
Parent starting, time is Fri Oct 30 02:21:06 2026
./a started in background
Starting child, time is Fri Oct 30 02:21:06 2026
Ahhh!!! time is Fri Oct 30 02:21:08 2026
term% Bye bye, now is Fri Oct 30 02:21:11 2026
```
On Thu, 29 Oct 2026 16:22:29 -0000 (UTC)
boltar@caprica.universe wrote:
On Thu, 29 Oct 2026 00:06:45 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Wed, 28 Oct 2026 08:58:55 -0000 (UTC)
boltar@caprica.universe wrote:
And unix got pthreads in 1995. Windows a decade late as usual.
That's like if I'd say that Linux is 33 years (and counting) late
because it has no QueueUserAPC(). Of course, I am smarter than saying
such nonsense.
More relevantly, Windows (Win32) has preemptive kernel-scheduled
threads
+ assortment of synchronization primitives since very beginning
(1993)
- ahead of many Unixen and behind some of them. Certainly ahead of
Posix standardisation of threads.
Wow, pre-emptive multitasking in 1993. Incredible technology!
Not just preemptive multitasking between processes, but
kernel-scheduled threads within each process as well.
Not a novel idea, but the one that eventually won over all others.
In 1993 it was already obvious that it is going to win, but in
1988-1989, when development started, it was less trivial.
The OS will not kill your program when the shell started by
`system` exits or anything;
nor will the shell itself.
In article <20261030105900.000020ce@yahoo.com>,
Michael S <already5chosen@yahoo.com> wrote:
Only if you intended to close the TTY the programs were started
on. Otherwise, I don't see why it would be necessary:
What happens when caller is GUI-style application?
That depends on a number of factors, but basically, "it does the
same thing". Why would it be any different?
On Fri, 30 Oct 2026 11:25:01 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <20261030105900.000020ce@yahoo.com>,
Michael S <already5chosen@yahoo.com> wrote:
Only if you intended to close the TTY the programs were started
on. Otherwise, I don't see why it would be necessary:
What happens when caller is GUI-style application?
That depends on a number of factors, but basically, "it does the
same thing". Why would it be any different?
Windows treats GUI apps entirely differently to console ones so a Windows
dev might not appreciate that on unix there is no demarcation - a GUI app simply has a network connection to the X server and it can either sit in
an event loop waiting for events - as per a windows main thread - or go do other things and periodically check the X event list.
That's where threads are useful: The GUI is one thread, and the
"other things" are in one or more other threads. There are
altogether too many programs that hang the GUI while "other things"
are going on. That should never happen!
Threading is still definitely useful, mainly for performance, where
the bottleneck is in CPU usage. But if a program is spending most of
its time waiting for I/O over the network, or for a user to initiate a
GUI action, or something external and relatively slow like that, then coroutines keep things simpler.
I've always tried to avoid the complexities of threading; in most
cases I can get away with round-robin scheduling. But I found that
some servers are very slow to respond, and even when trying to do a non-blocking setup of a TCP/IP connection, the connect() API would unavoidably block. I had to spin that part off into its own thread
to keep the rest of the program (including other connections) from
hanging.
On 10/30/26 17:07, boltar@caprica.universe wrote:
On Fri, 30 Oct 2026 11:25:01 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) gabbled:
In article <20261030105900.000020ce@yahoo.com>,
Michael S <already5chosen@yahoo.com> wrote:
Only if you intended to close the TTY the programs were started
on. Otherwise, I don't see why it would be necessary:
What happens when caller is GUI-style application?
That depends on a number of factors, but basically, "it does the
same thing". Why would it be any different?
Windows treats GUI apps entirely differently to console ones so a Windows
dev might not appreciate that on unix there is no demarcation - a GUI app
simply has a network connection to the X server and it can either sit in
an event loop waiting for events - as per a windows main thread - or go do >> other things and periodically check the X event list.
That's where threads are useful: The GUI is one thread, and the "other >things" are in one or more other threads. There are altogether too many >programs that hang the GUI while "other things" are going on. That
should never happen!
On Sat, 31 Oct 2026 05:37:23 -0000 (UTC)On what planet?
Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> gabbled:
HererCOs a fun little thing: if you set a socket to nonblocking and
then do the connect(2) call, it will seemingly fail with an
EINPROGRESS error. But in fact, the connection attempt gets
initiated, and you can monitor its subsequent progress from your
event loop.
Far too many devs don't know about or don't understand multiplexing
using select() or poll(). Admittedly these are borked on Windows as
you can't use sockets with them
which is their main raison d'etre,
but on unix they're a very powerful tool. For simple servers with a
low workload they can allow single threaded development simplifying
the code immensely.
On Sat, 31 Oct 2026 09:47:42 -0000 (UTC)
boltar@caprica.universe wrote:
On Sat, 31 Oct 2026 05:37:23 -0000 (UTC)
Lawrence =3D?iso-8859-13?q?D=3DFFOliveiro?=3D <ldo@nz.invalid> gabbled:
Here=E2=80=99s a fun little thing: if you set a socket to nonblocking and >> >then do the connect(2) call, it will seemingly fail with an=20
EINPROGRESS error. But in fact, the connection attempt gets
initiated, and you can monitor its subsequent progress from your
event loop. =20
Far too many devs don't know about or don't understand multiplexing
using select() or poll(). Admittedly these are borked on Windows as
you can't use sockets with them=20
On what planet?
On Sat, 31 Oct 2026 04:14:05 GMT, Charlie Gibbs wrote:
I've always tried to avoid the complexities of threading; in most
cases I can get away with round-robin scheduling. But I found that
some servers are very slow to respond, and even when trying to do a
non-blocking setup of a TCP/IP connection, the connect() API would
unavoidably block. I had to spin that part off into its own thread
to keep the rest of the program (including other connections) from
hanging.
HererCOs a fun little thing: if you set a socket to nonblocking and then
do the connect(2) call, it will seemingly fail with an EINPROGRESS
error. But in fact, the connection attempt gets initiated, and you can monitor its subsequent progress from your event loop.
From the ERRORS section of <https://manpages.debian.org/connect(2)>:
EINPROGRESS
The socket is nonblocking and the connection cannot be
completed immediately. (UNIX domain sockets failed with EAGAIN
instead.) It is possible to select(2) or poll(2) for
completion by selecting the socket for writing. After
select(2) indicates writability, use getsockopt(2) to read the
SO_ERROR option at level SOL_SOCKET to determine whether
connect() completed successfully (SO_ERROR is zero) or
unsuccessfully (SO_ERROR is one of the usual error codes
listed here, explaining the reason for the failure).
IrCOm not sure about doing this sort of thing from other libraries that
wrap socket connections (e.g. SSL/TLS libraries); for these, the usual fallback is still available, as you say, by turning a blocking call
into a nonblocking one by pushing it off to a separate thread.
On Sat, 31 Oct 2026 19:56:10 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sat, 31 Oct 2026 09:47:42 -0000 (UTC)
boltar@caprica.universe wrote:
On Sat, 31 Oct 2026 05:37:23 -0000 (UTC)
Lawrence =3D?iso-8859-13?q?D=3DFFOliveiro?=3D <ldo@nz.invalid>
gabbled:
Here=E2=80=99s a fun little thing: if you set a socket to=20
nonblocking and then do the connect(2) call, it will seemingly
fail with an EINPROGRESS error. But in fact, the connection
attempt gets initiated, and you can monitor its subsequent
progress from your event loop. =20
Far too many devs don't know about or don't understand multiplexing
using select() or poll(). Admittedly these are borked on Windows as
you can't use sockets with them=20
On what planet?
On this one where you see code that is only multithreaded in order to
serve individual sockets, not because it needs to be.
rCLThe end of software secrecy is almost upon us. The death of closed source, and the final triumph of open source. rCY -Eric S. Raymond.I have provided Claude Code with snippets of coderCoroughly a screen's
-a-a https://www.battleswarmblog.com/?p=73639
"I should have realized this a few months ago when I successfully
decompiled the game of Firefighter from an ancient DOS shareware binary.
My robot friend was able to tell it had been written in Borland Pascal
from looking at the data layout; it gave me back very readable Pascal
code with sensibly chosen function and variable names. I transpiled it
to Rust and now ship it as part of my heritage games collection."
Huh, so somebody has actually built a decent decompiler.-a Why do I doubt this even though ESR says otherwise?
And he has a translator from Borland Pascal to Rust?
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in order to
serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines. Or able,
but don't like them.
It has nothing to do with availability and functionality of select/poll
on Windows.
On Sun, 1 Nov 2026 21:59:41 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in order to
serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines. Or able,
but don't like them.
It has nothing to do with availability and functionality of select/poll
on Windows.
Last time I had the misfortune to use win32 it couldn't multiplex on sockets.
On Sun, 1 Nov 2026 21:59:41 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in order
to serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines. Or
able, but don't like them.
It has nothing to do with availability and functionality of
select/poll on Windows.
Last time I had the misfortune to use win32 it couldn't multiplex on
sockets.
On 2026-10-31, Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
On Sat, 31 Oct 2026 04:14:05 GMT, Charlie Gibbs wrote:
I've always tried to avoid the complexities of threading; in most
cases I can get away with round-robin scheduling. But I found that
some servers are very slow to respond, and even when trying to do a
non-blocking setup of a TCP/IP connection, the connect() API would
unavoidably block. I had to spin that part off into its own thread
to keep the rest of the program (including other connections) from
hanging.
HererCOs a fun little thing: if you set a socket to nonblocking and then
do the connect(2) call, it will seemingly fail with an EINPROGRESS
error. But in fact, the connection attempt gets initiated, and you can
monitor its subsequent progress from your event loop.
From the ERRORS section of <https://manpages.debian.org/connect(2)>:
EINPROGRESS
The socket is nonblocking and the connection cannot be
completed immediately. (UNIX domain sockets failed with EAGAIN
instead.) It is possible to select(2) or poll(2) for
completion by selecting the socket for writing. After
select(2) indicates writability, use getsockopt(2) to read the
SO_ERROR option at level SOL_SOCKET to determine whether
connect() completed successfully (SO_ERROR is zero) or
unsuccessfully (SO_ERROR is one of the usual error codes
listed here, explaining the reason for the failure).
IrCOm not sure about doing this sort of thing from other libraries that
wrap socket connections (e.g. SSL/TLS libraries); for these, the usual
fallback is still available, as you say, by turning a blocking call
into a nonblocking one by pushing it off to a separate thread.
I was already setting the socket to non-blocking before calling
connect() - and yet there were times when the API blocked anyway.
I never did figure out why, and we had a customer getting impatient,
so I just spun off another thread and moved on to other things.
On 11/1/2026 11:40 AM, Charlie Gibbs wrote:
I was already setting the socket to non-blocking before calling
connect() - and yet there were times when the API blocked anyway.
I never did figure out why, and we had a customer getting impatient,
so I just spun off another thread and moved on to other things.
connect? On Windows we use ConnectEx.
https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nc-mswsock-lpfn_connectex
For accept, AcceptEx:
https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-acceptex
On 2026-11-02, Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
On 11/1/2026 11:40 AM, Charlie Gibbs wrote:
I was already setting the socket to non-blocking before calling
connect() - and yet there were times when the API blocked anyway.
I never did figure out why, and we had a customer getting impatient,
so I just spun off another thread and moved on to other things.
connect? On Windows we use ConnectEx.
https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nc-mswsock-lpfn_connectex
For accept, AcceptEx:
https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-acceptex
Ah, but then we come to that critical clause:
Note This function is a Microsoft-specific extension to the Windows Sockets specification.
Yes, one more attempt to close the open socket model with
Microsoft proprietary extensions. My code has to run under
Linux as well. Opening the socket in a separate thread is
guaranteed to avoid hangs, regardless of operating system.
On 2026-11-02, Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
On 11/1/2026 11:40 AM, Charlie Gibbs wrote:
I was already setting the socket to non-blocking before calling
connect() - and yet there were times when the API blocked anyway.
I never did figure out why, and we had a customer getting impatient,
so I just spun off another thread and moved on to other things.
connect? On Windows we use ConnectEx.
https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nc-mswsock-lpfn_connectex
For accept, AcceptEx:
https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-acceptex
Ah, but then we come to that critical clause:
Note This function is a Microsoft-specific extension to the Windows Sockets specification.
Yes, one more attempt to close the open socket model with
Microsoft proprietary extensions. My code has to run under
Linux as well. Opening the socket in a separate thread is
guaranteed to avoid hangs, regardless of operating system.
On 11/2/2026 6:42 PM, Charlie Gibbs wrote:
On 2026-11-02, Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
On 11/1/2026 11:40 AM, Charlie Gibbs wrote:
I was already setting the socket to non-blocking before calling
connect() - and yet there were times when the API blocked anyway.
I never did figure out why, and we had a customer getting impatient,
so I just spun off another thread and moved on to other things.
connect? On Windows we use ConnectEx.
https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nc-mswsock-lpfn_connectex
For accept, AcceptEx:
https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-acceptex
Ah, but then we come to that critical clause:
Note This function is a Microsoft-specific extension to the Windows Sockets specification.
Yes, one more attempt to close the open socket model with
Microsoft proprietary extensions. My code has to run under
Linux as well. Opening the socket in a separate thread is
guaranteed to avoid hangs, regardless of operating system.
These are for high performance systems. But, they solve a lot of
problems. Say your program starts to gain a lot of users?
On 11/2/2026 1:46 PM, Michael S wrote:
On Mon, 2 Nov 2026 15:43:42 -0000 (UTC)
boltar@caprica.universe wrote:
On Sun, 1 Nov 2026 21:59:41 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in
order to serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines. Or
able, but don't like them.
It has nothing to do with availability and functionality of
select/poll on Windows.
Last time I had the misfortune to use win32 it couldn't multiplex
on sockets.
That's nonsense. That part of Winsock2 API did not change since
1993. That is, in early 2000s they added poll() (WAASAPoll), but
select() is the same BSD select() from the very beginning, just a
little easier to use than original, because nfds is DNC.
Now, if you woulds say that on Winsock2 select() can't multiplex
waiting for socket I/O with waiting for other sorts of I/O (files
and pipes) then your statement would make more sense*.
But it does not sound like you really want to make sense. You
strongly prefer mindless bashing.
----
* - Although,
1) of course, there (in Win32) exist not too complicated alternative methods to achieve such multiplexing as well. Just not via select().
2) today, with nearly all file I/O deeply cached, multiplexing
waiting for file I/O with waiting for sockets is a bad idea. OTOH, Multiplexing sockets with pipes could still make sense,
infrequently.
Have you ever used IOCP on windows?
On 2026-11-02, boltar@caprica.universe <boltar@caprica.universe> wrote:
On Sun, 1 Nov 2026 21:59:41 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in order to
serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines. Or able,
but don't like them.
It has nothing to do with availability and functionality of select/poll
on Windows.
Last time I had the misfortune to use win32 it couldn't multiplex on sockets.
By "multiplex on sockets" do you mean supporting more then one connection
on a single socket? Serious question here: could you tell me how this can
be useful?
On Mon, 2 Nov 2026 15:43:42 -0000 (UTC)
boltar@caprica.universe wrote:
Last time I had the misfortune to use win32 it couldn't multiplex on
sockets.
That's nonsense. That part of Winsock2 API did not change since 1993.
That is, in early 2000s they added poll() (WAASAPoll), but select() is
the same BSD select() from the very beginning, just a little easier to
use than original, because nfds is DNC.
Now, if you woulds say that on Winsock2 select() can't multiplex
waiting for socket I/O with waiting for other sorts of I/O (files and
pipes) then your statement would make more sense*.
2) today, with nearly all file I/O deeply cached, multiplexing waiting
for file I/O with waiting for sockets is a bad idea. OTOH, Multiplexing >sockets with pipes could still make sense, infrequently.
On Mon, 02 Nov 2026 16:51:47 GMT
Charlie Gibbs <cgibbs@kltpzyxm.invalid> gabbled:
On 2026-11-02, boltar@caprica.universe <boltar@caprica.universe> wrote:
On Sun, 1 Nov 2026 21:59:41 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in order to >>>>> serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines. Or able, >>>> but don't like them.
It has nothing to do with availability and functionality of select/poll >>>> on Windows.
Last time I had the misfortune to use win32 it couldn't multiplex on sockets.
By "multiplex on sockets" do you mean supporting more then one connection
on a single socket? Serious question here: could you tell me how this can >> be useful?
No I don't mean that and I can't be bother explaining what multiplexing means to someone who's clearly never used it.
On Mon, 26 Oct 2026 19:51:23 -0700, Chris M. Thomasson wrote:
On 10/23/2026 8:39 PM, Lawrence DrCOOliveiro wrote:
On Fri, 23 Oct 2026 16:58:04 -0700, Chris M. Thomasson wrote:
Keeping them up to date is, afaict, manual.
In the Linux world, we have rCLdevelopmentrCY packages versus rCLruntimerCY >>> packages.
The development package contains the source includes, pkg-config
info etc. The runtime version includes the actual shared library.
So your built package has a dependency on the latter; when a user
tries to install your package, it should automatically pull in the
latter as necessary.
Example from my system:
lrwxrwxrwx 1 root root 13 Apr 24 2026 /usr/lib/x86_64-linux-gnu/libcairo.so -> libcairo.so.2
lrwxrwxrwx 1 root root 21 Apr 24 2026 /usr/lib/x86_64-linux-gnu/libcairo.so.2 -> libcairo.so.2.11804.4
-rw-r--r-- 1 root root 1366728 Apr 24 2026 /usr/lib/x86_64-linux-gnu/libcairo.so.2.11804.4
Where did these come from?
root@theon:~ # dpkg-query -S /usr/lib/x86_64-linux-gnu/libcairo.so.2 >>> libcairo2:amd64: /usr/lib/x86_64-linux-gnu/libcairo.so.2
root@theon:~ # dpkg-query -S /usr/lib/x86_64-linux-gnu/libcairo.so
libcairo2-dev:amd64: /usr/lib/x86_64-linux-gnu/libcairo.so
Notice how the development library is not versioned, but is just a
symlink to a versioned library.
The runtime library is always versioned. This allows multiple
versions of the library to be present at once, with some older
packages, that havenrCOt been rebuilt, still depending on an older
version, while up-to-date packages make use of the newer version.
I was in the linux world for a whiel, along with solaris, etc. But
Windows, oh my. vcpkg is a big turn.
Windows isnrCOt even in the same league, is it.
On 11/4/26 09:48, boltar@caprica.universe wrote:
On Mon, 02 Nov 2026 16:51:47 GMT
Charlie Gibbs <cgibbs@kltpzyxm.invalid> gabbled:
On 2026-11-02, boltar@caprica.universe <boltar@caprica.universe> wrote:
On Sun, 1 Nov 2026 21:59:41 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in order to >>>>>> serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines. Or able, >>>>> but don't like them.
It has nothing to do with availability and functionality of select/poll >>>>> on Windows.
Last time I had the misfortune to use win32 it couldn't multiplex on >sockets.
By "multiplex on sockets" do you mean supporting more then one connection >>> on a single socket? Serious question here: could you tell me how this can >>> be useful?
No I don't mean that and I can't be bother explaining what multiplexing means
to someone who's clearly never used it.
Don't be so smug. You could at least give him a hint.
If you bother enough to reply, you might as well show
that you know.
On Wed, 4 Nov 2026 11:24:54 +0100
Jeroen Belleman <jeroen@nospam.please> gabbled:
On 11/4/26 09:48, boltar@caprica.universe wrote:
On Mon, 02 Nov 2026 16:51:47 GMTsockets.
Charlie Gibbs <cgibbs@kltpzyxm.invalid> gabbled:
On 2026-11-02, boltar@caprica.universe <boltar@caprica.universe> wrote: >>>>
On Sun, 1 Nov 2026 21:59:41 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in
order to
serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines. Or >>>>>> able,
but don't like them.
It has nothing to do with availability and functionality of
select/poll
on Windows.
Last time I had the misfortune to use win32 it couldn't multiplex on
By "multiplex on sockets" do you mean supporting more then one
connection
on a single socket?-a Serious question here: could you tell me how
this can
be useful?
No I don't mean that and I can't be bother explaining what
multiplexing means
to someone who's clearly never used it.
Don't be so smug. You could at least give him a hint.
If you bother enough to reply, you might as well show
that you know.
Right, because typing "IO multiplexing" into google or an AI is such an arduous task.
On 11/4/26 17:24, boltar@caprica.universe wrote:Unless you didn't pay attention yet, boltar is asshole and proud at
On Wed, 4 Nov 2026 11:24:54 +0100
Jeroen Belleman <jeroen@nospam.please> gabbled:
On 11/4/26 09:48, boltar@caprica.universe wrote:
On Mon, 02 Nov 2026 16:51:47 GMTsockets.
Charlie Gibbs <cgibbs@kltpzyxm.invalid> gabbled:
On 2026-11-02, boltar@caprica.universe <boltar@caprica.universe>
wrote:
On Sun, 1 Nov 2026 21:59:41 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in
order to
serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines.
Or able,
but don't like them.
It has nothing to do with availability and functionality of
select/poll
on Windows.
Last time I had the misfortune to use win32 it couldn't
multiplex on
By "multiplex on sockets" do you mean supporting more then one
connection
on a single socket?a Serious question here: could you tell me
how this can
be useful?
No I don't mean that and I can't be bother explaining what
multiplexing means
to someone who's clearly never used it.
Don't be so smug. You could at least give him a hint.
If you bother enough to reply, you might as well show
that you know.
Right, because typing "IO multiplexing" into google or an AI is
such an arduous task.
That's fine too, as a hint, no issue there.
'Multiplexing' is a copiously overloaded concept, so a little
bit of help to steer him into the right direction is not out
of place.
Let's leave it at that.
Jeroen Belleman
On Wed, 4 Nov 2026 23:53:55 +0100
Jeroen Belleman <jeroen@nospam.please> wrote:
'Multiplexing' is a copiously overloaded concept, so a little
bit of help to steer him into the right direction is not out
of place.
=20
Let's leave it at that.
=20
Jeroen Belleman
Unless you didn't pay attention yet, boltar is asshole and proud at
that.
Or arshole? I'm not sure what is a correct spelling in his area.
On Mon, 2 Nov 2026 15:43:42 -0000 (UTC)
boltar@caprica.universe wrote:
On Sun, 1 Nov 2026 21:59:41 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in order
to serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines. Or
able, but don't like them.
It has nothing to do with availability and functionality of
select/poll on Windows.
Last time I had the misfortune to use win32 it couldn't multiplex on
sockets.
That's nonsense. That part of Winsock2 API did not change since 1993.
That is, in early 2000s they added poll() (WAASAPoll), but select() is
the same BSD select() from the very beginning, just a little easier to
use than original, because nfds is DNC.
Now, if you woulds say that on Winsock2 select() can't multiplex
waiting for socket I/O with waiting for other sorts of I/O (files and
pipes) then your statement would make more sense*.
But it does not sound like you really want to make sense. You strongly
prefer mindless bashing.
----
* - Although,
1) of course, there (in Win32) exist not too complicated alternative
methods to achieve such multiplexing as well. Just not via select().
2) today, with nearly all file I/O deeply cached, multiplexing waiting
for file I/O with waiting for sockets is a bad idea. OTOH, Multiplexing sockets with pipes could still make sense, infrequently.
On 2026-11-03, Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
On 11/2/2026 6:42 PM, Charlie Gibbs wrote:
On 2026-11-02, Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote: >>>
On 11/1/2026 11:40 AM, Charlie Gibbs wrote:
I was already setting the socket to non-blocking before calling
connect() - and yet there were times when the API blocked anyway.
I never did figure out why, and we had a customer getting impatient, >>>>> so I just spun off another thread and moved on to other things.
connect? On Windows we use ConnectEx.
https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nc-mswsock-lpfn_connectex
For accept, AcceptEx:
https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-acceptex
Ah, but then we come to that critical clause:
Note This function is a Microsoft-specific extension to the Windows Sockets specification.
Yes, one more attempt to close the open socket model with
Microsoft proprietary extensions. My code has to run under
Linux as well. Opening the socket in a separate thread is
guaranteed to avoid hangs, regardless of operating system.
These are for high performance systems. But, they solve a lot of
problems. Say your program starts to gain a lot of users?
In our environment that should never happen.
The only legitimate
users are those that are other elements of our software package.
Any others (or too many seemingly legitimate users) get a rejection
message, followed by disconnection.
In comp.lang.c++ Michael S <already5chosen@yahoo.com> wrote:
* - Although,
1) of course, there (in Win32) exist not too complicated alternative
methods to achieve such multiplexing as well. Just not via select().
2) today, with nearly all file I/O deeply cached, multiplexing waiting
for file I/O with waiting for sockets is a bad idea. OTOH, Multiplexing
sockets with pipes could still make sense, infrequently.
Just curious how you solve problem of blocking in single threaded
program? AFAIK to get data from disc one needs about 10ms or possibly
more, which is pretty long time on modern machines. Do you assume
that all data that you need is in RAM (or will be after short startup
time)?
In comp.lang.c++ Michael S <already5chosen@yahoo.com> wrote:
On Mon, 2 Nov 2026 15:43:42 -0000 (UTC)
boltar@caprica.universe wrote:
On Sun, 1 Nov 2026 21:59:41 +0200
Michael S <already5chosen@yahoo.com> gabbled:
On Sun, 1 Nov 2026 08:32:42 -0000 (UTC)
boltar@caprica.universe wrote:
On this one where you see code that is only multithreaded in
order to serve individual sockets, not because it needs to be.
That's because many people unable to implement state machines. Or
able, but don't like them.
It has nothing to do with availability and functionality of
select/poll on Windows.
Last time I had the misfortune to use win32 it couldn't multiplex
on sockets.
That's nonsense. That part of Winsock2 API did not change since
1993. That is, in early 2000s they added poll() (WAASAPoll), but
select() is the same BSD select() from the very beginning, just a
little easier to use than original, because nfds is DNC.
Now, if you woulds say that on Winsock2 select() can't multiplex
waiting for socket I/O with waiting for other sorts of I/O (files
and pipes) then your statement would make more sense*.
But it does not sound like you really want to make sense. You
strongly prefer mindless bashing.
----
* - Although,
1) of course, there (in Win32) exist not too complicated alternative methods to achieve such multiplexing as well. Just not via select().
2) today, with nearly all file I/O deeply cached, multiplexing
waiting for file I/O with waiting for sockets is a bad idea. OTOH, Multiplexing sockets with pipes could still make sense,
infrequently.
Just curious how you solve problem of blocking in single threaded
program?
AFAIK to get data from disc one needs about 10ms or possibly
more, which is pretty long time on modern machines.
Do you assume
that all data that you need is in RAM (or will be after short startup
time)?
On Sat, 7 Nov 2026 01:17:19 -0000 (UTC)
antispam@fricas.org (Waldek Hebisch) wrote:
Just curious how you solve problem of blocking in single threaded
program?
I don't.
If it is important and I expect that file operation will take
significant time then I do it in another thread.
AFAIK to get data from disc one needs about 10ms or possibly
more, which is pretty long time on modern machines.
I absolutly do not care about spinning rust. For close to 15 years.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 76 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 54:18:32 |
| Calls: | 1,265 |
| Calls today: | 1 |
| Files: | 1,362 |
| D/L today: |
3 files (2,684K bytes) |
| Messages: | 285,563 |