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 310481 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.
reproducer for timer_settime(3p) bug
bz452693.c (text/x-csrc), 1.05 KB, created by
Clark Williams
on 2008-06-27 21:11:35 UTC
(
hide
)
Description:
reproducer for timer_settime(3p) bug
Filename:
MIME Type:
Creator:
Clark Williams
Created:
2008-06-27 21:11:35 UTC
Size:
1.05 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> > >void handler(int sig) >{ > printf("got signal %d\n", sig); >} > >#define CLOCKID CLOCK_MONOTONIC >#define SIGNUM SIGUSR1 > >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); > } > > printf("waiting for signal\n"); > pause(); > printf("back from pause\n"); >} >
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