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 310594 Details for
Bug 452693
POSIX timer set to fire immediately does not fire
[?]
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.
updated reproducer for timer_settime(3p) problem
bz452693_v1.c (text/x-csrc), 1.08 KB, created by
Clark Williams
on 2008-06-30 15:50:37 UTC
(
hide
)
Description:
updated reproducer for timer_settime(3p) problem
Filename:
MIME Type:
Creator:
Clark Williams
Created:
2008-06-30 15:50:37 UTC
Size:
1.08 KB
patch
obsolete
>#include <stdio.h> >#include <stdlib.h> >#include <errno.h> >#include <signal.h> >#include <memory.h> >#include <time.h> >#include <sys/time.h> > >#define CLOCKID CLOCK_MONOTONIC >#define SIGNUM SIGUSR1 > >int signaled = 0; > >void handler(int sig) >{ > // printf("got signal %d\n", sig); > if (sig == SIGNUM) > signaled = 1; >} > >int >main(int argc, char **argv) >{ > timer_t mytimer; > struct timespec t; > struct itimerspec it; > struct sigevent ev; > > // setup a timer > memset(&ev, 0, sizeof(ev)); > ev.sigev_notify = SIGEV_SIGNAL; > ev.sigev_signo = SIGNUM; > ev.sigev_value.sival_int = SIGNUM; > > if (timer_create(CLOCKID, &ev, &mytimer)) { > perror("timer_create"); > exit(errno); > } > > // setup signal handler > if (signal(SIGNUM, handler)) { > perror("signal"); > exit(errno); > } > > // get the time > if (clock_gettime(CLOCKID, &t)) { > perror("clock_gettime"); > exit(errno); > } > > // set the timeout to 1 second from now > memset(&it, 0, sizeof(it)); > it.it_value = t; > if (timer_settime(mytimer, TIMER_ABSTIME, &it, NULL)) { > perror("timer_settime"); > exit(errno); > } > > usleep(500); > if (signaled) > exit(0); > > exit(1); >} >
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 452693
:
310481
| 310594 |
310598
|
310963