Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 580218 Details for
Bug 585843
lsof does not spot files open by a thread which does not share its father's fd table
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
Reproducer (fixed)
clonenofd.c (text/x-csrc), 843 bytes, created by
Jerome Marchand
on 2012-04-25 16:47:13 UTC
(
hide
)
Description:
Reproducer (fixed)
Filename:
MIME Type:
Creator:
Jerome Marchand
Created:
2012-04-25 16:47:13 UTC
Size:
843 bytes
patch
obsolete
>#define _GNU_SOURCE > >#include <stdio.h> >#include <unistd.h> >#include <stdlib.h> >#include <signal.h> >#include <linux/unistd.h> >#include <sched.h> > > >#define NAMELEN 32 >#define STACKSZ 64*1024 >#define OFFSET 64 > >int opentmpfile(char *fname) { > sprintf(fname, "/tmp/foo.XXXXXX"); > return mkstemp(fname); >} > > >int thread_function (void *arg) { > int fd; > char fname[NAMELEN]; > > fd = opentmpfile(fname); > lseek(fd, OFFSET, SEEK_SET); > sleep(100); > unlink(fname); > > return 0; >} > >int main () { > int pid, tid; > char *stack; > > pid = getpid(); > printf("I'm PID %i\n", pid); > > stack = malloc(STACKSZ); > tid = clone(&thread_function, stack + STACKSZ, > SIGCHLD | CLONE_THREAD | CLONE_SIGHAND | CLONE_VM, NULL); > if(tid == -1) > perror("clone failed"); > printf("tid = %i\n", tid); > > sleep(101); > syscall(__NR_tgkill, pid, tid, SIGKILL); > > return 0; >} >
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 585843
:
409106
| 580218