FreeBSD Bugzilla – Attachment 158169 Details for
Bug 201207
devel/gdb: Duplicate thread listing when attaching to running multithreaded program
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Simple 2 threaded program
threads.c (text/x-csrc), 461 bytes, created by
Eric Badger
on 2015-06-29 18:43:43 UTC
(
hide
)
Description:
Simple 2 threaded program
Filename:
MIME Type:
Creator:
Eric Badger
Created:
2015-06-29 18:43:43 UTC
Size:
461 bytes
patch
obsolete
>#include <stdio.h> >#include <pthread.h> >#include <pthread_np.h> >#include <sys/types.h> >#include <unistd.h> > >void * thread(void *arg) >{ > long num = (long)arg; > pthread_set_name_np(pthread_self(), "otherthread"); > printf("Thread %ld\n", num); > sleep(30); > return NULL; >} > >int main() >{ > pthread_set_name_np(pthread_self(), "main"); > printf("%d\n", getpid()); > pthread_t t; > pthread_create(&t, NULL, thread, (void*)1); > > sleep(100); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 201207
: 158169 |
163019
|
165188
|
165447
|
165834
|
165924
|
165926
|
166037