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 315854 Details for
Bug 461246
RHEL4 64 bit skips all pids with bit 15 set (32768-65535, 98304-131071 etc)
[?]
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.
pid sequence check program
pidseqchk.c (text/plain), 1.13 KB, created by
Martin Poole
on 2008-09-05 10:16:45 UTC
(
hide
)
Description:
pid sequence check program
Filename:
MIME Type:
Creator:
Martin Poole
Created:
2008-09-05 10:16:45 UTC
Size:
1.13 KB
patch
obsolete
> >#include <stdio.h> >#include <time.h> >#include <errno.h> >#include <string.h> >#include <sys/types.h> >#include <unistd.h> >#include <sched.h> >#include <sys/types.h> >#include <sys/wait.h> > >static void >waitem( pid_t low, pid_t high ) >{ > do > { > waitpid( low, NULL, 0 ); > }while (high > low++); > return; >} > >int >main( int argc, char *argv[] ) >{ > int i, count = 200000; > > pid_t low = 0, new = 0, last = 0; >/* struct timespec nap; > > nap.tv_sec = 0; > nap.tv_nsec = 20000000; */ > > while( count-- ) > { > new = fork(); > if (new < 0) > { > /* failed */ > fprintf( stderr, "fork failed: %d/%s\n", errno, strerror(errno) ); > waitem( low, last ); > }else if( new == 0 ) > { > /* just die */ > return 0; > }else > { > /* main sequence */ > if (low == 0) > { > /* first time around, just set things up */ > low = new; > }else if ( (last+1) != new ) > { > /* discontinuity */ > fprintf( stderr, "sequence break: %d - %d (new %d)\n", > low, last, new ); > waitem( low, last ); > low = new; > } > last = new; > sched_yield(); > } > } > fprintf( stderr, "last sequence: %d - %\n", low, last ); > 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 461246
: 315854