Re: Running an old threads app on a current system



I demand that Kenny McCormack may or may not have written...

[snip]
Now, I'm running the app on a new system, which is, I believe, running
"Posix threads", and have noticed that you no longer have multiple
processes running. I find this surprising; I had assumed you had to
recompile it in order to make it run with Posix threads. But, it seems to
"just work".

Presumably it's already linked against libpthread.

But what I find really strange is the output of "pstree", which is like
this:

myapp(2551)---{myapp}(2563)

2551 is the pid of myapp (the only one). There is no process 2563.
So, what's up with that?

Isn't there?
$ ls /proc/2551/task
$ ps -o pid,tid,tname,stat,time,cmd m 2551

--
| Darren Salt | linux or ds at | nr. Ashington, | Toon
| RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army
| Let's keep the pound sterling

"Cybermen plus Daleks. Together we could upgrade the universe."
.



Relevant Pages

  • Re: global interpreter lock
    ... > Bryan Olson wrote:>>For a long time,>>the most sophisticated software services generally have used>>multiple lines of execution, and now that's mostly in the form>>of threads. ... Posix threads, and Microsoft's Win32 threads. ...
    (comp.lang.python)
  • Re: threads
    ... > POSIX process signal handling. ... > - getpid() returns the same value in all threads. ... Which means it is NOT an implementation of POSIX Threads! ...
    (comp.unix.programmer)
  • Re: threads and sleep?
    ... >> multiple contexts: one for each thread (and possibly one ... > multiple stacks, therefore multiple contexts and yes, by this ... I assumed that CPython used Posix threads on Posix ...
    (comp.lang.python)
  • Re: Running an old threads app on a current system
    ... "Posix threads", and have noticed that you no longer have multiple ... processes running. ... I find this surprising; I had assumed you had to ... Presumably it's already linked against libpthread. ...
    (comp.os.linux.misc)