Debian Codegraph @

po/da/man2/timer_create.2.po

raw
1 # Danish translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Joe Hansen <[email protected]>, 2026.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n 4.29.1\n"
8 "POT-Creation-Date: 2026-06-05 06:49+0200\n"
9 "PO-Revision-Date: 2026-03-25 13:22+0100\n"
10 "Last-Translator: Joe Hansen <[email protected]>\n"
11 "Language-Team: Danish <[email protected]>\n"
12 "Language: da\n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
18 #. type: TH
19 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
20 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
21 #, no-wrap
22 msgid "timer_create"
23 msgstr "timer_create"
24
25 #. type: TH
26 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
27 #: opensuse-tumbleweed
28 #, no-wrap
29 msgid "2025-10-29"
30 msgstr "29. oktober 2025"
31
32 #. type: TH
33 #: archlinux debian-unstable
34 #, no-wrap
35 msgid "Linux man-pages 6.18"
36 msgstr "Linux man-pages 6.18"
37
38 #. type: SH
39 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
40 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
41 #, no-wrap
42 msgid "NAME"
43 msgstr "NAVN"
44
45 #. type: Plain text
46 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
47 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
48 msgid "timer_create - create a POSIX per-process timer"
49 msgstr "timer_create - opret et POSIX per proces-stopur"
50
51 #. type: SH
52 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
53 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
54 #, no-wrap
55 msgid "LIBRARY"
56 msgstr "BIBLIOTEK"
57
58 #. type: Plain text
59 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
60 #: opensuse-leap-16-1 opensuse-tumbleweed
61 msgid "Real-time library (I<librt>,\\ I<-lrt>)"
62 msgstr "Realtidsbibliotek (I<librt>,\\ I<-lrt>)"
63
64 #. type: SH
65 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
66 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
67 #, no-wrap
68 msgid "SYNOPSIS"
69 msgstr "SYNOPSIS"
70
71 #. type: Plain text
72 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
73 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
74 #, no-wrap
75 msgid ""
76 "B<#include E<lt>signal.hE<gt>> /* Definition of B<SIGEV_*> constants */\n"
77 "B<#include E<lt>time.hE<gt>>\n"
78 msgstr ""
79 "B<#include E<lt>signal.hE<gt>> /* Definition af B<SIGEV_*>-konstanter */\n"
80 "B<#include E<lt>time.hE<gt>>\n"
81
82 #. type: Plain text
83 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
84 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
85 #, no-wrap
86 msgid ""
87 "B<int timer_create(clockid_t >I<clockid>B<,>\n"
88 "B< struct sigevent *_Nullable restrict >I<sevp>B<,>\n"
89 "B< timer_t *restrict >I<timerid>B<);>\n"
90 msgstr ""
91 "B<int timer_create(clockid_t >I<clockid>B<,>\n"
92 "B< struct sigevent *_Nullable restrict >I<sevp>B<,>\n"
93 "B< timer_t *restrict >I<timerid>B<);>\n"
94
95 #. type: Plain text
96 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
97 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
98 msgid ""
99 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
100 msgstr ""
101 "Feature Test Macro Requirements for glibc (se B<feature_test_macros>(7)):"
102
103 #. type: Plain text
104 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
105 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
106 msgid "B<timer_create>():"
107 msgstr "B<timer_create>():"
108
109 #. type: Plain text
110 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
111 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
112 #, no-wrap
113 msgid " _POSIX_C_SOURCE E<gt>= 199309L\n"
114 msgstr " _POSIX_C_SOURCE E<gt>= 199309L\n"
115
116 #. type: SH
117 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
118 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
119 #, no-wrap
120 msgid "DESCRIPTION"
121 msgstr "BESKRIVELSE"
122
123 #. type: Plain text
124 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
125 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
126 msgid ""
127 "B<timer_create>() creates a new per-process interval timer. The ID of the "
128 "new timer is returned in the buffer pointed to by I<timerid>, which must be "
129 "a non-null pointer. This ID is unique within the process, until the timer "
130 "is deleted. The new timer is initially disarmed."
131 msgstr ""
132 "B<timer_create>() opretter et nyt per proces-intervalstopur. Id'et for det "
133 "nye stopur returneres i mellemlageret der peger på I<timerid>, der skal være "
134 "en ikke-null peger. Dette id er unik i processen, indtil stopuret slettes. "
135 "Det nye stopur er oprindelig afvæbnet."
136
137 #. type: Plain text
138 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
139 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
140 msgid ""
141 "The I<clockid> argument specifies the clock that the new timer uses to "
142 "measure time. It can be specified as one of the following values:"
143 msgstr ""
144 "Argumentet I<clockid> angiver uret, som det nye stopur bruger til at måle "
145 "tiden. Kan angives som en af de følgende værdier:"
146
147 #. type: TP
148 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
149 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
150 #, no-wrap
151 msgid "B<CLOCK_REALTIME>"
152 msgstr "B<CLOCK_REALTIME>"
153
154 #. type: Plain text
155 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
156 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
157 msgid "A settable system-wide real-time clock."
158 msgstr "Et realtids ur, der kan angives for hele systemet."
159
160 #. type: TP
161 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
162 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
163 #, no-wrap
164 msgid "B<CLOCK_MONOTONIC>"
165 msgstr "B<CLOCK_MONOTONIC>"
166
167 #. Note: the CLOCK_MONOTONIC_RAW clock added for clock_gettime()
168 #. in Linux 2.6.28 is not supported for POSIX timers -- mtk, Feb 2009
169 #. type: Plain text
170 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
171 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
172 msgid ""
173 "A nonsettable monotonically increasing clock that measures time from some "
174 "unspecified point in the past that does not change after system startup."
175 msgstr ""
176 "Et monotont stigende ur, der ikke kan indstilles og som måler tid fra et "
177 "uangivet punkt i fortiden, der ikke ændrer sig efter systemets "
178 "opstartstidspunkt."
179
180 #. type: TP
181 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
182 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
183 #, no-wrap
184 msgid "B<CLOCK_PROCESS_CPUTIME_ID> (since Linux 2.6.12)"
185 msgstr "B<CLOCK_PROCESS_CPUTIME_ID> (siden Linux 2.6.12)"
186
187 #. type: Plain text
188 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
189 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
190 msgid ""
191 "A clock that measures (user and system) CPU time consumed by (all of the "
192 "threads in) the calling process."
193 msgstr ""
194 "Et ur der måler (bruger og system) cpu-tid forbrugt af (alle trådene i) den "
195 "kaldende proces."
196
197 #. type: TP
198 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
199 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
200 #, no-wrap
201 msgid "B<CLOCK_THREAD_CPUTIME_ID> (since Linux 2.6.12)"
202 msgstr "B<CLOCK_THREAD_CPUTIME_ID> (siden Linux 2.6.12)"
203
204 #. The CLOCK_MONOTONIC_RAW that was added in Linux 2.6.28 can't be used
205 #. to create a timer -- mtk, Feb 2009
206 #. type: Plain text
207 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
208 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
209 msgid ""
210 "A clock that measures (user and system) CPU time consumed by the calling "
211 "thread."
212 msgstr ""
213 "Et ur der måler (bruger og system) cpu-tid forbrugt af den kaldende tråd."
214
215 #. type: TP
216 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
217 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
218 #, no-wrap
219 msgid "B<CLOCK_BOOTTIME> (Since Linux 2.6.39)"
220 msgstr "B<CLOCK_BOOTTIME> (siden Linux 2.6.39)"
221
222 #. commit 70a08cca1227dc31c784ec930099a4417a06e7d0
223 #. type: Plain text
224 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
225 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
226 msgid ""
227 "Like B<CLOCK_MONOTONIC>, this is a monotonically increasing clock. However, "
228 "whereas the B<CLOCK_MONOTONIC> clock does not measure the time while a "
229 "system is suspended, the B<CLOCK_BOOTTIME> clock does include the time "
230 "during which the system is suspended. This is useful for applications that "
231 "need to be suspend-aware. B<CLOCK_REALTIME> is not suitable for such "
232 "applications, since that clock is affected by discontinuous changes to the "
233 "system clock."
234 msgstr ""
235 "Som B<CLOCK_MONOTONIC>, er dette et monotont stigende ur. Hvor "
236 "B<CLOCK_MONOTONIC> ikke måler tiden mens et system er i dvale, så inkluderer "
237 "B<CLOCK_BOOTTIME> tiden hvor systemet er i dvale. Dette er nyttigt for "
238 "programmer, der skal være dvale-opmærksomme. B<CLOCK_REALTIME> er ikke egnet "
239 "for sådanne programmer, da uret påvirkes af diskontinuerlige ændringer til "
240 "systemuret."
241
242 #. type: TP
243 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
244 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
245 #, no-wrap
246 msgid "B<CLOCK_REALTIME_ALARM> (since Linux 3.0)"
247 msgstr "B<CLOCK_REALTIME_ALARM> (siden Linux 3.0)"
248
249 #. commit 9a7adcf5c6dea63d2e47e6f6d2f7a6c9f48b9337
250 #. type: Plain text
251 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
252 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
253 msgid ""
254 "This clock is like B<CLOCK_REALTIME>, but will wake the system if it is "
255 "suspended. The caller must have the B<CAP_WAKE_ALARM> capability in order "
256 "to set a timer against this clock."
257 msgstr ""
258 "Dette ur er som B<CLOCK_REALTIME>, men vil vække systemet, hvis det er i "
259 "dvale. Kalderen skal have funktionaliteten B<CAP_WAKE_ALARM> for at angive "
260 "et stopur mod dette ur."
261
262 #. type: TP
263 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
264 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
265 #, no-wrap
266 msgid "B<CLOCK_BOOTTIME_ALARM> (since Linux 3.0)"
267 msgstr "B<CLOCK_BOOTTIME_ALARM> (siden Linux 3.0)"
268
269 #. commit 9a7adcf5c6dea63d2e47e6f6d2f7a6c9f48b9337
270 #. type: Plain text
271 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
272 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
273 msgid ""
274 "This clock is like B<CLOCK_BOOTTIME>, but will wake the system if it is "
275 "suspended. The caller must have the B<CAP_WAKE_ALARM> capability in order "
276 "to set a timer against this clock."
277 msgstr ""
278 "Dette ur er som B<CLOCK_BOOTTIME>, men vil vække systemet, hvis det er i "
279 "dvale. Kalderen skal have funktionaliteten B<CAP_WAKE_ALARM> for at kunne "
280 "angive et stopur mod dette ur."
281
282 #. type: TP
283 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
284 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
285 #, no-wrap
286 msgid "B<CLOCK_TAI> (since Linux 3.10)"
287 msgstr "B<CLOCK_TAI> (siden Linux 3.10)"
288
289 #. type: Plain text
290 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
291 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
292 msgid ""
293 "A system-wide clock derived from wall-clock time but counting leap seconds."
294 msgstr ""
295 "Et ur for systemet udledt fra wall-clock-tiden men som tæller springende "
296 "sekunder."
297
298 #. type: Plain text
299 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
300 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
301 msgid "See B<clock_getres>(2) for some further details on the above clocks."
302 msgstr "Se B<clock_getres>(2) for yderligere detaljer om ovenstående ure."
303
304 #. type: Plain text
305 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
306 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
307 msgid ""
308 "As well as the above values, I<clockid> can be specified as the I<clockid> "
309 "returned by a call to B<clock_getcpuclockid>(3) or "
310 "B<pthread_getcpuclockid>(3)."
311 msgstr ""
312 "Udover de ovenstående værdier kan I<clockid> angives som I<clockid> "
313 "returneret af et kald til B<clock_getcpuclockid>(3) eller "
314 "B<pthread_getcpuclockid>(3)."
315
316 #. type: Plain text
317 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
318 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
319 msgid ""
320 "The I<sevp> argument points to a I<sigevent> structure that specifies how "
321 "the caller should be notified when the timer expires. For the definition "
322 "and general details of this structure, see B<sigevent>(3type)."
323 msgstr ""
324 "Argumentet I<sevp> peget på en I<sigevent>-struktur, der angiver hvordan "
325 "kalderen skal blive påmindet når stopuret udløber. For defintionen og "
326 "generelle detaljer for denne struktur, se B<sigevent>(3type)."
327
328 #. type: Plain text
329 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
330 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
331 msgid "The I<sevp.sigev_notify> field can have the following values:"
332 msgstr "Feltet I<sevp.sigev_notify> kan have de følgende værdier:"
333
334 #. type: TP
335 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
336 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
337 #, no-wrap
338 msgid "B<SIGEV_NONE>"
339 msgstr "B<SIGEV_NONE>"
340
341 #. type: Plain text
342 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
343 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
344 msgid ""
345 "Don't asynchronously notify when the timer expires. Progress of the timer "
346 "can be monitored using B<timer_gettime>(2)."
347 msgstr ""
348 "Påmind ikke asynkront når stopuret udløber. Status for stopuret kan "
349 "overvåges via B<timer_gettime>(2)."
350
351 #. type: TP
352 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
353 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
354 #, no-wrap
355 msgid "B<SIGEV_SIGNAL>"
356 msgstr "B<SIGEV_SIGNAL>"
357
358 #. type: Plain text
359 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
360 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
361 msgid ""
362 "Upon timer expiration, generate the signal I<sigev_signo> for the process. "
363 "See B<sigevent>(3type) for general details. The I<si_code> field of the "
364 "I<siginfo_t> structure will be set to B<SI_TIMER>. At any point in time, at "
365 "most one signal is queued to the process for a given timer; see "
366 "B<timer_getoverrun>(2) for more details."
367 msgstr ""
368 "Ved stopursudløb opret signalet I<sigev_signo> for processen. Se "
369 "B<sigevent>(3type) for generellle detaljer. Feltet I<si_code> for strukturen "
370 "I<siginfo_t> vil blive angivet til B<SI_TIMER>. På ethvert tidspunkt er "
371 "mindst et signal i kø til processen for et angivet stopur; se "
372 "B<timer_getoverrun>(2) for yderligere detaljer."
373
374 #. type: TP
375 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
376 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
377 #, no-wrap
378 msgid "B<SIGEV_THREAD>"
379 msgstr "B<SIGEV_THREAD>"
380
381 #. type: Plain text
382 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
383 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
384 msgid ""
385 "Upon timer expiration, invoke I<sigev_notify_function> as if it were the "
386 "start function of a new thread. See B<sigevent>(3type) for details."
387 msgstr ""
388 "Ved stopursudløb, igangsæt I<sigev_notify_function> som var det "
389 "startfunktionen for en ny tråd. Se B<sigevent>(3type) for detaljer."
390
391 #. type: TP
392 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
393 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
394 #, no-wrap
395 msgid "B<SIGEV_THREAD_ID> (Linux-specific)"
396 msgstr "B<SIGEV_THREAD_ID> (Linux-specifik)"
397
398 #. type: Plain text
399 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
400 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
401 msgid ""
402 "As for B<SIGEV_SIGNAL>, but the signal is targeted at the thread whose ID is "
403 "given in I<sigev_notify_thread_id>, which must be a thread in the same "
404 "process as the caller. The I<sigev_notify_thread_id> field specifies a "
405 "kernel thread ID, that is, the value returned by B<clone>(2) or "
406 "B<gettid>(2). This flag is intended only for use by threading libraries."
407 msgstr ""
408 "Som for B<SIGEV_SIGNAL>, men signalet er målrettet tråden hvis id er angivet "
409 "i I<sigev_notify_thread_id>, der skal være en tråd i den samme proces som "
410 "kalderen. Feltet I<sigev_notify_thread_id> angiver en kernetråd-id, det vil "
411 "issge, værdien returneret af B<clone>(2) eller B<gettid>(2). Dette flag er "
412 "kun lavet for brug af trådbiblioteker."
413
414 #. type: Plain text
415 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
416 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
417 msgid ""
418 "Specifying I<sevp> as NULL is equivalent to specifying a pointer to a "
419 "I<sigevent> structure in which I<sigev_notify> is B<SIGEV_SIGNAL>, "
420 "I<sigev_signo> is B<SIGALRM>, and I<sigev_value.sival_int> is the timer ID."
421 msgstr ""
422 "Angivelse af I<sevp> som NULL svarer til at angive en peger til en "
423 "I<sigevent>-struktur hvori I<sigev_notify> er B<SIGEV_SIGNAL>, "
424 "I<sigev_signo> er B<SIGALRM> og I<sigev_value.sival_int> er stopur-id'et."
425
426 #. type: SH
427 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
428 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
429 #, no-wrap
430 msgid "RETURN VALUE"
431 msgstr "RETURVÆRDI"
432
433 #. type: Plain text
434 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
435 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
436 msgid ""
437 "On success, B<timer_create>() returns 0, and the ID of the new timer is "
438 "placed in I<*timerid>. On failure, -1 is returned, and I<errno> is set to "
439 "indicate the error."
440 msgstr ""
441 "Ved succes, B<timer_create>() returnerer 0 og id'et for det nye stopur er "
442 "placeret i I<*timerid>. Ved fejl, -1 returneres og I<errno> angives for at "
443 "indikere fejlen."
444
445 #. type: SH
446 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
447 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
448 #, no-wrap
449 msgid "ERRORS"
450 msgstr "FEJL"
451
452 #. type: TP
453 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
454 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
455 #, no-wrap
456 msgid "B<EAGAIN>"
457 msgstr "B<EAGAIN>"
458
459 #. type: Plain text
460 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
461 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
462 msgid "Temporary error during kernel allocation of timer structures."
463 msgstr "Midlertidig fejl under kerneallokering af stopurstrukturer."
464
465 #. type: TP
466 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
467 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
468 #, no-wrap
469 msgid "B<EINVAL>"
470 msgstr "B<EINVAL>"
471
472 #. type: Plain text
473 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
474 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
475 msgid ""
476 "Clock ID, I<sigev_notify>, I<sigev_signo>, or I<sigev_notify_thread_id> is "
477 "invalid."
478 msgstr ""
479 "Ur-id, I<sigev_notify>, I<sigev_signo> eller I<sigev_notify_thread_id> er "
480 "ugyldig."
481
482 #. type: TP
483 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
484 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
485 #, no-wrap
486 msgid "B<ENOMEM>"
487 msgstr "B<ENOMEM>"
488
489 #. glibc layer: malloc()
490 #. type: Plain text
491 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
492 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
493 msgid "Could not allocate memory."
494 msgstr "Kunne ikke allokere hukommelse."
495
496 #. type: TP
497 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
498 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
499 #, no-wrap
500 msgid "B<ENOTSUP>"
501 msgstr "B<ENOTSUP>"
502
503 #. type: Plain text
504 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
505 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
506 msgid "The kernel does not support creating a timer against this I<clockid>."
507 msgstr "Kernen understøtter ikke oprettelse af et stopur mod dette I<clockid>."
508
509 #. type: TP
510 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
511 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
512 #, no-wrap
513 msgid "B<EPERM>"
514 msgstr "B<EPERM>"
515
516 #. type: Plain text
517 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
518 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
519 msgid ""
520 "I<clockid> was B<CLOCK_REALTIME_ALARM> or B<CLOCK_BOOTTIME_ALARM> but the "
521 "caller did not have the B<CAP_WAKE_ALARM> capability."
522 msgstr ""
523 "I<clockid> var B<CLOCK_REALTIME_ALARM> eller B<CLOCK_BOOTTIME_ALARM> men "
524 "kalderen havde ikke funktionaliteten B<CAP_WAKE_ALARM>."
525
526 #. type: SH
527 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
528 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
529 #, no-wrap
530 msgid "VERSIONS"
531 msgstr "VERSIONER"
532
533 #. type: SS
534 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
535 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
536 #, no-wrap
537 msgid "C library/kernel differences"
538 msgstr "C-bibliotek/kerne-forskelle"
539
540 #. See nptl/sysdeps/unix/sysv/linux/timer_create.c
541 #. type: Plain text
542 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
543 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
544 msgid ""
545 "Part of the implementation of the POSIX timers API is provided by glibc. In "
546 "particular:"
547 msgstr ""
548 "Dele af implementeringen af POSIX-stopurs-API'en tilbydes af glibc. Specielt:"
549
550 #. type: IP
551 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
552 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
553 #, no-wrap
554 msgid "\\[bu]"
555 msgstr "\\[bu]"
556
557 #. type: Plain text
558 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
559 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
560 msgid ""
561 "Much of the functionality for B<SIGEV_THREAD> is implemented within glibc, "
562 "rather than the kernel. (This is necessarily so, since the thread involved "
563 "in handling the notification is one that must be managed by the C library "
564 "POSIX threads implementation.) Although the notification delivered to the "
565 "process is via a thread, internally the NPTL implementation uses a "
566 "I<sigev_notify> value of B<SIGEV_THREAD_ID> along with a real-time signal "
567 "that is reserved by the implementation (see B<nptl>(7))."
568 msgstr ""
569 "Meget af funktionaliteten for B<SIGEV_THREAD> er implementeret i glibc, frem "
570 "for i kernen. (Dette er nødvendigt da tråden involveret i at håndtere "
571 "påmindelsen er en, der skal håndteret af C-bibliotekets POSIX-"
572 "trådimplementering). Selvom påmindelsen leveret til processen er via en "
573 "tråd, så bruger NPTL-implementeringen internt en I<sigev_notify>-værdi "
574 "sammen med et realtids signal, der er reserveret af implementeringen (se "
575 "B<nptl>(7))."
576
577 #. type: Plain text
578 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
579 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
580 msgid ""
581 "The implementation of the default case where I<evp> is NULL is handled "
582 "inside glibc, which invokes the underlying system call with a suitably "
583 "populated I<sigevent> structure."
584 msgstr ""
585 "Implementeringen af standardtilfældet hvor I<evp> er NULL håndteres inde i "
586 "glibc, der igangsætter det underliggende systemkald med egnet udfyldt "
587 "I<sigevent>-struktur."
588
589 #. See the glibc source file kernel-posix-timers.h for the structure
590 #. that glibc uses to map user-space timer IDs to kernel timer IDs
591 #. The kernel-level timer ID is exposed via siginfo.si_tid.
592 #. type: Plain text
593 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
594 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
595 msgid ""
596 "The timer IDs presented at user level are maintained by glibc, which maps "
597 "these IDs to the timer IDs employed by the kernel."
598 msgstr ""
599 "Stopur-id'et præsenteret på brugerniveau vedligeholdes af glibc, der "
600 "oversætter disse id'er til stopurets id'er anvendt af kernen."
601
602 #. type: SH
603 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
604 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
605 #, no-wrap
606 msgid "STANDARDS"
607 msgstr "STANDARDER"
608
609 #. type: Plain text
610 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
611 #: opensuse-tumbleweed
612 msgid "POSIX.1-2024."
613 msgstr "POSIX.1-2024."
614
615 #. type: SH
616 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
617 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
618 #, no-wrap
619 msgid "HISTORY"
620 msgstr "HISTORIK"
621
622 #. type: Plain text
623 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
624 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
625 msgid "Linux 2.6. POSIX.1-2001."
626 msgstr "Linux 2.6. POSIX.1-2001."
627
628 #. glibc commit 93a78ac437ba44f493333d7e2a4b0249839ce460
629 #. type: Plain text
630 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
631 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
632 msgid ""
633 "Prior to Linux 2.6, glibc provided an incomplete user-space implementation "
634 "(B<CLOCK_REALTIME> timers only) using POSIX threads, and before glibc 2.17, "
635 "the implementation falls back to this technique on systems running kernels "
636 "older than Linux 2.6."
637 msgstr ""
638 "Før Linux 2.6 tilbød glibc en ufuldstændig brugerrumsimplementering (kun "
639 "B<CLOCK_REALTIME>-stopure) via POSIX-tråde og før glibc 2.17, benytter "
640 "implementeringen denne teknik på systemer, der afvikler kerner ældre end "
641 "Linux 2.6."
642
643 #. type: SH
644 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
645 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
646 #, no-wrap
647 msgid "NOTES"
648 msgstr "NOTER"
649
650 #. type: Plain text
651 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
652 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
653 msgid "A program may create multiple interval timers using B<timer_create>()."
654 msgstr "Et program kan oprette flere intervalstopure via B<timer_create>()."
655
656 #. type: Plain text
657 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
658 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
659 msgid ""
660 "Timers are not inherited by the child of a B<fork>(2), and are disarmed and "
661 "deleted during an B<execve>(2)."
662 msgstr ""
663 "Stopure arves ikke af underprocessen for en B<fork>(2), og afvæbnes og "
664 "slettes under en B<execve>(2)."
665
666 #. type: Plain text
667 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
668 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
669 msgid ""
670 "The kernel preallocates a \"queued real-time signal\" for each timer created "
671 "using B<timer_create>(). Consequently, the number of timers is limited by "
672 "the B<RLIMIT_SIGPENDING> resource limit (see B<setrlimit>(2))."
673 msgstr ""
674 "Kernen præallokerer et »køet realtids signal« for hvert stopur oprettet via "
675 "B<timer_create>(). Som konsekvens er antallet af stopure begrænset af "
676 "ressourcebegrænsningen B<RLIMIT_SIGPENDING> (se B<setrlimit>(2))."
677
678 #. type: Plain text
679 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
680 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
681 msgid ""
682 "The timers created by B<timer_create>() are commonly known as \"POSIX "
683 "(interval) timers\". The POSIX timers API consists of the following "
684 "interfaces:"
685 msgstr ""
686 "Stopurene oprettet af B<timer_create>() kendes ofte som »POSIX-"
687 "(interval)stopure. POSIX-stopurs-API'en består af de følgende grænseflader:"
688
689 #. type: TP
690 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
691 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
692 #, no-wrap
693 msgid "B<timer_create>()"
694 msgstr "B<timer_create>()"
695
696 #. type: Plain text
697 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
698 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
699 msgid "Create a timer."
700 msgstr "Opret et stopur."
701
702 #. type: TP
703 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
704 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
705 #, no-wrap
706 msgid "B<timer_settime>(2)"
707 msgstr "B<timer_settime>(2)"
708
709 #. type: Plain text
710 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
711 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
712 msgid "Arm (start) or disarm (stop) a timer."
713 msgstr "Bevæbn (start) eller afvæbn (stop) et stopur."
714
715 #. type: TP
716 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
717 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
718 #, no-wrap
719 msgid "B<timer_gettime>(2)"
720 msgstr "B<timer_gettime>(2)"
721
722 #. type: Plain text
723 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
724 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
725 msgid ""
726 "Fetch the time remaining until the next expiration of a timer, along with "
727 "the interval setting of the timer."
728 msgstr ""
729 "Hent tilbageværende tid indtil det næste udløb for et stopur, sammen med "
730 "intervalindstillingen for stopuret."
731
732 #. type: TP
733 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
734 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
735 #, no-wrap
736 msgid "B<timer_getoverrun>(2)"
737 msgstr "B<timer_getoverrun>(2)"
738
739 #. type: Plain text
740 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
741 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
742 msgid "Return the overrun count for the last timer expiration."
743 msgstr "Returner overløbsantallet for det sidste stopursudløb."
744
745 #. type: TP
746 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
747 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
748 #, no-wrap
749 msgid "B<timer_delete>(2)"
750 msgstr "B<timer_delete>(2)"
751
752 #. type: Plain text
753 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
754 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
755 msgid "Disarm and delete a timer."
756 msgstr "Afvæbn og slet et stopur."
757
758 #. type: Plain text
759 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
760 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
761 msgid ""
762 "Since Linux 3.10, the I</proc/>pidI</timers> file can be used to list the "
763 "POSIX timers for the process with PID I<pid>. See B<proc>(5) for further "
764 "information."
765 msgstr ""
766 "Siden Linux 3.10 kan filen I</proc/>pidI</timers> bruges til at vise POSIX-"
767 "stoprurene for processen med PID I<pid>. Se B<proc>(5) for yderligere "
768 "information."
769
770 #. baa73d9e478ff32d62f3f9422822b59dd9a95a21
771 #. type: Plain text
772 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
773 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
774 msgid ""
775 "Since Linux 4.10, support for POSIX timers is a configurable option that is "
776 "enabled by default. Kernel support can be disabled via the "
777 "B<CONFIG_POSIX_TIMERS> option."
778 msgstr ""
779 "Siden Linux 4.10 er understøttelse for POSIX-stopure et tilvalg, der kan "
780 "konfigureres og er aktiveret som standard. Kerneunderstøttelse kan "
781 "deaktiveres via tilvalget B<CONFIG_POSIX_TIMERS>."
782
783 #. type: SH
784 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
785 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
786 #, no-wrap
787 msgid "EXAMPLES"
788 msgstr "EKSEMPLER"
789
790 #. type: Plain text
791 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
792 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
793 msgid ""
794 "The program below takes two arguments: a sleep period in seconds, and a "
795 "timer frequency in nanoseconds. The program establishes a handler for the "
796 "signal it uses for the timer, blocks that signal, creates and arms a timer "
797 "that expires with the given frequency, sleeps for the specified number of "
798 "seconds, and then unblocks the timer signal. Assuming that the timer "
799 "expired at least once while the program slept, the signal handler will be "
800 "invoked, and the handler displays some information about the timer "
801 "notification. The program terminates after one invocation of the signal "
802 "handler."
803 msgstr ""
804 "Programmet nednefor bruger to argumenter: en soveperiode i sekunder og en "
805 "stopursfrekvens i nanosekunder. Programmet etablerer et håndtag for "
806 "signalet, det bruger for stopuret, blokerer det signal, opretter og bevæbner "
807 "et stopur, der udløber med den anførte frekvens, sover i det anførte antal "
808 "sekunder og fjerner så blokeringen på stopurssignalet. Under antagelse af at "
809 "stopuret udløb mindst en gang mens programmet sov, vil signalhåndteringen "
810 "blive igangsat og håndteringen viser lidt information om stopurspåmindelsen. "
811 "Programmet afslutter efter en igangsættelse af signalhåndteringen."
812
813 #. type: Plain text
814 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
815 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
816 msgid ""
817 "In the following example run, the program sleeps for 1 second, after "
818 "creating a timer that has a frequency of 100 nanoseconds. By the time the "
819 "signal is unblocked and delivered, there have been around ten million "
820 "overruns."
821 msgstr ""
822 "I det følgende eksempel sover programmet i 1 sekund, efter et stopur er "
823 "oprettet med en frekvens på 100 nanosukneder. På det tidspunkt hvor signalet "
824 "får fjernet og leveret sit signal, har der været omkring ti millioner "
825 "overløb."
826
827 #. type: Plain text
828 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
829 #: opensuse-tumbleweed
830 #, no-wrap
831 msgid ""
832 "$B< ./a.out 1 100>;\n"
833 "Establishing handler for signal 34\n"
834 "Blocking signal 34\n"
835 "timer ID is 0x804c008\n"
836 "Sleeping for 1 seconds\n"
837 "Unblocking signal 34\n"
838 "Caught signal 34\n"
839 " sival_ptr = 0xbfb174f4; *sival_ptr = 0x804c008\n"
840 " overrun count = 10004886\n"
841 msgstr ""
842 "$B< ./a.out 1 100>;\n"
843 "Etablerer håndtering for signal 34\n"
844 "Blokerer signal 34\n"
845 "stopur-id er 0x804c008\n"
846 "Sover i 1 sekund\n"
847 "Fjerner blokering for signal 34\n"
848 "Fangede signal 34\n"
849 " sival_ptr = 0xbfb174f4; *sival_ptr = 0x804c008\n"
850 " overløbsantal = 10004886\n"
851
852 #. type: SS
853 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
854 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
855 #, no-wrap
856 msgid "Program source"
857 msgstr "Programkilde"
858
859 #. type: Plain text
860 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
861 #: opensuse-tumbleweed
862 #, no-wrap
863 msgid ""
864 "#include E<lt>err.hE<gt>\n"
865 "#include E<lt>signal.hE<gt>\n"
866 "#include E<lt>stdint.hE<gt>\n"
867 "#include E<lt>stdio.hE<gt>\n"
868 "#include E<lt>stdlib.hE<gt>\n"
869 "#include E<lt>time.hE<gt>\n"
870 "#include E<lt>unistd.hE<gt>\n"
871 "\\&\n"
872 "#define CLOCKID CLOCK_REALTIME\n"
873 "#define SIG SIGRTMIN\n"
874 "\\&\n"
875 "static void\n"
876 "print_siginfo(siginfo_t *si)\n"
877 "{\n"
878 " int or;\n"
879 " timer_t *tidp;\n"
880 "\\&\n"
881 " tidp = si-E<gt>si_value.sival_ptr;\n"
882 "\\&\n"
883 " printf(\" sival_ptr = %p; \", si-E<gt>si_value.sival_ptr);\n"
884 " printf(\" *sival_ptr = %#jx\\[rs]n\", (uintmax_t) *tidp);\n"
885 "\\&\n"
886 " or = timer_getoverrun(*tidp);\n"
887 " if (or == -1)\n"
888 " err(EXIT_FAILURE, \"timer_getoverrun\");\n"
889 "\\&\n"
890 " printf(\" overrun count = %d\\[rs]n\", or);\n"
891 "}\n"
892 "\\&\n"
893 "static void\n"
894 "handler(int sig, siginfo_t *si, void *uc)\n"
895 "{\n"
896 " /* Note: calling printf() from a signal handler is not safe\n"
897 " (and should not be done in production programs), since\n"
898 " printf() is not async-signal-safe; see signal-safety(7).\n"
899 " Nevertheless, we use printf() here as a simple way of\n"
900 " showing that the handler was called. */\n"
901 "\\&\n"
902 " printf(\"Caught signal %d\\[rs]n\", sig);\n"
903 " print_siginfo(si);\n"
904 " signal(sig, SIG_IGN);\n"
905 "}\n"
906 "\\&\n"
907 "int\n"
908 "main(int argc, char *argv[])\n"
909 "{\n"
910 " timer_t timerid;\n"
911 " sigset_t mask;\n"
912 " long long freq_nanosecs;\n"
913 " struct sigevent sev;\n"
914 " struct sigaction sa;\n"
915 " struct itimerspec its;\n"
916 "\\&\n"
917 " if (argc != 3) {\n"
918 " fprintf(stderr, \"Usage: %s E<lt>sleep-secsE<gt> E<lt>freq-nanosecsE<gt>\\[rs]n\",\n"
919 " argv[0]);\n"
920 " exit(EXIT_FAILURE);\n"
921 " }\n"
922 "\\&\n"
923 " /* Establish handler for timer signal. */\n"
924 "\\&\n"
925 " printf(\"Establishing handler for signal %d\\[rs]n\", SIG);\n"
926 " sa.sa_flags = SA_SIGINFO;\n"
927 " sa.sa_sigaction = handler;\n"
928 " sigemptyset(&sa.sa_mask);\n"
929 " if (sigaction(SIG, &sa, NULL) == -1)\n"
930 " err(EXIT_FAILURE, \"sigaction\");\n"
931 "\\&\n"
932 " /* Block timer signal temporarily. */\n"
933 "\\&\n"
934 " printf(\"Blocking signal %d\\[rs]n\", SIG);\n"
935 " sigemptyset(&mask);\n"
936 " sigaddset(&mask, SIG);\n"
937 " if (sigprocmask(SIG_SETMASK, &mask, NULL) == -1)\n"
938 " err(EXIT_FAILURE, \"sigprocmask\");\n"
939 "\\&\n"
940 " /* Create the timer. */\n"
941 "\\&\n"
942 " sev.sigev_notify = SIGEV_SIGNAL;\n"
943 " sev.sigev_signo = SIG;\n"
944 " sev.sigev_value.sival_ptr = &timerid;\n"
945 " if (timer_create(CLOCKID, &sev, &timerid) == -1)\n"
946 " err(EXIT_FAILURE, \"timer_create\");\n"
947 "\\&\n"
948 " printf(\"timer ID is %#jx\\[rs]n\", (uintmax_t) timerid);\n"
949 "\\&\n"
950 " /* Start the timer. */\n"
951 "\\&\n"
952 " freq_nanosecs = atoll(argv[2]);\n"
953 " its.it_value.tv_sec = freq_nanosecs / 1000000000;\n"
954 " its.it_value.tv_nsec = freq_nanosecs % 1000000000;\n"
955 " its.it_interval.tv_sec = its.it_value.tv_sec;\n"
956 " its.it_interval.tv_nsec = its.it_value.tv_nsec;\n"
957 "\\&\n"
958 " if (timer_settime(timerid, 0, &its, NULL) == -1)\n"
959 " err(EXIT_FAILURE, \"timer_settime\");\n"
960 "\\&\n"
961 " /* Sleep for a while; meanwhile, the timer may expire\n"
962 " multiple times. */\n"
963 "\\&\n"
964 " printf(\"Sleeping for %d seconds\\[rs]n\", atoi(argv[1]));\n"
965 " sleep(atoi(argv[1]));\n"
966 "\\&\n"
967 " /* Unlock the timer signal, so that timer notification\n"
968 " can be delivered. */\n"
969 "\\&\n"
970 " printf(\"Unblocking signal %d\\[rs]n\", SIG);\n"
971 " if (sigprocmask(SIG_UNBLOCK, &mask, NULL) == -1)\n"
972 " err(EXIT_FAILURE, \"sigprocmask\");\n"
973 "\\&\n"
974 " exit(EXIT_SUCCESS);\n"
975 "}\n"
976 msgstr ""
977 "#include E<lt>err.hE<gt>\n"
978 "#include E<lt>signal.hE<gt>\n"
979 "#include E<lt>stdint.hE<gt>\n"
980 "#include E<lt>stdio.hE<gt>\n"
981 "#include E<lt>stdlib.hE<gt>\n"
982 "#include E<lt>time.hE<gt>\n"
983 "#include E<lt>unistd.hE<gt>\n"
984 "\\&\n"
985 "#define CLOCKID CLOCK_REALTIME\n"
986 "#define SIG SIGRTMIN\n"
987 "\\&\n"
988 "static void\n"
989 "print_siginfo(siginfo_t *si)\n"
990 "{\n"
991 " int or;\n"
992 " timer_t *tidp;\n"
993 "\\&\n"
994 " tidp = si-E<gt>si_value.sival_ptr;\n"
995 "\\&\n"
996 " printf(\" sival_ptr = %p; \", si-E<gt>si_value.sival_ptr);\n"
997 " printf(\" *sival_ptr = %#jx\\[rs]n\", (uintmax_t) *tidp);\n"
998 "\\&\n"
999 " or = timer_getoverrun(*tidp);\n"
1000 " if (or == -1)\n"
1001 " err(EXIT_FAILURE, \"timer_getoverrun\");\n"
1002 "\\&\n"
1003 " printf(\" overrun count = %d\\[rs]n\", or);\n"
1004 "}\n"
1005 "\\&\n"
1006 "static void\n"
1007 "handler(int sig, siginfo_t *si, void *uc)\n"
1008 "{\n"
1009 " /* Bemærk: kald af printf() fra en signalhåndtering er ikke sikkert\n"
1010 " (og bør ikke gøres i produktionsprogrammer), da\n"
1011 " printf() ikke er asynkron-signal-sikker; se signal-safety(7).\n"
1012 " Alligevel så bruger vi printf() her som en simpel måde at\n"
1013 " vise at håndteringen blev kaldt. */\n"
1014 "\\&\n"
1015 " printf(\"Caught signal %d\\[rs]n\", sig);\n"
1016 " print_siginfo(si);\n"
1017 " signal(sig, SIG_IGN);\n"
1018 "}\n"
1019 "\\&\n"
1020 "int\n"
1021 "main(int argc, char *argv[])\n"
1022 "{\n"
1023 " timer_t timerid;\n"
1024 " sigset_t mask;\n"
1025 " long long freq_nanosecs;\n"
1026 " struct sigevent sev;\n"
1027 " struct sigaction sa;\n"
1028 " struct itimerspec its;\n"
1029 "\\&\n"
1030 " if (argc != 3) {\n"
1031 " fprintf(stderr, \"Brug: %s E<lt>sleep-secsE<gt> E<lt>freq-nanosecsE<gt>\\[rs]n\",\n"
1032 " argv[0]);\n"
1033 " exit(EXIT_FAILURE);\n"
1034 " }\n"
1035 "\\&\n"
1036 " /* Etabler håndtering for stopurssignal. */\n"
1037 "\\&\n"
1038 " printf(\"Etablerer håndtering for signal %d\\[rs]n\", SIG);\n"
1039 " sa.sa_flags = SA_SIGINFO;\n"
1040 " sa.sa_sigaction = handler;\n"
1041 " sigemptyset(&sa.sa_mask);\n"
1042 " if (sigaction(SIG, &sa, NULL) == -1)\n"
1043 " err(EXIT_FAILURE, \"sigaction\");\n"
1044 "\\&\n"
1045 " /* Bloker stopursignalet midlertidigt. */\n"
1046 "\\&\n"
1047 " printf(\"Blokerer signal %d\\[rs]n\", SIG);\n"
1048 " sigemptyset(&mask);\n"
1049 " sigaddset(&mask, SIG);\n"
1050 " if (sigprocmask(SIG_SETMASK, &mask, NULL) == -1)\n"
1051 " err(EXIT_FAILURE, \"sigprocmask\");\n"
1052 "\\&\n"
1053 " /* Opret stopuret. */\n"
1054 "\\&\n"
1055 " sev.sigev_notify = SIGEV_SIGNAL;\n"
1056 " sev.sigev_signo = SIG;\n"
1057 " sev.sigev_value.sival_ptr = &timerid;\n"
1058 " if (timer_create(CLOCKID, &sev, &timerid) == -1)\n"
1059 " err(EXIT_FAILURE, \"timer_create\");\n"
1060 "\\&\n"
1061 " printf(\"stopur-id er %#jx\\[rs]n\", (uintmax_t) timerid);\n"
1062 "\\&\n"
1063 " /* Start stopuret. */\n"
1064 "\\&\n"
1065 " freq_nanosecs = atoll(argv[2]);\n"
1066 " its.it_value.tv_sec = freq_nanosecs / 1000000000;\n"
1067 " its.it_value.tv_nsec = freq_nanosecs % 1000000000;\n"
1068 " its.it_interval.tv_sec = its.it_value.tv_sec;\n"
1069 " its.it_interval.tv_nsec = its.it_value.tv_nsec;\n"
1070 "\\&\n"
1071 " if (timer_settime(timerid, 0, &its, NULL) == -1)\n"
1072 " err(EXIT_FAILURE, \"timer_settime\");\n"
1073 "\\&\n"
1074 " /* Sov i en priode; i perioden kan stopuret udløbe\n"
1075 " flere gange. */\n"
1076 "\\&\n"
1077 " printf(\"Sover i %d sekunder\\[rs]n\", atoi(argv[1]));\n"
1078 " sleep(atoi(argv[1]));\n"
1079 "\\&\n"
1080 " /* Lås stopursignalet op, så at stopurspåmindelsen\n"
1081 " kan leveres. */\n"
1082 "\\&\n"
1083 " printf(\"Fjerner blokering for signal %d\\[rs]n\", SIG);\n"
1084 " if (sigprocmask(SIG_UNBLOCK, &mask, NULL) == -1)\n"
1085 " err(EXIT_FAILURE, \"sigprocmask\");\n"
1086 "\\&\n"
1087 " exit(EXIT_SUCCESS);\n"
1088 "}\n"
1089
1090 #. SRC END
1091 #. type: SH
1092 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1093 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1094 #, no-wrap
1095 msgid "SEE ALSO"
1096 msgstr "SE OGSÅ"
1097
1098 #. type: Plain text
1099 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1100 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1101 msgid ""
1102 "B<clock_gettime>(2), B<setitimer>(2), B<timer_delete>(2), "
1103 "B<timer_getoverrun>(2), B<timer_settime>(2), B<timerfd_create>(2), "
1104 "B<clock_getcpuclockid>(3), B<pthread_getcpuclockid>(3), B<pthreads>(7), "
1105 "B<sigevent>(3type), B<signal>(7), B<time>(7)"
1106 msgstr ""
1107 "B<clock_gettime>(2), B<setitimer>(2), B<timer_delete>(2), "
1108 "B<timer_getoverrun>(2), B<timer_settime>(2), B<timerfd_create>(2), "
1109 "B<clock_getcpuclockid>(3), B<pthread_getcpuclockid>(3), B<pthreads>(7), "
1110 "B<sigevent>(3type), B<signal>(7), B<time>(7)"
1111
1112 #. type: TH
1113 #: debian-trixie
1114 #, no-wrap
1115 msgid "2024-06-15"
1116 msgstr "15. juni 2024"
1117
1118 #. type: TH
1119 #: debian-trixie
1120 #, no-wrap
1121 msgid "Linux man-pages 6.9.1"
1122 msgstr "Linux man-pages 6.9.1"
1123
1124 #. type: Plain text
1125 #: debian-trixie
1126 msgid "Real-time library (I<librt>, I<-lrt>)"
1127 msgstr "Realtidsbibliotek (I<librt>, I<-lrt>)"
1128
1129 #. type: Plain text
1130 #: debian-trixie fedora-44 fedora-rawhide
1131 msgid "POSIX.1-2008."
1132 msgstr "POSIX.1-2008."
1133
1134 #. type: Plain text
1135 #: debian-trixie fedora-44 fedora-rawhide
1136 #, no-wrap
1137 msgid ""
1138 "$ B<./a.out 1 100>\n"
1139 "Establishing handler for signal 34\n"
1140 "Blocking signal 34\n"
1141 "timer ID is 0x804c008\n"
1142 "Sleeping for 1 seconds\n"
1143 "Unblocking signal 34\n"
1144 "Caught signal 34\n"
1145 " sival_ptr = 0xbfb174f4; *sival_ptr = 0x804c008\n"
1146 " overrun count = 10004886\n"
1147 msgstr ""
1148 "$ B<./a.out 1 100>\n"
1149 "Etablerer håndtering for signal 34\n"
1150 "Blokerer signal 34\n"
1151 "stopurs-id er 0x804c008\n"
1152 "Sover i 1 sekund\n"
1153 "Fjerner blokering for signal 34\n"
1154 "Fangede signal 34\n"
1155 " sival_ptr = 0xbfb174f4; *sival_ptr = 0x804c008\n"
1156 " overrun count = 10004886\n"
1157
1158 #. type: Plain text
1159 #: debian-trixie fedora-44 fedora-rawhide
1160 #, no-wrap
1161 msgid ""
1162 "#include E<lt>signal.hE<gt>\n"
1163 "#include E<lt>stdint.hE<gt>\n"
1164 "#include E<lt>stdio.hE<gt>\n"
1165 "#include E<lt>stdlib.hE<gt>\n"
1166 "#include E<lt>time.hE<gt>\n"
1167 "#include E<lt>unistd.hE<gt>\n"
1168 "\\&\n"
1169 "#define CLOCKID CLOCK_REALTIME\n"
1170 "#define SIG SIGRTMIN\n"
1171 "\\&\n"
1172 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\[rs]\n"
1173 " } while (0)\n"
1174 "\\&\n"
1175 "static void\n"
1176 "print_siginfo(siginfo_t *si)\n"
1177 "{\n"
1178 " int or;\n"
1179 " timer_t *tidp;\n"
1180 "\\&\n"
1181 " tidp = si-E<gt>si_value.sival_ptr;\n"
1182 "\\&\n"
1183 " printf(\" sival_ptr = %p; \", si-E<gt>si_value.sival_ptr);\n"
1184 " printf(\" *sival_ptr = %#jx\\[rs]n\", (uintmax_t) *tidp);\n"
1185 "\\&\n"
1186 " or = timer_getoverrun(*tidp);\n"
1187 " if (or == -1)\n"
1188 " errExit(\"timer_getoverrun\");\n"
1189 " else\n"
1190 " printf(\" overrun count = %d\\[rs]n\", or);\n"
1191 "}\n"
1192 "\\&\n"
1193 "static void\n"
1194 "handler(int sig, siginfo_t *si, void *uc)\n"
1195 "{\n"
1196 " /* Note: calling printf() from a signal handler is not safe\n"
1197 " (and should not be done in production programs), since\n"
1198 " printf() is not async-signal-safe; see signal-safety(7).\n"
1199 " Nevertheless, we use printf() here as a simple way of\n"
1200 " showing that the handler was called. */\n"
1201 "\\&\n"
1202 " printf(\"Caught signal %d\\[rs]n\", sig);\n"
1203 " print_siginfo(si);\n"
1204 " signal(sig, SIG_IGN);\n"
1205 "}\n"
1206 "\\&\n"
1207 "int\n"
1208 "main(int argc, char *argv[])\n"
1209 "{\n"
1210 " timer_t timerid;\n"
1211 " sigset_t mask;\n"
1212 " long long freq_nanosecs;\n"
1213 " struct sigevent sev;\n"
1214 " struct sigaction sa;\n"
1215 " struct itimerspec its;\n"
1216 "\\&\n"
1217 " if (argc != 3) {\n"
1218 " fprintf(stderr, \"Usage: %s E<lt>sleep-secsE<gt> E<lt>freq-nanosecsE<gt>\\[rs]n\",\n"
1219 " argv[0]);\n"
1220 " exit(EXIT_FAILURE);\n"
1221 " }\n"
1222 "\\&\n"
1223 " /* Establish handler for timer signal. */\n"
1224 "\\&\n"
1225 " printf(\"Establishing handler for signal %d\\[rs]n\", SIG);\n"
1226 " sa.sa_flags = SA_SIGINFO;\n"
1227 " sa.sa_sigaction = handler;\n"
1228 " sigemptyset(&sa.sa_mask);\n"
1229 " if (sigaction(SIG, &sa, NULL) == -1)\n"
1230 " errExit(\"sigaction\");\n"
1231 "\\&\n"
1232 " /* Block timer signal temporarily. */\n"
1233 "\\&\n"
1234 " printf(\"Blocking signal %d\\[rs]n\", SIG);\n"
1235 " sigemptyset(&mask);\n"
1236 " sigaddset(&mask, SIG);\n"
1237 " if (sigprocmask(SIG_SETMASK, &mask, NULL) == -1)\n"
1238 " errExit(\"sigprocmask\");\n"
1239 "\\&\n"
1240 " /* Create the timer. */\n"
1241 "\\&\n"
1242 " sev.sigev_notify = SIGEV_SIGNAL;\n"
1243 " sev.sigev_signo = SIG;\n"
1244 " sev.sigev_value.sival_ptr = &timerid;\n"
1245 " if (timer_create(CLOCKID, &sev, &timerid) == -1)\n"
1246 " errExit(\"timer_create\");\n"
1247 "\\&\n"
1248 " printf(\"timer ID is %#jx\\[rs]n\", (uintmax_t) timerid);\n"
1249 "\\&\n"
1250 " /* Start the timer. */\n"
1251 "\\&\n"
1252 " freq_nanosecs = atoll(argv[2]);\n"
1253 " its.it_value.tv_sec = freq_nanosecs / 1000000000;\n"
1254 " its.it_value.tv_nsec = freq_nanosecs % 1000000000;\n"
1255 " its.it_interval.tv_sec = its.it_value.tv_sec;\n"
1256 " its.it_interval.tv_nsec = its.it_value.tv_nsec;\n"
1257 "\\&\n"
1258 " if (timer_settime(timerid, 0, &its, NULL) == -1)\n"
1259 " errExit(\"timer_settime\");\n"
1260 "\\&\n"
1261 " /* Sleep for a while; meanwhile, the timer may expire\n"
1262 " multiple times. */\n"
1263 "\\&\n"
1264 " printf(\"Sleeping for %d seconds\\[rs]n\", atoi(argv[1]));\n"
1265 " sleep(atoi(argv[1]));\n"
1266 "\\&\n"
1267 " /* Unlock the timer signal, so that timer notification\n"
1268 " can be delivered. */\n"
1269 "\\&\n"
1270 " printf(\"Unblocking signal %d\\[rs]n\", SIG);\n"
1271 " if (sigprocmask(SIG_UNBLOCK, &mask, NULL) == -1)\n"
1272 " errExit(\"sigprocmask\");\n"
1273 "\\&\n"
1274 " exit(EXIT_SUCCESS);\n"
1275 "}\n"
1276 msgstr ""
1277 "#include E<lt>signal.hE<gt>\n"
1278 "#include E<lt>stdint.hE<gt>\n"
1279 "#include E<lt>stdio.hE<gt>\n"
1280 "#include E<lt>stdlib.hE<gt>\n"
1281 "#include E<lt>time.hE<gt>\n"
1282 "#include E<lt>unistd.hE<gt>\n"
1283 "\\&\n"
1284 "#define CLOCKID CLOCK_REALTIME\n"
1285 "#define SIG SIGRTMIN\n"
1286 "\\&\n"
1287 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\[rs]\n"
1288 " } while (0)\n"
1289 "\\&\n"
1290 "static void\n"
1291 "print_siginfo(siginfo_t *si)\n"
1292 "{\n"
1293 " int or;\n"
1294 " timer_t *tidp;\n"
1295 "\\&\n"
1296 " tidp = si-E<gt>si_value.sival_ptr;\n"
1297 "\\&\n"
1298 " printf(\" sival_ptr = %p; \", si-E<gt>si_value.sival_ptr);\n"
1299 " printf(\" *sival_ptr = %#jx\\[rs]n\", (uintmax_t) *tidp);\n"
1300 "\\&\n"
1301 " or = timer_getoverrun(*tidp);\n"
1302 " if (or == -1)\n"
1303 " errExit(\"timer_getoverrun\");\n"
1304 " else\n"
1305 " printf(\" overrun count = %d\\[rs]n\", or);\n"
1306 "}\n"
1307 "\\&\n"
1308 "static void\n"
1309 "handler(int sig, siginfo_t *si, void *uc)\n"
1310 "{\n"
1311 " /* Bemærk: kald af printf() fra en signalhåndtering er ikke sikkert\n"
1312 " (og bør ikke gøres i produktionsprogrammer), da\n"
1313 " printf() ikke er asynkron-signal-sikker; se signal-safety(7).\n"
1314 " Alligevel så bruger vi printf() her som en simpel måde at\n"
1315 " vise at håndteringen blev kaldt. */\n"
1316 "\\&\n"
1317 " printf(\"Caught signal %d\\[rs]n\", sig);\n"
1318 " print_siginfo(si);\n"
1319 " signal(sig, SIG_IGN);\n"
1320 "}\n"
1321 "\\&\n"
1322 "int\n"
1323 "main(int argc, char *argv[])\n"
1324 "{\n"
1325 " timer_t timerid;\n"
1326 " sigset_t mask;\n"
1327 " long long freq_nanosecs;\n"
1328 " struct sigevent sev;\n"
1329 " struct sigaction sa;\n"
1330 " struct itimerspec its;\n"
1331 "\\&\n"
1332 " if (argc != 3) {\n"
1333 " fprintf(stderr, \"Brug: %s E<lt>sleep-secsE<gt> E<lt>freq-nanosecsE<gt>\\[rs]n\",\n"
1334 " argv[0]);\n"
1335 " exit(EXIT_FAILURE);\n"
1336 " }\n"
1337 "\\&\n"
1338 " /* Etabler håndtering for stopurssignal. */\n"
1339 "\\&\n"
1340 " printf(\"Etablerer håndtering for signal %d\\[rs]n\", SIG);\n"
1341 " sa.sa_flags = SA_SIGINFO;\n"
1342 " sa.sa_sigaction = handler;\n"
1343 " sigemptyset(&sa.sa_mask);\n"
1344 " if (sigaction(SIG, &sa, NULL) == -1)\n"
1345 " errExit(\"sigaction\");\n"
1346 "\\&\n"
1347 " /* Bloker stopursignalet midlertidigt. */\n"
1348 "\\&\n"
1349 " printf(\"Blokerer signal %d\\[rs]n\", SIG);\n"
1350 " sigemptyset(&mask);\n"
1351 " sigaddset(&mask, SIG);\n"
1352 " if (sigprocmask(SIG_SETMASK, &mask, NULL) == -1)\n"
1353 " errExit(\"sigprocmask\");\n"
1354 "\\&\n"
1355 " /* Opret stopuret. */\n"
1356 "\\&\n"
1357 " sev.sigev_notify = SIGEV_SIGNAL;\n"
1358 " sev.sigev_signo = SIG;\n"
1359 " sev.sigev_value.sival_ptr = &timerid;\n"
1360 " if (timer_create(CLOCKID, &sev, &timerid) == -1)\n"
1361 " errExit(\"timer_create\");\n"
1362 "\\&\n"
1363 " printf(\"stopur-id er %#jx\\[rs]n\", (uintmax_t) timerid);\n"
1364 "\\&\n"
1365 " /* Start stopuret. */\n"
1366 "\\&\n"
1367 " freq_nanosecs = atoll(argv[2]);\n"
1368 " its.it_value.tv_sec = freq_nanosecs / 1000000000;\n"
1369 " its.it_value.tv_nsec = freq_nanosecs % 1000000000;\n"
1370 " its.it_interval.tv_sec = its.it_value.tv_sec;\n"
1371 " its.it_interval.tv_nsec = its.it_value.tv_nsec;\n"
1372 "\\&\n"
1373 " if (timer_settime(timerid, 0, &its, NULL) == -1)\n"
1374 " errExit(\"timer_settime\");\n"
1375 "\\&\n"
1376 " /* Sov i en priode; i perioden kan stopuret udløbe\n"
1377 " flere gange. */\n"
1378 "\\&\n"
1379 " printf(\"Sover i %d sekunder\\[rs]n\", atoi(argv[1]));\n"
1380 " sleep(atoi(argv[1]));\n"
1381 "\\&\n"
1382 " /* Lås stopursignalet op, så at stopurspåmindelsen\n"
1383 " kan leveres. */\n"
1384 "\\&\n"
1385 " printf(\"Fjerner blokering for signal %d\\[rs]n\", SIG);\n"
1386 " if (sigprocmask(SIG_UNBLOCK, &mask, NULL) == -1)\n"
1387 " errExit(\"sigprocmask\");\n"
1388 "\\&\n"
1389 " exit(EXIT_SUCCESS);\n"
1390 "}\n"
1391
1392 #. type: TH
1393 #: fedora-44 fedora-rawhide
1394 #, no-wrap
1395 msgid "2024-07-23"
1396 msgstr "23. juli 2024"
1397
1398 #. type: TH
1399 #: fedora-44 fedora-rawhide
1400 #, no-wrap
1401 msgid "Linux man-pages 6.13"
1402 msgstr "Linux man-pages 6.13"
1403
1404 #. type: TH
1405 #: mageia-cauldron
1406 #, no-wrap
1407 msgid "Linux man-pages 6.17"
1408 msgstr "Linux man-pages 6.17"
1409
1410 #. type: TH
1411 #: opensuse-leap-16-1 opensuse-tumbleweed
1412 #, no-wrap
1413 msgid "Linux man-pages (unreleased)"
1414 msgstr "Linux man-pages (ej udgivet)"