Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 147098 Details for
Bug 226745
unkillable processes in D and T states
[?]
New
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.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Parent in D-state, child is TASK_STOPPED
expl_zap1.c (text/plain), 1.09 KB, created by
Alexey Dobriyan
on 2007-02-01 13:45:25 UTC
(
hide
)
Description:
Parent in D-state, child is TASK_STOPPED
Filename:
MIME Type:
Creator:
Alexey Dobriyan
Created:
2007-02-01 13:45:25 UTC
Size:
1.09 KB
patch
obsolete
>/* > * So we are doing force_sig_specific(SIGKILL, p) + __ptrace_unlink(p). > * Neither of them clears ->exit_code or SIGNAL_STOP_DEQUEUED, if 'p' > * did ptrace_stop() it goes to do_signal_stop() and this program hangs. > * > * Parent sleeps in 'D' state, child is TASK_STOPPED, you need to SIGKILL > * the child manually. > */ > >#include <errno.h> >#include <stdio.h> >#include <signal.h> >#include <string.h> >#include <stdlib.h> >#include <unistd.h> >#include <pthread.h> >#include <sys/wait.h> >#include <sys/ptrace.h> >#include <sys/syscall.h> > >void die(const char *msg) >{ > printf("ERR!! %s: %s\n", msg, strerror(errno)); > exit(-1); >} > >#define clone_vm(func, stack) \ >({ \ > int pid = clone(func, stack + sizeof(stack) / 2, \ > CLONE_VM, NULL); \ > \ > if (pid < 0) \ > die("clone"); \ > \ > pid; \ >}) > >char child_stack[4096]; > >int child_func(void *arg) >{ > return pause(); >} > >int main(void) >{ > int pid = clone_vm(child_func, child_stack); > > if (ptrace(PTRACE_ATTACH, pid, NULL, 0)) > die("ptrace"); > > usleep(100000); // wait4 doesn't like WNOWAIT > > kill(getpid(), SIGQUIT); > > 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 226745
: 147098