| 1 |
# Arabic translation of manpages |
| 2 |
# This file is distributed under the same license as the manpages-l10n package. |
| 3 |
# Copyright © of this file: |
| 4 |
# زايد السعيدي <[email protected]>, 2026. |
| 5 |
msgid "" |
| 6 |
msgstr "" |
| 7 |
"Project-Id-Version: manpages-l10n 4.30.2\n" |
| 8 |
"POT-Creation-Date: 2026-06-05 06:43+0200\n" |
| 9 |
"PO-Revision-Date: 2026-05-18 18:10+0400\n" |
| 10 |
"Last-Translator: Zayed Al-Saidi <[email protected]>\n" |
| 11 |
"Language-Team: Arabic <[email protected]>\n" |
| 12 |
"Language: ar\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=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " |
| 17 |
"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" |
| 18 |
"X-Generator: Lokalize 23.08.5\n" |
| 19 |
|
| 20 |
#. type: TH |
| 21 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 22 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 23 |
#, no-wrap |
| 24 |
msgid "SHMOP" |
| 25 |
msgstr "SHMOP" |
| 26 |
|
| 27 |
#. type: TH |
| 28 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 29 |
#: opensuse-tumbleweed |
| 30 |
#, no-wrap |
| 31 |
msgid "2026-02-08" |
| 32 |
msgstr "8 فبراير 2026" |
| 33 |
|
| 34 |
#. type: TH |
| 35 |
#: archlinux debian-unstable |
| 36 |
#, no-wrap |
| 37 |
msgid "Linux man-pages 6.18" |
| 38 |
msgstr "صفحات دليل لينكس 6.18" |
| 39 |
|
| 40 |
#. type: SH |
| 41 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 42 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 43 |
#, no-wrap |
| 44 |
msgid "NAME" |
| 45 |
msgstr "الاسم" |
| 46 |
|
| 47 |
#. type: Plain text |
| 48 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 49 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 50 |
msgid "shmat, shmdt - System V shared memory operations" |
| 51 |
msgstr "shmat, shmdt - عمليات الذاكرة المشتركة System V" |
| 52 |
|
| 53 |
#. type: SH |
| 54 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 55 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 56 |
#, no-wrap |
| 57 |
msgid "LIBRARY" |
| 58 |
msgstr "المكتبة" |
| 59 |
|
| 60 |
#. type: Plain text |
| 61 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 62 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 63 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 64 |
msgstr "مكتبة سي المعيارية (I<libc>،\\ I<-lc>)" |
| 65 |
|
| 66 |
#. type: SH |
| 67 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 68 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 69 |
#, no-wrap |
| 70 |
msgid "SYNOPSIS" |
| 71 |
msgstr "موجز" |
| 72 |
|
| 73 |
#. type: Plain text |
| 74 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 75 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 76 |
#, no-wrap |
| 77 |
msgid "B<#include E<lt>sys/shm.hE<gt>>\n" |
| 78 |
msgstr "B<#include E<lt>sys/shm.hE<gt>>\n" |
| 79 |
|
| 80 |
#. type: Plain text |
| 81 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 82 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 83 |
#, no-wrap |
| 84 |
msgid "" |
| 85 |
"B<void *shmat(int >I<shmid>B<, const void *_Nullable >I<shmaddr>B<, int >I<shmflg>B<);>\n" |
| 86 |
"B<int shmdt(const void *>I<shmaddr>B<);>\n" |
| 87 |
msgstr "" |
| 88 |
"B<void *shmat(int >I<shmid>B<, const void *_Nullable >I<shmaddr>B<, int >I<shmflg>B<);>\n" |
| 89 |
"B<int shmdt(const void *>I<shmaddr>B<);>\n" |
| 90 |
|
| 91 |
#. type: SH |
| 92 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 93 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 94 |
#, no-wrap |
| 95 |
msgid "DESCRIPTION" |
| 96 |
msgstr "الوصف" |
| 97 |
|
| 98 |
#. type: SS |
| 99 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 100 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 101 |
#, no-wrap |
| 102 |
msgid "shmat()" |
| 103 |
msgstr "shmat()" |
| 104 |
|
| 105 |
#. type: Plain text |
| 106 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 107 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 108 |
msgid "" |
| 109 |
"B<shmat>() attaches the System\\ V shared memory segment identified by " |
| 110 |
"I<shmid> to the address space of the calling process. The attaching address " |
| 111 |
"is specified by I<shmaddr> with one of the following criteria:" |
| 112 |
msgstr "" |
| 113 |
"B<shmat>() يربط مقطع الذاكرة المشتركة System\\ V المحدد بواسطة I<shmid> " |
| 114 |
"بمساحة عنوان العملية المستدعية. يتم تحديد عنوان الربط بواسطة I<shmaddr> " |
| 115 |
"وفقًا لأحد المعايير التالية:" |
| 116 |
|
| 117 |
#. type: IP |
| 118 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 119 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 120 |
#, no-wrap |
| 121 |
msgid "\\[bu]" |
| 122 |
msgstr "\\[bu]" |
| 123 |
|
| 124 |
#. type: Plain text |
| 125 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 126 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 127 |
msgid "" |
| 128 |
"If I<shmaddr> is NULL, the system chooses a suitable (unused) page-aligned " |
| 129 |
"address to attach the segment." |
| 130 |
msgstr "" |
| 131 |
"إذا كان I<shmaddr> NULL، يختار النظام عنوانًا مناسبًا (غير مستخدم) محاذيًا " |
| 132 |
"للصفحة لربط المقطع." |
| 133 |
|
| 134 |
#. type: Plain text |
| 135 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 136 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 137 |
msgid "" |
| 138 |
"If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the " |
| 139 |
"attach occurs at the address equal to I<shmaddr> rounded down to the nearest " |
| 140 |
"multiple of B<SHMLBA>." |
| 141 |
msgstr "" |
| 142 |
"إذا لم يكن I<shmaddr> NULL وتم تحديد B<SHM_RND> في I<shmflg>، يحدث الربط عند " |
| 143 |
"العنوان المساوي لـ I<shmaddr> مقربًا إلى الأسفل لأقرب مضاعف لـ B<SHMLBA>." |
| 144 |
|
| 145 |
#. type: Plain text |
| 146 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 147 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 148 |
msgid "" |
| 149 |
"Otherwise, I<shmaddr> must be a page-aligned address at which the attach " |
| 150 |
"occurs." |
| 151 |
msgstr "خلاف ذلك، يجب أن يكون I<shmaddr> عنوانًا محاذيًا للصفحة يحدث عنده الربط." |
| 152 |
|
| 153 |
#. type: Plain text |
| 154 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 155 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 156 |
msgid "" |
| 157 |
"In addition to B<SHM_RND>, the following flags may be specified in the " |
| 158 |
"I<shmflg> bit-mask argument:" |
| 159 |
msgstr "" |
| 160 |
"بالإضافة إلى B<SHM_RND>، يمكن تحديد الأعلام التالية في وسيطة قناع البت " |
| 161 |
"I<shmflg>:" |
| 162 |
|
| 163 |
#. type: TP |
| 164 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 165 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 166 |
#, no-wrap |
| 167 |
msgid "B<SHM_EXEC> (Linux-specific; since Linux 2.6.9)" |
| 168 |
msgstr "B<SHM_EXEC> (خاص بلينكس؛ منذ لينكس 2.6.9)" |
| 169 |
|
| 170 |
#. type: Plain text |
| 171 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 172 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 173 |
msgid "" |
| 174 |
"Allow the contents of the segment to be executed. The caller must have " |
| 175 |
"execute permission on the segment." |
| 176 |
msgstr "" |
| 177 |
"يسمح بتنفيذ محتويات المقطع. يجب أن يكون لدى المستدعي صلاحية التنفيذ على " |
| 178 |
"المقطع." |
| 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<SHM_RDONLY>" |
| 185 |
msgstr "B<SHM_RDONLY>" |
| 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 |
"Attach the segment for read-only access. The process must have read " |
| 192 |
"permission for the segment. If this flag is not specified, the segment is " |
| 193 |
"attached for read and write access, and the process must have read and write " |
| 194 |
"permission for the segment. There is no notion of a write-only shared " |
| 195 |
"memory segment." |
| 196 |
msgstr "" |
| 197 |
"يربط المقطع للوصول للقراءة فقط. يجب أن يكون لدى العملية صلاحية القراءة " |
| 198 |
"للمقطع. إذا لم يتم تحديد هذا العلم، يتم ربط المقطع للوصول للقراءة والكتابة، " |
| 199 |
"ويجب أن يكون لدى العملية صلاحيات القراءة والكتابة للمقطع. لا يوجد مفهوم " |
| 200 |
"لمقطع ذاكرة مشتركة للكتابة فقط." |
| 201 |
|
| 202 |
#. type: TP |
| 203 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 204 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 205 |
#, no-wrap |
| 206 |
msgid "B<SHM_REMAP> (Linux-specific)" |
| 207 |
msgstr "B<SHM_REMAP> (خاص بلينكس)" |
| 208 |
|
| 209 |
#. type: Plain text |
| 210 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 211 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 212 |
msgid "" |
| 213 |
"This flag specifies that the mapping of the segment should replace any " |
| 214 |
"existing mapping in the range starting at I<shmaddr> and continuing for the " |
| 215 |
"size of the segment. (Normally, an B<EINVAL> error would result if a " |
| 216 |
"mapping already exists in this address range.) In this case, I<shmaddr> " |
| 217 |
"must not be NULL." |
| 218 |
msgstr "" |
| 219 |
"يحدد هذا العلم أن تخطيط المقطع يجب أن يستبدل أي تخطيط موجود في النطاق الذي " |
| 220 |
"يبدأ من I<shmaddr> ويستمر بحجم المقطع. (عادةً، ينتج خطأ B<EINVAL> إذا كان " |
| 221 |
"هناك تخطيط موجود بالفعل في نطاق العنوان هذا.) في هذه الحالة، يجب ألا يكون " |
| 222 |
"I<shmaddr> NULL." |
| 223 |
|
| 224 |
#. type: Plain text |
| 225 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 226 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 227 |
msgid "" |
| 228 |
"The B<brk>(2) value of the calling process is not altered by the attach. " |
| 229 |
"The segment will automatically be detached at process exit. The same " |
| 230 |
"segment may be attached as a read and as a read-write one, and more than " |
| 231 |
"once, in the process's address space." |
| 232 |
msgstr "" |
| 233 |
"لا يتم تغيير قيمة B<brk>(2) للعملية المستدعية بواسطة الربط. سيتم فصل " |
| 234 |
"المقطع آليًا عند خروج العملية. يمكن ربط نفس المقطع كقراءة وكقراءة-كتابة، " |
| 235 |
"وأكثر من مرة، في مساحة عنوان العملية." |
| 236 |
|
| 237 |
#. type: Plain text |
| 238 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 239 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 240 |
msgid "" |
| 241 |
"A successful B<shmat>() call updates the members of the I<shmid_ds> " |
| 242 |
"structure (see B<shmctl>(2)) associated with the shared memory segment as " |
| 243 |
"follows:" |
| 244 |
msgstr "" |
| 245 |
"استدعاء B<shmat>() ناجح يحدّث أعضاء بنية I<shmid_ds> (انظر B<shmctl>(2)) " |
| 246 |
"المرتبطة بمقطع الذاكرة المشتركة كما يلي:" |
| 247 |
|
| 248 |
#. type: Plain text |
| 249 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 250 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 251 |
msgid "I<shm_atime> is set to the current time." |
| 252 |
msgstr "يتم تعيين I<shm_atime> إلى الوقت الحالي." |
| 253 |
|
| 254 |
#. type: Plain text |
| 255 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 256 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 257 |
msgid "I<shm_lpid> is set to the process-ID of the calling process." |
| 258 |
msgstr "يتم تعيين I<shm_lpid> إلى معرف العملية للعملية المستدعية." |
| 259 |
|
| 260 |
#. type: Plain text |
| 261 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 262 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 263 |
msgid "I<shm_nattch> is incremented by one." |
| 264 |
msgstr "يتم زيادة I<shm_nattch> بمقدار واحد." |
| 265 |
|
| 266 |
#. type: SS |
| 267 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 268 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 269 |
#, no-wrap |
| 270 |
msgid "shmdt()" |
| 271 |
msgstr "shmdt()" |
| 272 |
|
| 273 |
#. type: Plain text |
| 274 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 275 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 276 |
msgid "" |
| 277 |
"B<shmdt>() detaches the shared memory segment located at the address " |
| 278 |
"specified by I<shmaddr> from the address space of the calling process. The " |
| 279 |
"to-be-detached segment must be currently attached with I<shmaddr> equal to " |
| 280 |
"the value returned by the attaching B<shmat>() call." |
| 281 |
msgstr "" |
| 282 |
"B<shmdt>() يفصل مقطع الذاكرة المشتركة الموجود في العنوان المحدد بواسطة " |
| 283 |
"I<shmaddr> من مساحة عنوان العملية المستدعية. يجب أن يكون المقطع المراد فصله " |
| 284 |
"مرتبطًا حاليًا مع I<shmaddr> مساويًا للقيمة التي أرجعها استدعاء B<shmat>() " |
| 285 |
"الرابط." |
| 286 |
|
| 287 |
#. type: Plain text |
| 288 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 289 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 290 |
msgid "" |
| 291 |
"On a successful B<shmdt>() call, the system updates the members of the " |
| 292 |
"I<shmid_ds> structure associated with the shared memory segment as follows:" |
| 293 |
msgstr "" |
| 294 |
"عند استدعاء B<shmdt>() ناجح، يحدّث النظام أعضاء بنية I<shmid_ds> المرتبطة " |
| 295 |
"بمقطع الذاكرة المشتركة كما يلي:" |
| 296 |
|
| 297 |
#. type: Plain text |
| 298 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 299 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 300 |
msgid "I<shm_dtime> is set to the current time." |
| 301 |
msgstr "يتم تعيين I<shm_dtime> إلى الوقت الحالي." |
| 302 |
|
| 303 |
#. type: Plain text |
| 304 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 305 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 306 |
msgid "" |
| 307 |
"I<shm_nattch> is decremented by one. If it becomes 0 and the segment is " |
| 308 |
"marked for deletion, the segment is deleted." |
| 309 |
msgstr "" |
| 310 |
"يتم إنقاص I<shm_nattch> بمقدار واحد. إذا أصبح 0 وتم وضع علامة على المقطع " |
| 311 |
"للحذف، يتم حذف المقطع." |
| 312 |
|
| 313 |
#. type: SH |
| 314 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 315 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 316 |
#, no-wrap |
| 317 |
msgid "RETURN VALUE" |
| 318 |
msgstr "قيمة الإرجاع" |
| 319 |
|
| 320 |
#. type: Plain text |
| 321 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 322 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 323 |
msgid "" |
| 324 |
"On success, B<shmat>() returns the address of the attached shared memory " |
| 325 |
"segment; on error, I<(void\\ *)\\ -1> is returned, and I<errno> is set to " |
| 326 |
"indicate the error." |
| 327 |
msgstr "" |
| 328 |
"عند النجاح، تُرجع B<shmat>() عنوان مقطع الذاكرة المشتركة المرفق؛ عند الخطأ، " |
| 329 |
"يُرجع I<(void\\ *)\\ -1>، ويُضبط I<errno> للإشارة إلى الخطأ." |
| 330 |
|
| 331 |
#. type: Plain text |
| 332 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 333 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 334 |
msgid "" |
| 335 |
"On success, B<shmdt>() returns 0; on error -1 is returned, and I<errno> is " |
| 336 |
"set to indicate the error." |
| 337 |
msgstr "" |
| 338 |
"عند النجاح، يُرجع B<shmdt>() 0؛ عند الخطأ يُرجع -1، ويتم تعيين I<errno> " |
| 339 |
"للإشارة إلى الخطأ." |
| 340 |
|
| 341 |
#. type: SH |
| 342 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 343 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 344 |
#, no-wrap |
| 345 |
msgid "ERRORS" |
| 346 |
msgstr "الأخطاء" |
| 347 |
|
| 348 |
#. type: Plain text |
| 349 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 350 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 351 |
msgid "B<shmat>() can fail with one of the following errors:" |
| 352 |
msgstr "يمكن أن يفشل B<shmat>() مع أحد الأخطاء التالية:" |
| 353 |
|
| 354 |
#. type: TP |
| 355 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 356 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 357 |
#, no-wrap |
| 358 |
msgid "B<EACCES>" |
| 359 |
msgstr "B<EACCES>" |
| 360 |
|
| 361 |
#. type: Plain text |
| 362 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 363 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 364 |
msgid "" |
| 365 |
"The calling process does not have the required permissions for the requested " |
| 366 |
"attach type, and does not have the B<CAP_IPC_OWNER> capability in the user " |
| 367 |
"namespace that governs its IPC namespace." |
| 368 |
msgstr "" |
| 369 |
"لا تملك العملية المستدعية الصلاحيات المطلوبة لنوع الربط المطلوب، ولا تملك " |
| 370 |
"القدرة B<CAP_IPC_OWNER> في مساحة اسم المستخدم التي تحكم مساحة اسم IPC الخاصة " |
| 371 |
"بها." |
| 372 |
|
| 373 |
#. type: TP |
| 374 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 375 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 376 |
#, no-wrap |
| 377 |
msgid "B<EIDRM>" |
| 378 |
msgstr "B<EIDRM>" |
| 379 |
|
| 380 |
#. type: Plain text |
| 381 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 382 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 383 |
msgid "I<shmid> points to a removed identifier." |
| 384 |
msgstr "يشير I<shmid> إلى معرف مزال." |
| 385 |
|
| 386 |
#. type: TP |
| 387 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 388 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 389 |
#, no-wrap |
| 390 |
msgid "B<EINVAL>" |
| 391 |
msgstr "B<EINVAL>" |
| 392 |
|
| 393 |
#. type: Plain text |
| 394 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 395 |
#: opensuse-tumbleweed |
| 396 |
msgid "" |
| 397 |
"Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was " |
| 398 |
"not specified) or invalid I<shmaddr> value, or can't attach segment at " |
| 399 |
"I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL." |
| 400 |
msgstr "" |
| 401 |
"قيمة I<shmid> غير صالحة، غير محاذية (أي غير محاذية للصفحة ولم يتم تحديد " |
| 402 |
"B<SHM_RND>) أو قيمة I<shmaddr> غير صالحة، أو لا يمكن ربط المقطع عند " |
| 403 |
"I<shmaddr>، أو تم تحديد B<SHM_REMAP> وكان I<shmaddr> NULL." |
| 404 |
|
| 405 |
#. type: TP |
| 406 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 407 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 408 |
#, no-wrap |
| 409 |
msgid "B<ENOMEM>" |
| 410 |
msgstr "B<ENOMEM>" |
| 411 |
|
| 412 |
#. type: Plain text |
| 413 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 414 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 415 |
msgid "Could not allocate memory for the descriptor or for the page tables." |
| 416 |
msgstr "تعذر تخصيص الذاكرة للوصف أو لجداول الصفحات." |
| 417 |
|
| 418 |
#. type: Plain text |
| 419 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 420 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 421 |
msgid "B<shmdt>() can fail with one of the following errors:" |
| 422 |
msgstr "يمكن أن تفشل B<shmdt>() بأحد الأخطاء التالية:" |
| 423 |
|
| 424 |
#. The following since Linux 2.6.17-rc1: |
| 425 |
#. type: Plain text |
| 426 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 427 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 428 |
msgid "" |
| 429 |
"There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is " |
| 430 |
"not aligned on a page boundary." |
| 431 |
msgstr "" |
| 432 |
"لا يوجد مقطع ذاكرة مشتركة موصول عند I<shmaddr>؛ أو، I<shmaddr> غير محاذٍ " |
| 433 |
"لحدود الصفحة." |
| 434 |
|
| 435 |
#. type: SH |
| 436 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 437 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 438 |
#, no-wrap |
| 439 |
msgid "STANDARDS" |
| 440 |
msgstr "المعايير" |
| 441 |
|
| 442 |
#. type: Plain text |
| 443 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 444 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 445 |
msgid "POSIX.1-2008." |
| 446 |
msgstr "POSIX.1-2008." |
| 447 |
|
| 448 |
#. type: SH |
| 449 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 450 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 451 |
#, no-wrap |
| 452 |
msgid "HISTORY" |
| 453 |
msgstr "التاريخ" |
| 454 |
|
| 455 |
#. SVr4 documents an additional error condition EMFILE. |
| 456 |
#. type: Plain text |
| 457 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 458 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 459 |
msgid "POSIX.1-2001, SVr4." |
| 460 |
msgstr "POSIX.1-2001، SVr4." |
| 461 |
|
| 462 |
#. type: Plain text |
| 463 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 464 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 465 |
msgid "" |
| 466 |
"In SVID 3 (or perhaps earlier), the type of the I<shmaddr> argument was " |
| 467 |
"changed from I<char\\ *> into I<const void\\ *>, and the returned type of " |
| 468 |
"B<shmat>() from I<char\\ *> into I<void\\ *>." |
| 469 |
msgstr "" |
| 470 |
"في SVID 3 (أو ربما أقدم)، تغير نوع الوسيط I<shmaddr> من I<char\\ *> إلى " |
| 471 |
"I<const void\\ *>، والنوع المُعاد من B<shmat>() من I<char\\ *> إلى I<void\\ " |
| 472 |
"*>." |
| 473 |
|
| 474 |
#. type: Plain text |
| 475 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 476 |
#: opensuse-tumbleweed |
| 477 |
msgid "" |
| 478 |
"POSIX.1-2024 changed the error code from I<(void\\ *)\\ -1> to B<SHM_FAILED>." |
| 479 |
msgstr "غير POSIX.1-2024 رمز الخطأ من I<(void\\ *)\\ -1> إلى B<SHM_FAILED>." |
| 480 |
|
| 481 |
#. type: SH |
| 482 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 483 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 484 |
#, no-wrap |
| 485 |
msgid "NOTES" |
| 486 |
msgstr "ملاحظات" |
| 487 |
|
| 488 |
#. type: Plain text |
| 489 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 490 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 491 |
msgid "" |
| 492 |
"After a B<fork>(2), the child inherits the attached shared memory segments." |
| 493 |
msgstr "بعد B<fork>(2)، يرث الطفل مقاطع الذاكرة المشتركة الموصولة." |
| 494 |
|
| 495 |
#. type: Plain text |
| 496 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 497 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 498 |
msgid "" |
| 499 |
"After an B<execve>(2), all attached shared memory segments are detached from " |
| 500 |
"the process." |
| 501 |
msgstr "" |
| 502 |
"بعد B<execve>(2)، تُفصل جميع مقاطع الذاكرة المشتركة الموصولة عن العملية." |
| 503 |
|
| 504 |
#. type: Plain text |
| 505 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 506 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 507 |
msgid "" |
| 508 |
"Upon B<_exit>(2), all attached shared memory segments are detached from the " |
| 509 |
"process." |
| 510 |
msgstr "عند B<_exit>(2)، تُفصل جميع مقاطع الذاكرة المشتركة الموصولة عن العملية." |
| 511 |
|
| 512 |
#. type: Plain text |
| 513 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 514 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 515 |
msgid "" |
| 516 |
"Using B<shmat>() with I<shmaddr> equal to NULL is the preferred, portable " |
| 517 |
"way of attaching a shared memory segment. Be aware that the shared memory " |
| 518 |
"segment attached in this way may be attached at different addresses in " |
| 519 |
"different processes. Therefore, any pointers maintained within the shared " |
| 520 |
"memory must be made relative (typically to the starting address of the " |
| 521 |
"segment), rather than absolute." |
| 522 |
msgstr "" |
| 523 |
"استخدام B<shmat>() مع I<shmaddr> يساوي NULL هو الطريقة المفضلة والمحمولة " |
| 524 |
"لوصل مقطع ذاكرة مشتركة. كن على علم بأن مقطع الذاكرة المشتركة الموصول بهذه " |
| 525 |
"الطريقة قد يُوصل بعناوين مختلفة في عمليات مختلفة. لذلك، يجب جعل أي مؤشرات " |
| 526 |
"محفوظة داخل الذاكرة المشتركة نسبية (عادةً إلى عنوان بداية المقطع)، بدلاً من " |
| 527 |
"مطلقة." |
| 528 |
|
| 529 |
#. type: Plain text |
| 530 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 531 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 532 |
msgid "" |
| 533 |
"On Linux, it is possible to attach a shared memory segment even if it is " |
| 534 |
"already marked to be deleted. However, POSIX.1 does not specify this " |
| 535 |
"behavior and many other implementations do not support it." |
| 536 |
msgstr "" |
| 537 |
"في لينكس، من الممكن وصل مقطع ذاكرة مشتركة حتى لو كان مُعلماً بالفعل للحذف. " |
| 538 |
"ومع ذلك، لا يحدد POSIX.1 هذا السلوك والعديد من التطبيقات الأخرى لا تدعمه." |
| 539 |
|
| 540 |
#. type: Plain text |
| 541 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 542 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 543 |
msgid "The following system parameter affects B<shmat>():" |
| 544 |
msgstr "المعامل النظامي التالي يؤثر على B<shmat>():" |
| 545 |
|
| 546 |
#. type: TP |
| 547 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 548 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 549 |
#, no-wrap |
| 550 |
msgid "B<SHMLBA>" |
| 551 |
msgstr "B<SHMLBA>" |
| 552 |
|
| 553 |
#. type: Plain text |
| 554 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 555 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 556 |
msgid "" |
| 557 |
"Segment low boundary address multiple. When explicitly specifying an attach " |
| 558 |
"address in a call to B<shmat>(), the caller should ensure that the address " |
| 559 |
"is a multiple of this value. This is necessary on some architectures, in " |
| 560 |
"order either to ensure good CPU cache performance or to ensure that " |
| 561 |
"different attaches of the same segment have consistent views within the CPU " |
| 562 |
"cache. B<SHMLBA> is normally some multiple of the system page size. (On " |
| 563 |
"many Linux architectures, B<SHMLBA> is the same as the system page size.)" |
| 564 |
msgstr "" |
| 565 |
"مضاعف عنوان الحد الأدنى للمقطع. عند تحديد عنوان وصل صراحةً في استدعاء لـ " |
| 566 |
"B<shmat>()، يجب على المستدعي التأكد من أن العنوان هو مضاعف لهذه القيمة. هذا " |
| 567 |
"ضروري في بعض البنى، إما لضمان أداء جيد لذاكرة التخزين المؤقت لوحدة المعالجة " |
| 568 |
"المركزية أو لضمان أن وصلات مختلفة لنفس المقطع لها مناظر متسقة داخل ذاكرة " |
| 569 |
"التخزين المؤقت لوحدة المعالجة المركزية. B<SHMLBA> عادةً ما يكون مضاعفاً لحجم " |
| 570 |
"صفحة النظام. (في العديد من بنى لينكس، B<SHMLBA> هو نفس حجم صفحة النظام.)" |
| 571 |
|
| 572 |
#. type: Plain text |
| 573 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 574 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 575 |
msgid "" |
| 576 |
"The implementation places no intrinsic per-process limit on the number of " |
| 577 |
"shared memory segments (B<SHMSEG>)." |
| 578 |
msgstr "" |
| 579 |
"لا يضع التطبيق حداً جوهرياً لكل عملية على عدد مقاطع الذاكرة المشتركة " |
| 580 |
"(B<SHMSEG>)." |
| 581 |
|
| 582 |
#. type: SH |
| 583 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 584 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 585 |
#, no-wrap |
| 586 |
msgid "EXAMPLES" |
| 587 |
msgstr "أمثلة" |
| 588 |
|
| 589 |
#. type: Plain text |
| 590 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 591 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 592 |
msgid "" |
| 593 |
"The two programs shown below exchange a string using a shared memory " |
| 594 |
"segment. Further details about the programs are given below. First, we " |
| 595 |
"show a shell session demonstrating their use." |
| 596 |
msgstr "" |
| 597 |
"يتبادل البرنامجان المعروضان أدناه سلسلة نصية باستخدام مقطع ذاكرة مشتركة. " |
| 598 |
"تُعطى تفاصيل إضافية حول البرامج أدناه. أولاً، نعرض جلسة شل توضح استخدامهما." |
| 599 |
|
| 600 |
#. type: Plain text |
| 601 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 602 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 603 |
msgid "" |
| 604 |
"In one terminal window, we run the \"reader\" program, which creates a " |
| 605 |
"System V shared memory segment and a System V semaphore set. The program " |
| 606 |
"prints out the IDs of the created objects, and then waits for the semaphore " |
| 607 |
"to change value." |
| 608 |
msgstr "" |
| 609 |
"في نافذة طرفية واحدة، نشغل برنامج \"القارئ\"، الذي ينشئ مقطع ذاكرة مشتركة من " |
| 610 |
"System V ومجموعة إشارة من System V. يطبع البرنامج معرفات الكائنات المنشأة، " |
| 611 |
"ثم ينتظر تغير قيمة الإشارة." |
| 612 |
|
| 613 |
#. type: Plain text |
| 614 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 615 |
#: opensuse-tumbleweed |
| 616 |
#, no-wrap |
| 617 |
msgid "" |
| 618 |
"$B< ./svshm_string_read>;\n" |
| 619 |
"shmid = 1114194\n" |
| 620 |
"semid = 15\n" |
| 621 |
msgstr "" |
| 622 |
"$B< ./svshm_string_read>;\n" |
| 623 |
"shmid = 1114194\n" |
| 624 |
"semid = 15\n" |
| 625 |
|
| 626 |
#. type: Plain text |
| 627 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 628 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 629 |
msgid "" |
| 630 |
"In another terminal window, we run the \"writer\" program. The \"writer\" " |
| 631 |
"program takes three command-line arguments: the IDs of the shared memory " |
| 632 |
"segment and semaphore set created by the \"reader\", and a string. It " |
| 633 |
"attaches the existing shared memory segment, copies the string to the shared " |
| 634 |
"memory, and modifies the semaphore value." |
| 635 |
msgstr "" |
| 636 |
"في نافذة طرفية أخرى، نشغل برنامج \"الكاتب\". يأخذ برنامج \"الكاتب\" ثلاث " |
| 637 |
"وسائط لسطر الأوامر: معرفات مقطع الذاكرة المشتركة ومجموعة الإشارة المنشأة " |
| 638 |
"بواسطة \"القارئ\"، وسلسلة نصية. يصل مقطع الذاكرة المشتركة الموجود، وينسخ " |
| 639 |
"السلسلة النصية إلى الذاكرة المشتركة، ويعدل قيمة الإشارة." |
| 640 |
|
| 641 |
#. type: Plain text |
| 642 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 643 |
#: opensuse-tumbleweed |
| 644 |
#, no-wrap |
| 645 |
msgid "$B< ./svshm_string_write 1114194 15 \\[aq]Hello, world\\[aq]>;\n" |
| 646 |
msgstr "$B< ./svshm_string_write 1114194 15 \\[aq]Hello, world\\[aq]>;\n" |
| 647 |
|
| 648 |
#. type: Plain text |
| 649 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 650 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 651 |
msgid "" |
| 652 |
"Returning to the terminal where the \"reader\" is running, we see that the " |
| 653 |
"program has ceased waiting on the semaphore and has printed the string that " |
| 654 |
"was copied into the shared memory segment by the writer:" |
| 655 |
msgstr "" |
| 656 |
"بالعودة إلى الطرفية حيث يعمل \"القارئ\"، نرى أن البرنامج توقف عن الانتظار " |
| 657 |
"على الإشارة وطبع السلسلة النصية التي نُسخت إلى مقطع الذاكرة المشتركة بواسطة " |
| 658 |
"الكاتب:" |
| 659 |
|
| 660 |
#. type: Plain text |
| 661 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 662 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 663 |
#, no-wrap |
| 664 |
msgid "Hello, world\n" |
| 665 |
msgstr "Hello, world\n" |
| 666 |
|
| 667 |
#. type: SS |
| 668 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 669 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 670 |
#, no-wrap |
| 671 |
msgid "Program source: svshm_string.h" |
| 672 |
msgstr "مصدر البرنامج: svshm_string.h" |
| 673 |
|
| 674 |
#. type: Plain text |
| 675 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 676 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 677 |
msgid "" |
| 678 |
"The following header file is included by the \"reader\" and \"writer\" " |
| 679 |
"programs:" |
| 680 |
msgstr "ملف الرأس التالي مُضمن بواسطة برنامجي \"القارئ\" و\"الكاتب\":" |
| 681 |
|
| 682 |
#. type: Plain text |
| 683 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 684 |
#: opensuse-tumbleweed |
| 685 |
#, no-wrap |
| 686 |
msgid "" |
| 687 |
"/* svshm_string.h\n" |
| 688 |
"\\&\n" |
| 689 |
" Licensed under GNU General Public License v2 or later.\n" |
| 690 |
"*/\n" |
| 691 |
"#ifndef SVSHM_STRING_H\n" |
| 692 |
"#define SVSHM_STRING_H\n" |
| 693 |
"\\&\n" |
| 694 |
"#include E<lt>err.hE<gt>\n" |
| 695 |
"#include E<lt>stdio.hE<gt>\n" |
| 696 |
"#include E<lt>stdlib.hE<gt>\n" |
| 697 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 698 |
"\\&\n" |
| 699 |
"union semun { /* Used in calls to semctl() */\n" |
| 700 |
" int val;\n" |
| 701 |
" struct semid_ds *buf;\n" |
| 702 |
" unsigned short *array;\n" |
| 703 |
"#if defined(__linux__)\n" |
| 704 |
" struct seminfo *__buf;\n" |
| 705 |
"#endif\n" |
| 706 |
"};\n" |
| 707 |
"\\&\n" |
| 708 |
"#define MEM_SIZE 4096\n" |
| 709 |
"\\&\n" |
| 710 |
"#endif // include guard\n" |
| 711 |
msgstr "" |
| 712 |
"/* svshm_string.h\n" |
| 713 |
"\\&\n" |
| 714 |
" Licensed under GNU General Public License v2 or later.\n" |
| 715 |
"*/\n" |
| 716 |
"#ifndef SVSHM_STRING_H\n" |
| 717 |
"#define SVSHM_STRING_H\n" |
| 718 |
"\\&\n" |
| 719 |
"#include E<lt>err.hE<gt>\n" |
| 720 |
"#include E<lt>stdio.hE<gt>\n" |
| 721 |
"#include E<lt>stdlib.hE<gt>\n" |
| 722 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 723 |
"\\&\n" |
| 724 |
"union semun { /* Used in calls to semctl() */\n" |
| 725 |
" int val;\n" |
| 726 |
" struct semid_ds *buf;\n" |
| 727 |
" unsigned short *array;\n" |
| 728 |
"#if defined(__linux__)\n" |
| 729 |
" struct seminfo *__buf;\n" |
| 730 |
"#endif\n" |
| 731 |
"};\n" |
| 732 |
"\\&\n" |
| 733 |
"#define MEM_SIZE 4096\n" |
| 734 |
"\\&\n" |
| 735 |
"#endif // include guard\n" |
| 736 |
|
| 737 |
#. type: SS |
| 738 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 739 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 740 |
#, no-wrap |
| 741 |
msgid "Program source: svshm_string_read.c" |
| 742 |
msgstr "مصدر البرنامج: svshm_string_read.c" |
| 743 |
|
| 744 |
#. type: Plain text |
| 745 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 746 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 747 |
msgid "" |
| 748 |
"The \"reader\" program creates a shared memory segment and a semaphore set " |
| 749 |
"containing one semaphore. It then attaches the shared memory object into " |
| 750 |
"its address space and initializes the semaphore value to 1. Finally, the " |
| 751 |
"program waits for the semaphore value to become 0, and afterwards prints the " |
| 752 |
"string that has been copied into the shared memory segment by the \"writer\"." |
| 753 |
msgstr "" |
| 754 |
"ينشئ برنامج \"القارئ\" مقطع ذاكرة مشتركة ومجموعة إشارة تحتوي على إشارة " |
| 755 |
"واحدة. ثم يصل كائن الذاكرة المشتركة إلى مساحة عنوانه ويُهيئ قيمة الإشارة إلى " |
| 756 |
"1. أخيراً، ينتظر البرنامج حتى تصبح قيمة الإشارة 0، وبعد ذلك يطبع السلسلة " |
| 757 |
"النصية التي نُسخت إلى مقطع الذاكرة المشتركة بواسطة \"الكاتب\"." |
| 758 |
|
| 759 |
#. type: Plain text |
| 760 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 761 |
#: opensuse-tumbleweed |
| 762 |
#, no-wrap |
| 763 |
msgid "" |
| 764 |
"/* svshm_string_read.c\n" |
| 765 |
"\\&\n" |
| 766 |
" Licensed under GNU General Public License v2 or later.\n" |
| 767 |
"*/\n" |
| 768 |
"#include E<lt>err.hE<gt>\n" |
| 769 |
"#include E<lt>stdio.hE<gt>\n" |
| 770 |
"#include E<lt>stdlib.hE<gt>\n" |
| 771 |
"#include E<lt>sys/ipc.hE<gt>\n" |
| 772 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 773 |
"#include E<lt>sys/shm.hE<gt>\n" |
| 774 |
"\\&\n" |
| 775 |
"#include \"svshm_string.h\"\n" |
| 776 |
"\\&\n" |
| 777 |
"int\n" |
| 778 |
"main(void)\n" |
| 779 |
"{\n" |
| 780 |
" int semid, shmid;\n" |
| 781 |
" char *addr;\n" |
| 782 |
" union semun arg, dummy;\n" |
| 783 |
" struct sembuf sop;\n" |
| 784 |
"\\&\n" |
| 785 |
" /* Create shared memory and semaphore set containing one\n" |
| 786 |
" semaphore. */\n" |
| 787 |
"\\&\n" |
| 788 |
" shmid = shmget(IPC_PRIVATE, MEM_SIZE, IPC_CREAT | 0600);\n" |
| 789 |
" if (shmid == -1)\n" |
| 790 |
" err(EXIT_FAILURE, \"shmget\");\n" |
| 791 |
"\\&\n" |
| 792 |
" semid = semget(IPC_PRIVATE, 1, IPC_CREAT | 0600);\n" |
| 793 |
" if (semid == -1)\n" |
| 794 |
" err(EXIT_FAILURE, \"semget\");\n" |
| 795 |
"\\&\n" |
| 796 |
" /* Attach shared memory into our address space. */\n" |
| 797 |
"\\&\n" |
| 798 |
" addr = shmat(shmid, NULL, SHM_RDONLY);\n" |
| 799 |
" if (addr == (void *) -1)\n" |
| 800 |
" err(EXIT_FAILURE, \"shmat\");\n" |
| 801 |
"\\&\n" |
| 802 |
" /* Initialize semaphore 0 in set with value 1. */\n" |
| 803 |
"\\&\n" |
| 804 |
" arg.val = 1;\n" |
| 805 |
" if (semctl(semid, 0, SETVAL, arg) == -1)\n" |
| 806 |
" err(EXIT_FAILURE, \"semctl\");\n" |
| 807 |
"\\&\n" |
| 808 |
" printf(\"shmid = %d\\[rs]n\", shmid);\n" |
| 809 |
" printf(\"semid = %d\\[rs]n\", semid);\n" |
| 810 |
"\\&\n" |
| 811 |
" /* Wait for semaphore value to become 0. */\n" |
| 812 |
"\\&\n" |
| 813 |
" sop.sem_num = 0;\n" |
| 814 |
" sop.sem_op = 0;\n" |
| 815 |
" sop.sem_flg = 0;\n" |
| 816 |
"\\&\n" |
| 817 |
" if (semop(semid, &sop, 1) == -1)\n" |
| 818 |
" err(EXIT_FAILURE, \"semop\");\n" |
| 819 |
"\\&\n" |
| 820 |
" /* Print the string from shared memory. */\n" |
| 821 |
"\\&\n" |
| 822 |
" printf(\"%s\\[rs]n\", addr);\n" |
| 823 |
"\\&\n" |
| 824 |
" /* Remove shared memory and semaphore set. */\n" |
| 825 |
"\\&\n" |
| 826 |
" if (shmctl(shmid, IPC_RMID, NULL) == -1)\n" |
| 827 |
" err(EXIT_FAILURE, \"shmctl\");\n" |
| 828 |
" if (semctl(semid, 0, IPC_RMID, dummy) == -1)\n" |
| 829 |
" err(EXIT_FAILURE, \"semctl\");\n" |
| 830 |
"\\&\n" |
| 831 |
" exit(EXIT_SUCCESS);\n" |
| 832 |
"}\n" |
| 833 |
msgstr "" |
| 834 |
"/* svshm_string_read.c\n" |
| 835 |
"\\&\n" |
| 836 |
" Licensed under GNU General Public License v2 or later.\n" |
| 837 |
"*/\n" |
| 838 |
"#include E<lt>err.hE<gt>\n" |
| 839 |
"#include E<lt>stdio.hE<gt>\n" |
| 840 |
"#include E<lt>stdlib.hE<gt>\n" |
| 841 |
"#include E<lt>sys/ipc.hE<gt>\n" |
| 842 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 843 |
"#include E<lt>sys/shm.hE<gt>\n" |
| 844 |
"\\&\n" |
| 845 |
"#include \"svshm_string.h\"\n" |
| 846 |
"\\&\n" |
| 847 |
"int\n" |
| 848 |
"main(void)\n" |
| 849 |
"{\n" |
| 850 |
" int semid, shmid;\n" |
| 851 |
" char *addr;\n" |
| 852 |
" union semun arg, dummy;\n" |
| 853 |
" struct sembuf sop;\n" |
| 854 |
"\\&\n" |
| 855 |
" /* Create shared memory and semaphore set containing one\n" |
| 856 |
" semaphore. */\n" |
| 857 |
"\\&\n" |
| 858 |
" shmid = shmget(IPC_PRIVATE, MEM_SIZE, IPC_CREAT | 0600);\n" |
| 859 |
" if (shmid == -1)\n" |
| 860 |
" err(EXIT_FAILURE, \"shmget\");\n" |
| 861 |
"\\&\n" |
| 862 |
" semid = semget(IPC_PRIVATE, 1, IPC_CREAT | 0600);\n" |
| 863 |
" if (semid == -1)\n" |
| 864 |
" err(EXIT_FAILURE, \"semget\");\n" |
| 865 |
"\\&\n" |
| 866 |
" /* Attach shared memory into our address space. */\n" |
| 867 |
"\\&\n" |
| 868 |
" addr = shmat(shmid, NULL, SHM_RDONLY);\n" |
| 869 |
" if (addr == (void *) -1)\n" |
| 870 |
" err(EXIT_FAILURE, \"shmat\");\n" |
| 871 |
"\\&\n" |
| 872 |
" /* Initialize semaphore 0 in set with value 1. */\n" |
| 873 |
"\\&\n" |
| 874 |
" arg.val = 1;\n" |
| 875 |
" if (semctl(semid, 0, SETVAL, arg) == -1)\n" |
| 876 |
" err(EXIT_FAILURE, \"semctl\");\n" |
| 877 |
"\\&\n" |
| 878 |
" printf(\"shmid = %d\\[rs]n\", shmid);\n" |
| 879 |
" printf(\"semid = %d\\[rs]n\", semid);\n" |
| 880 |
"\\&\n" |
| 881 |
" /* Wait for semaphore value to become 0. */\n" |
| 882 |
"\\&\n" |
| 883 |
" sop.sem_num = 0;\n" |
| 884 |
" sop.sem_op = 0;\n" |
| 885 |
" sop.sem_flg = 0;\n" |
| 886 |
"\\&\n" |
| 887 |
" if (semop(semid, &sop, 1) == -1)\n" |
| 888 |
" err(EXIT_FAILURE, \"semop\");\n" |
| 889 |
"\\&\n" |
| 890 |
" /* Print the string from shared memory. */\n" |
| 891 |
"\\&\n" |
| 892 |
" printf(\"%s\\[rs]n\", addr);\n" |
| 893 |
"\\&\n" |
| 894 |
" /* Remove shared memory and semaphore set. */\n" |
| 895 |
"\\&\n" |
| 896 |
" if (shmctl(shmid, IPC_RMID, NULL) == -1)\n" |
| 897 |
" err(EXIT_FAILURE, \"shmctl\");\n" |
| 898 |
" if (semctl(semid, 0, IPC_RMID, dummy) == -1)\n" |
| 899 |
" err(EXIT_FAILURE, \"semctl\");\n" |
| 900 |
"\\&\n" |
| 901 |
" exit(EXIT_SUCCESS);\n" |
| 902 |
"}\n" |
| 903 |
|
| 904 |
#. type: SS |
| 905 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 906 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 907 |
#, no-wrap |
| 908 |
msgid "Program source: svshm_string_write.c" |
| 909 |
msgstr "مصدر البرنامج: svshm_string_write.c" |
| 910 |
|
| 911 |
#. type: Plain text |
| 912 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 913 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 914 |
msgid "" |
| 915 |
"The writer program takes three command-line arguments: the IDs of the shared " |
| 916 |
"memory segment and semaphore set that have already been created by the " |
| 917 |
"\"reader\", and a string. It attaches the shared memory segment into its " |
| 918 |
"address space, and then decrements the semaphore value to 0 in order to " |
| 919 |
"inform the \"reader\" that it can now examine the contents of the shared " |
| 920 |
"memory." |
| 921 |
msgstr "" |
| 922 |
"يأخذ برنامج الكاتب ثلاث وسائط لسطر الأوامر: معرفات مقطع الذاكرة المشتركة " |
| 923 |
"ومجموعة الإشارة التي أنشأها \"القارئ\" بالفعل، وسلسلة نصية. يصل مقطع " |
| 924 |
"الذاكرة المشتركة إلى مساحة عنوانه، ثم يُنقص قيمة الإشارة إلى 0 لإعلام " |
| 925 |
"\"القارئ\" بأنه يمكنه الآن فحص محتويات الذاكرة المشتركة." |
| 926 |
|
| 927 |
#. type: Plain text |
| 928 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 929 |
#: opensuse-tumbleweed |
| 930 |
#, no-wrap |
| 931 |
msgid "" |
| 932 |
"/* svshm_string_write.c\n" |
| 933 |
"\\&\n" |
| 934 |
" Licensed under GNU General Public License v2 or later.\n" |
| 935 |
"*/\n" |
| 936 |
"#include E<lt>err.hE<gt>\n" |
| 937 |
"#include E<lt>stdio.hE<gt>\n" |
| 938 |
"#include E<lt>stdlib.hE<gt>\n" |
| 939 |
"#include E<lt>string.hE<gt>\n" |
| 940 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 941 |
"#include E<lt>sys/shm.hE<gt>\n" |
| 942 |
"\\&\n" |
| 943 |
"#include \"svshm_string.h\"\n" |
| 944 |
"\\&\n" |
| 945 |
"int\n" |
| 946 |
"main(int argc, char *argv[])\n" |
| 947 |
"{\n" |
| 948 |
" int semid, shmid;\n" |
| 949 |
" char *addr;\n" |
| 950 |
" size_t size;\n" |
| 951 |
" struct sembuf sop;\n" |
| 952 |
"\\&\n" |
| 953 |
" if (argc != 4) {\n" |
| 954 |
" fprintf(stderr, \"Usage: %s shmid semid string\\[rs]n\", argv[0]);\n" |
| 955 |
" exit(EXIT_FAILURE);\n" |
| 956 |
" }\n" |
| 957 |
"\\&\n" |
| 958 |
" size = strlen(argv[3]) + 1; /* +1 to include trailing \\[aq]\\[rs]0\\[aq] */\n" |
| 959 |
" if (size E<gt> MEM_SIZE) {\n" |
| 960 |
" fprintf(stderr, \"String is too big!\\[rs]n\");\n" |
| 961 |
" exit(EXIT_FAILURE);\n" |
| 962 |
" }\n" |
| 963 |
"\\&\n" |
| 964 |
" /* Get object IDs from command-line. */\n" |
| 965 |
"\\&\n" |
| 966 |
" shmid = atoi(argv[1]);\n" |
| 967 |
" semid = atoi(argv[2]);\n" |
| 968 |
"\\&\n" |
| 969 |
" /* Attach shared memory into our address space and copy string\n" |
| 970 |
" (including trailing null byte) into memory. */\n" |
| 971 |
"\\&\n" |
| 972 |
" addr = shmat(shmid, NULL, 0);\n" |
| 973 |
" if (addr == (void *) -1)\n" |
| 974 |
" err(EXIT_FAILURE, \"shmat\");\n" |
| 975 |
"\\&\n" |
| 976 |
" memcpy(addr, argv[3], size);\n" |
| 977 |
"\\&\n" |
| 978 |
" /* Decrement semaphore to 0. */\n" |
| 979 |
"\\&\n" |
| 980 |
" sop.sem_num = 0;\n" |
| 981 |
" sop.sem_op = -1;\n" |
| 982 |
" sop.sem_flg = 0;\n" |
| 983 |
"\\&\n" |
| 984 |
" if (semop(semid, &sop, 1) == -1)\n" |
| 985 |
" err(EXIT_FAILURE, \"semop\");\n" |
| 986 |
"\\&\n" |
| 987 |
" exit(EXIT_SUCCESS);\n" |
| 988 |
"}\n" |
| 989 |
msgstr "" |
| 990 |
"/* svshm_string_write.c\n" |
| 991 |
"\\&\n" |
| 992 |
" Licensed under GNU General Public License v2 or later.\n" |
| 993 |
"*/\n" |
| 994 |
"#include E<lt>err.hE<gt>\n" |
| 995 |
"#include E<lt>stdio.hE<gt>\n" |
| 996 |
"#include E<lt>stdlib.hE<gt>\n" |
| 997 |
"#include E<lt>string.hE<gt>\n" |
| 998 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 999 |
"#include E<lt>sys/shm.hE<gt>\n" |
| 1000 |
"\\&\n" |
| 1001 |
"#include \"svshm_string.h\"\n" |
| 1002 |
"\\&\n" |
| 1003 |
"int\n" |
| 1004 |
"main(int argc, char *argv[])\n" |
| 1005 |
"{\n" |
| 1006 |
" int semid, shmid;\n" |
| 1007 |
" char *addr;\n" |
| 1008 |
" size_t size;\n" |
| 1009 |
" struct sembuf sop;\n" |
| 1010 |
"\\&\n" |
| 1011 |
" if (argc != 4) {\n" |
| 1012 |
" fprintf(stderr, \"Usage: %s shmid semid string\\[rs]n\", argv[0]);\n" |
| 1013 |
" exit(EXIT_FAILURE);\n" |
| 1014 |
" }\n" |
| 1015 |
"\\&\n" |
| 1016 |
" size = strlen(argv[3]) + 1; /* +1 to include trailing \\[aq]\\[rs]0\\[aq] */\n" |
| 1017 |
" if (size E<gt> MEM_SIZE) {\n" |
| 1018 |
" fprintf(stderr, \"String is too big!\\[rs]n\");\n" |
| 1019 |
" exit(EXIT_FAILURE);\n" |
| 1020 |
" }\n" |
| 1021 |
"\\&\n" |
| 1022 |
" /* Get object IDs from command-line. */\n" |
| 1023 |
"\\&\n" |
| 1024 |
" shmid = atoi(argv[1]);\n" |
| 1025 |
" semid = atoi(argv[2]);\n" |
| 1026 |
"\\&\n" |
| 1027 |
" /* Attach shared memory into our address space and copy string\n" |
| 1028 |
" (including trailing null byte) into memory. */\n" |
| 1029 |
"\\&\n" |
| 1030 |
" addr = shmat(shmid, NULL, 0);\n" |
| 1031 |
" if (addr == (void *) -1)\n" |
| 1032 |
" err(EXIT_FAILURE, \"shmat\");\n" |
| 1033 |
"\\&\n" |
| 1034 |
" memcpy(addr, argv[3], size);\n" |
| 1035 |
"\\&\n" |
| 1036 |
" /* Decrement semaphore to 0. */\n" |
| 1037 |
"\\&\n" |
| 1038 |
" sop.sem_num = 0;\n" |
| 1039 |
" sop.sem_op = -1;\n" |
| 1040 |
" sop.sem_flg = 0;\n" |
| 1041 |
"\\&\n" |
| 1042 |
" if (semop(semid, &sop, 1) == -1)\n" |
| 1043 |
" err(EXIT_FAILURE, \"semop\");\n" |
| 1044 |
"\\&\n" |
| 1045 |
" exit(EXIT_SUCCESS);\n" |
| 1046 |
"}\n" |
| 1047 |
|
| 1048 |
#. type: SH |
| 1049 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1050 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1051 |
#, no-wrap |
| 1052 |
msgid "SEE ALSO" |
| 1053 |
msgstr "انظر أيضًا" |
| 1054 |
|
| 1055 |
#. type: Plain text |
| 1056 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1057 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1058 |
msgid "" |
| 1059 |
"B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), " |
| 1060 |
"B<shm_overview>(7), B<sysvipc>(7)" |
| 1061 |
msgstr "" |
| 1062 |
"B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), " |
| 1063 |
"B<shm_overview>(7), B<sysvipc>(7)" |
| 1064 |
|
| 1065 |
#. type: TH |
| 1066 |
#: debian-trixie |
| 1067 |
#, no-wrap |
| 1068 |
msgid "2024-06-15" |
| 1069 |
msgstr "15 يونيو 2024" |
| 1070 |
|
| 1071 |
#. type: TH |
| 1072 |
#: debian-trixie |
| 1073 |
#, no-wrap |
| 1074 |
msgid "Linux man-pages 6.9.1" |
| 1075 |
msgstr "صفحات دليل لينكس 6.9.1" |
| 1076 |
|
| 1077 |
#. type: Plain text |
| 1078 |
#: debian-trixie |
| 1079 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 1080 |
msgstr "مكتبة سي المعيارية (I<libc>، I<-lc>)" |
| 1081 |
|
| 1082 |
#. type: Plain text |
| 1083 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1084 |
msgid "" |
| 1085 |
"Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was " |
| 1086 |
"not specified) or invalid I<shmaddr> value, or can't attach segment at " |
| 1087 |
"I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL." |
| 1088 |
msgstr "" |
| 1089 |
"قيمة I<shmid> غير صالحة، غير محاذية (أي غير محاذية للصفحة ولم يُحدد " |
| 1090 |
"B<SHM_RND>) أو قيمة I<shmaddr> غير صالحة، أو تعذر إرفاق المقطع عند " |
| 1091 |
"I<shmaddr>، أو تم تحديد B<SHM_REMAP> وكان I<shmaddr> فارغًا." |
| 1092 |
|
| 1093 |
#. type: Plain text |
| 1094 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1095 |
#, no-wrap |
| 1096 |
msgid "" |
| 1097 |
"$ B<./svshm_string_read>\n" |
| 1098 |
"shmid = 1114194; semid = 15\n" |
| 1099 |
msgstr "" |
| 1100 |
"$ B<./svshm_string_read>\n" |
| 1101 |
"shmid = 1114194; semid = 15\n" |
| 1102 |
|
| 1103 |
#. type: Plain text |
| 1104 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1105 |
#, no-wrap |
| 1106 |
msgid "$ B<./svshm_string_write 1114194 15 \\[aq]Hello, world\\[aq]>\n" |
| 1107 |
msgstr "$ B<./svshm_string_write 1114194 15 \\[aq]Hello, world\\[aq]>\n" |
| 1108 |
|
| 1109 |
#. type: Plain text |
| 1110 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1111 |
#, no-wrap |
| 1112 |
msgid "" |
| 1113 |
"/* svshm_string.h\n" |
| 1114 |
"\\&\n" |
| 1115 |
" Licensed under GNU General Public License v2 or later.\n" |
| 1116 |
"*/\n" |
| 1117 |
"#ifndef SVSHM_STRING_H\n" |
| 1118 |
"#define SVSHM_STRING_H\n" |
| 1119 |
"\\&\n" |
| 1120 |
"#include E<lt>stdio.hE<gt>\n" |
| 1121 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1122 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 1123 |
"\\&\n" |
| 1124 |
"#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\[rs]\n" |
| 1125 |
" } while (0)\n" |
| 1126 |
"\\&\n" |
| 1127 |
"union semun { /* Used in calls to semctl() */\n" |
| 1128 |
" int val;\n" |
| 1129 |
" struct semid_ds *buf;\n" |
| 1130 |
" unsigned short *array;\n" |
| 1131 |
"#if defined(__linux__)\n" |
| 1132 |
" struct seminfo *__buf;\n" |
| 1133 |
"#endif\n" |
| 1134 |
"};\n" |
| 1135 |
"\\&\n" |
| 1136 |
"#define MEM_SIZE 4096\n" |
| 1137 |
"\\&\n" |
| 1138 |
"#endif // include guard\n" |
| 1139 |
msgstr "" |
| 1140 |
"/* svshm_string.h\n" |
| 1141 |
"\\&\n" |
| 1142 |
" Licensed under GNU General Public License v2 or later.\n" |
| 1143 |
"*/\n" |
| 1144 |
"#ifndef SVSHM_STRING_H\n" |
| 1145 |
"#define SVSHM_STRING_H\n" |
| 1146 |
"\\&\n" |
| 1147 |
"#include E<lt>stdio.hE<gt>\n" |
| 1148 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1149 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 1150 |
"\\&\n" |
| 1151 |
"#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\[rs]\n" |
| 1152 |
" } while (0)\n" |
| 1153 |
"\\&\n" |
| 1154 |
"union semun { /* Used in calls to semctl() */\n" |
| 1155 |
" int val;\n" |
| 1156 |
" struct semid_ds *buf;\n" |
| 1157 |
" unsigned short *array;\n" |
| 1158 |
"#if defined(__linux__)\n" |
| 1159 |
" struct seminfo *__buf;\n" |
| 1160 |
"#endif\n" |
| 1161 |
"};\n" |
| 1162 |
"\\&\n" |
| 1163 |
"#define MEM_SIZE 4096\n" |
| 1164 |
"\\&\n" |
| 1165 |
"#endif // include guard\n" |
| 1166 |
|
| 1167 |
#. type: Plain text |
| 1168 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1169 |
#, no-wrap |
| 1170 |
msgid "" |
| 1171 |
"/* svshm_string_read.c\n" |
| 1172 |
"\\&\n" |
| 1173 |
" Licensed under GNU General Public License v2 or later.\n" |
| 1174 |
"*/\n" |
| 1175 |
"#include E<lt>stdio.hE<gt>\n" |
| 1176 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1177 |
"#include E<lt>sys/ipc.hE<gt>\n" |
| 1178 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 1179 |
"#include E<lt>sys/shm.hE<gt>\n" |
| 1180 |
"\\&\n" |
| 1181 |
"#include \"svshm_string.h\"\n" |
| 1182 |
"\\&\n" |
| 1183 |
"int\n" |
| 1184 |
"main(void)\n" |
| 1185 |
"{\n" |
| 1186 |
" int semid, shmid;\n" |
| 1187 |
" char *addr;\n" |
| 1188 |
" union semun arg, dummy;\n" |
| 1189 |
" struct sembuf sop;\n" |
| 1190 |
"\\&\n" |
| 1191 |
" /* Create shared memory and semaphore set containing one\n" |
| 1192 |
" semaphore. */\n" |
| 1193 |
"\\&\n" |
| 1194 |
" shmid = shmget(IPC_PRIVATE, MEM_SIZE, IPC_CREAT | 0600);\n" |
| 1195 |
" if (shmid == -1)\n" |
| 1196 |
" errExit(\"shmget\");\n" |
| 1197 |
"\\&\n" |
| 1198 |
" semid = semget(IPC_PRIVATE, 1, IPC_CREAT | 0600);\n" |
| 1199 |
" if (semid == -1)\n" |
| 1200 |
" errExit(\"semget\");\n" |
| 1201 |
"\\&\n" |
| 1202 |
" /* Attach shared memory into our address space. */\n" |
| 1203 |
"\\&\n" |
| 1204 |
" addr = shmat(shmid, NULL, SHM_RDONLY);\n" |
| 1205 |
" if (addr == (void *) -1)\n" |
| 1206 |
" errExit(\"shmat\");\n" |
| 1207 |
"\\&\n" |
| 1208 |
" /* Initialize semaphore 0 in set with value 1. */\n" |
| 1209 |
"\\&\n" |
| 1210 |
" arg.val = 1;\n" |
| 1211 |
" if (semctl(semid, 0, SETVAL, arg) == -1)\n" |
| 1212 |
" errExit(\"semctl\");\n" |
| 1213 |
"\\&\n" |
| 1214 |
" printf(\"shmid = %d; semid = %d\\[rs]n\", shmid, semid);\n" |
| 1215 |
"\\&\n" |
| 1216 |
" /* Wait for semaphore value to become 0. */\n" |
| 1217 |
"\\&\n" |
| 1218 |
" sop.sem_num = 0;\n" |
| 1219 |
" sop.sem_op = 0;\n" |
| 1220 |
" sop.sem_flg = 0;\n" |
| 1221 |
"\\&\n" |
| 1222 |
" if (semop(semid, &sop, 1) == -1)\n" |
| 1223 |
" errExit(\"semop\");\n" |
| 1224 |
"\\&\n" |
| 1225 |
" /* Print the string from shared memory. */\n" |
| 1226 |
"\\&\n" |
| 1227 |
" printf(\"%s\\[rs]n\", addr);\n" |
| 1228 |
"\\&\n" |
| 1229 |
" /* Remove shared memory and semaphore set. */\n" |
| 1230 |
"\\&\n" |
| 1231 |
" if (shmctl(shmid, IPC_RMID, NULL) == -1)\n" |
| 1232 |
" errExit(\"shmctl\");\n" |
| 1233 |
" if (semctl(semid, 0, IPC_RMID, dummy) == -1)\n" |
| 1234 |
" errExit(\"semctl\");\n" |
| 1235 |
"\\&\n" |
| 1236 |
" exit(EXIT_SUCCESS);\n" |
| 1237 |
"}\n" |
| 1238 |
msgstr "" |
| 1239 |
"/* svshm_string_read.c\n" |
| 1240 |
"\\&\n" |
| 1241 |
" Licensed under GNU General Public License v2 or later.\n" |
| 1242 |
"*/\n" |
| 1243 |
"#include E<lt>stdio.hE<gt>\n" |
| 1244 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1245 |
"#include E<lt>sys/ipc.hE<gt>\n" |
| 1246 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 1247 |
"#include E<lt>sys/shm.hE<gt>\n" |
| 1248 |
"\\&\n" |
| 1249 |
"#include \"svshm_string.h\"\n" |
| 1250 |
"\\&\n" |
| 1251 |
"int\n" |
| 1252 |
"main(void)\n" |
| 1253 |
"{\n" |
| 1254 |
" int semid, shmid;\n" |
| 1255 |
" char *addr;\n" |
| 1256 |
" union semun arg, dummy;\n" |
| 1257 |
" struct sembuf sop;\n" |
| 1258 |
"\\&\n" |
| 1259 |
" /* Create shared memory and semaphore set containing one\n" |
| 1260 |
" semaphore. */\n" |
| 1261 |
"\\&\n" |
| 1262 |
" shmid = shmget(IPC_PRIVATE, MEM_SIZE, IPC_CREAT | 0600);\n" |
| 1263 |
" if (shmid == -1)\n" |
| 1264 |
" errExit(\"shmget\");\n" |
| 1265 |
"\\&\n" |
| 1266 |
" semid = semget(IPC_PRIVATE, 1, IPC_CREAT | 0600);\n" |
| 1267 |
" if (semid == -1)\n" |
| 1268 |
" errExit(\"semget\");\n" |
| 1269 |
"\\&\n" |
| 1270 |
" /* Attach shared memory into our address space. */\n" |
| 1271 |
"\\&\n" |
| 1272 |
" addr = shmat(shmid, NULL, SHM_RDONLY);\n" |
| 1273 |
" if (addr == (void *) -1)\n" |
| 1274 |
" errExit(\"shmat\");\n" |
| 1275 |
"\\&\n" |
| 1276 |
" /* Initialize semaphore 0 in set with value 1. */\n" |
| 1277 |
"\\&\n" |
| 1278 |
" arg.val = 1;\n" |
| 1279 |
" if (semctl(semid, 0, SETVAL, arg) == -1)\n" |
| 1280 |
" errExit(\"semctl\");\n" |
| 1281 |
"\\&\n" |
| 1282 |
" printf(\"shmid = %d; semid = %d\\[rs]n\", shmid, semid);\n" |
| 1283 |
"\\&\n" |
| 1284 |
" /* Wait for semaphore value to become 0. */\n" |
| 1285 |
"\\&\n" |
| 1286 |
" sop.sem_num = 0;\n" |
| 1287 |
" sop.sem_op = 0;\n" |
| 1288 |
" sop.sem_flg = 0;\n" |
| 1289 |
"\\&\n" |
| 1290 |
" if (semop(semid, &sop, 1) == -1)\n" |
| 1291 |
" errExit(\"semop\");\n" |
| 1292 |
"\\&\n" |
| 1293 |
" /* Print the string from shared memory. */\n" |
| 1294 |
"\\&\n" |
| 1295 |
" printf(\"%s\\[rs]n\", addr);\n" |
| 1296 |
"\\&\n" |
| 1297 |
" /* Remove shared memory and semaphore set. */\n" |
| 1298 |
"\\&\n" |
| 1299 |
" if (shmctl(shmid, IPC_RMID, NULL) == -1)\n" |
| 1300 |
" errExit(\"shmctl\");\n" |
| 1301 |
" if (semctl(semid, 0, IPC_RMID, dummy) == -1)\n" |
| 1302 |
" errExit(\"semctl\");\n" |
| 1303 |
"\\&\n" |
| 1304 |
" exit(EXIT_SUCCESS);\n" |
| 1305 |
"}\n" |
| 1306 |
|
| 1307 |
#. type: Plain text |
| 1308 |
#: debian-trixie |
| 1309 |
#, no-wrap |
| 1310 |
msgid "" |
| 1311 |
"/* svshm_string_write.c\n" |
| 1312 |
"\\&\n" |
| 1313 |
" Licensed under GNU General Public License v2 or later.\n" |
| 1314 |
"*/\n" |
| 1315 |
"#include E<lt>stdio.hE<gt>\n" |
| 1316 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1317 |
"#include E<lt>string.hE<gt>\n" |
| 1318 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 1319 |
"#include E<lt>sys/shm.hE<gt>\n" |
| 1320 |
"\\&\n" |
| 1321 |
"#include \"svshm_string.h\"\n" |
| 1322 |
"\\&\n" |
| 1323 |
"int\n" |
| 1324 |
"main(int argc, char *argv[])\n" |
| 1325 |
"{\n" |
| 1326 |
" int semid, shmid;\n" |
| 1327 |
" char *addr;\n" |
| 1328 |
" size_t len;\n" |
| 1329 |
" struct sembuf sop;\n" |
| 1330 |
"\\&\n" |
| 1331 |
" if (argc != 4) {\n" |
| 1332 |
" fprintf(stderr, \"Usage: %s shmid semid string\\[rs]n\", argv[0]);\n" |
| 1333 |
" exit(EXIT_FAILURE);\n" |
| 1334 |
" }\n" |
| 1335 |
"\\&\n" |
| 1336 |
" len = strlen(argv[3]) + 1; /* +1 to include trailing \\[aq]\\[rs]0\\[aq] */\n" |
| 1337 |
" if (len E<gt> MEM_SIZE) {\n" |
| 1338 |
" fprintf(stderr, \"String is too big!\\[rs]n\");\n" |
| 1339 |
" exit(EXIT_FAILURE);\n" |
| 1340 |
" }\n" |
| 1341 |
"\\&\n" |
| 1342 |
" /* Get object IDs from command-line. */\n" |
| 1343 |
"\\&\n" |
| 1344 |
" shmid = atoi(argv[1]);\n" |
| 1345 |
" semid = atoi(argv[2]);\n" |
| 1346 |
"\\&\n" |
| 1347 |
" /* Attach shared memory into our address space and copy string\n" |
| 1348 |
" (including trailing null byte) into memory. */\n" |
| 1349 |
"\\&\n" |
| 1350 |
" addr = shmat(shmid, NULL, 0);\n" |
| 1351 |
" if (addr == (void *) -1)\n" |
| 1352 |
" errExit(\"shmat\");\n" |
| 1353 |
"\\&\n" |
| 1354 |
" memcpy(addr, argv[3], len);\n" |
| 1355 |
"\\&\n" |
| 1356 |
" /* Decrement semaphore to 0. */\n" |
| 1357 |
"\\&\n" |
| 1358 |
" sop.sem_num = 0;\n" |
| 1359 |
" sop.sem_op = -1;\n" |
| 1360 |
" sop.sem_flg = 0;\n" |
| 1361 |
"\\&\n" |
| 1362 |
" if (semop(semid, &sop, 1) == -1)\n" |
| 1363 |
" errExit(\"semop\");\n" |
| 1364 |
"\\&\n" |
| 1365 |
" exit(EXIT_SUCCESS);\n" |
| 1366 |
"}\n" |
| 1367 |
msgstr "" |
| 1368 |
"/* svshm_string_write.c\n" |
| 1369 |
"\\&\n" |
| 1370 |
" Licensed under GNU General Public License v2 or later.\n" |
| 1371 |
"*/\n" |
| 1372 |
"#include E<lt>stdio.hE<gt>\n" |
| 1373 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1374 |
"#include E<lt>string.hE<gt>\n" |
| 1375 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 1376 |
"#include E<lt>sys/shm.hE<gt>\n" |
| 1377 |
"\\&\n" |
| 1378 |
"#include \"svshm_string.h\"\n" |
| 1379 |
"\\&\n" |
| 1380 |
"int\n" |
| 1381 |
"main(int argc, char *argv[])\n" |
| 1382 |
"{\n" |
| 1383 |
" int semid, shmid;\n" |
| 1384 |
" char *addr;\n" |
| 1385 |
" size_t len;\n" |
| 1386 |
" struct sembuf sop;\n" |
| 1387 |
"\\&\n" |
| 1388 |
" if (argc != 4) {\n" |
| 1389 |
" fprintf(stderr, \"Usage: %s shmid semid string\\[rs]n\", argv[0]);\n" |
| 1390 |
" exit(EXIT_FAILURE);\n" |
| 1391 |
" }\n" |
| 1392 |
"\\&\n" |
| 1393 |
" len = strlen(argv[3]) + 1; /* +1 to include trailing \\[aq]\\[rs]0\\[aq] */\n" |
| 1394 |
" if (len E<gt> MEM_SIZE) {\n" |
| 1395 |
" fprintf(stderr, \"String is too big!\\[rs]n\");\n" |
| 1396 |
" exit(EXIT_FAILURE);\n" |
| 1397 |
" }\n" |
| 1398 |
"\\&\n" |
| 1399 |
" /* Get object IDs from command-line. */\n" |
| 1400 |
"\\&\n" |
| 1401 |
" shmid = atoi(argv[1]);\n" |
| 1402 |
" semid = atoi(argv[2]);\n" |
| 1403 |
"\\&\n" |
| 1404 |
" /* Attach shared memory into our address space and copy string\n" |
| 1405 |
" (including trailing null byte) into memory. */\n" |
| 1406 |
"\\&\n" |
| 1407 |
" addr = shmat(shmid, NULL, 0);\n" |
| 1408 |
" if (addr == (void *) -1)\n" |
| 1409 |
" errExit(\"shmat\");\n" |
| 1410 |
"\\&\n" |
| 1411 |
" memcpy(addr, argv[3], len);\n" |
| 1412 |
"\\&\n" |
| 1413 |
" /* Decrement semaphore to 0. */\n" |
| 1414 |
"\\&\n" |
| 1415 |
" sop.sem_num = 0;\n" |
| 1416 |
" sop.sem_op = -1;\n" |
| 1417 |
" sop.sem_flg = 0;\n" |
| 1418 |
"\\&\n" |
| 1419 |
" if (semop(semid, &sop, 1) == -1)\n" |
| 1420 |
" errExit(\"semop\");\n" |
| 1421 |
"\\&\n" |
| 1422 |
" exit(EXIT_SUCCESS);\n" |
| 1423 |
"}\n" |
| 1424 |
|
| 1425 |
#. type: TH |
| 1426 |
#: fedora-44 fedora-rawhide |
| 1427 |
#, no-wrap |
| 1428 |
msgid "2024-11-17" |
| 1429 |
msgstr "17 نوفمبر 2024" |
| 1430 |
|
| 1431 |
#. type: TH |
| 1432 |
#: fedora-44 fedora-rawhide |
| 1433 |
#, no-wrap |
| 1434 |
msgid "Linux man-pages 6.13" |
| 1435 |
msgstr "صفحات دليل لينكس 6.13" |
| 1436 |
|
| 1437 |
#. type: Plain text |
| 1438 |
#: fedora-44 fedora-rawhide |
| 1439 |
#, no-wrap |
| 1440 |
msgid "" |
| 1441 |
"/* svshm_string_write.c\n" |
| 1442 |
"\\&\n" |
| 1443 |
" Licensed under GNU General Public License v2 or later.\n" |
| 1444 |
"*/\n" |
| 1445 |
"#include E<lt>stdio.hE<gt>\n" |
| 1446 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1447 |
"#include E<lt>string.hE<gt>\n" |
| 1448 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 1449 |
"#include E<lt>sys/shm.hE<gt>\n" |
| 1450 |
"\\&\n" |
| 1451 |
"#include \"svshm_string.h\"\n" |
| 1452 |
"\\&\n" |
| 1453 |
"int\n" |
| 1454 |
"main(int argc, char *argv[])\n" |
| 1455 |
"{\n" |
| 1456 |
" int semid, shmid;\n" |
| 1457 |
" char *addr;\n" |
| 1458 |
" size_t size;\n" |
| 1459 |
" struct sembuf sop;\n" |
| 1460 |
"\\&\n" |
| 1461 |
" if (argc != 4) {\n" |
| 1462 |
" fprintf(stderr, \"Usage: %s shmid semid string\\[rs]n\", argv[0]);\n" |
| 1463 |
" exit(EXIT_FAILURE);\n" |
| 1464 |
" }\n" |
| 1465 |
"\\&\n" |
| 1466 |
" size = strlen(argv[3]) + 1; /* +1 to include trailing \\[aq]\\[rs]0\\[aq] */\n" |
| 1467 |
" if (size E<gt> MEM_SIZE) {\n" |
| 1468 |
" fprintf(stderr, \"String is too big!\\[rs]n\");\n" |
| 1469 |
" exit(EXIT_FAILURE);\n" |
| 1470 |
" }\n" |
| 1471 |
"\\&\n" |
| 1472 |
" /* Get object IDs from command-line. */\n" |
| 1473 |
"\\&\n" |
| 1474 |
" shmid = atoi(argv[1]);\n" |
| 1475 |
" semid = atoi(argv[2]);\n" |
| 1476 |
"\\&\n" |
| 1477 |
" /* Attach shared memory into our address space and copy string\n" |
| 1478 |
" (including trailing null byte) into memory. */\n" |
| 1479 |
"\\&\n" |
| 1480 |
" addr = shmat(shmid, NULL, 0);\n" |
| 1481 |
" if (addr == (void *) -1)\n" |
| 1482 |
" errExit(\"shmat\");\n" |
| 1483 |
"\\&\n" |
| 1484 |
" memcpy(addr, argv[3], size);\n" |
| 1485 |
"\\&\n" |
| 1486 |
" /* Decrement semaphore to 0. */\n" |
| 1487 |
"\\&\n" |
| 1488 |
" sop.sem_num = 0;\n" |
| 1489 |
" sop.sem_op = -1;\n" |
| 1490 |
" sop.sem_flg = 0;\n" |
| 1491 |
"\\&\n" |
| 1492 |
" if (semop(semid, &sop, 1) == -1)\n" |
| 1493 |
" errExit(\"semop\");\n" |
| 1494 |
"\\&\n" |
| 1495 |
" exit(EXIT_SUCCESS);\n" |
| 1496 |
"}\n" |
| 1497 |
msgstr "" |
| 1498 |
"/* svshm_string_write.c\n" |
| 1499 |
"\\&\n" |
| 1500 |
" Licensed under GNU General Public License v2 or later.\n" |
| 1501 |
"*/\n" |
| 1502 |
"#include E<lt>stdio.hE<gt>\n" |
| 1503 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1504 |
"#include E<lt>string.hE<gt>\n" |
| 1505 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 1506 |
"#include E<lt>sys/shm.hE<gt>\n" |
| 1507 |
"\\&\n" |
| 1508 |
"#include \"svshm_string.h\"\n" |
| 1509 |
"\\&\n" |
| 1510 |
"int\n" |
| 1511 |
"main(int argc, char *argv[])\n" |
| 1512 |
"{\n" |
| 1513 |
" int semid, shmid;\n" |
| 1514 |
" char *addr;\n" |
| 1515 |
" size_t size;\n" |
| 1516 |
" struct sembuf sop;\n" |
| 1517 |
"\\&\n" |
| 1518 |
" if (argc != 4) {\n" |
| 1519 |
" fprintf(stderr, \"Usage: %s shmid semid string\\[rs]n\", argv[0]);\n" |
| 1520 |
" exit(EXIT_FAILURE);\n" |
| 1521 |
" }\n" |
| 1522 |
"\\&\n" |
| 1523 |
" size = strlen(argv[3]) + 1; /* +1 to include trailing \\[aq]\\[rs]0\\[aq] */\n" |
| 1524 |
" if (size E<gt> MEM_SIZE) {\n" |
| 1525 |
" fprintf(stderr, \"String is too big!\\[rs]n\");\n" |
| 1526 |
" exit(EXIT_FAILURE);\n" |
| 1527 |
" }\n" |
| 1528 |
"\\&\n" |
| 1529 |
" /* Get object IDs from command-line. */\n" |
| 1530 |
"\\&\n" |
| 1531 |
" shmid = atoi(argv[1]);\n" |
| 1532 |
" semid = atoi(argv[2]);\n" |
| 1533 |
"\\&\n" |
| 1534 |
" /* Attach shared memory into our address space and copy string\n" |
| 1535 |
" (including trailing null byte) into memory. */\n" |
| 1536 |
"\\&\n" |
| 1537 |
" addr = shmat(shmid, NULL, 0);\n" |
| 1538 |
" if (addr == (void *) -1)\n" |
| 1539 |
" errExit(\"shmat\");\n" |
| 1540 |
"\\&\n" |
| 1541 |
" memcpy(addr, argv[3], size);\n" |
| 1542 |
"\\&\n" |
| 1543 |
" /* Decrement semaphore to 0. */\n" |
| 1544 |
"\\&\n" |
| 1545 |
" sop.sem_num = 0;\n" |
| 1546 |
" sop.sem_op = -1;\n" |
| 1547 |
" sop.sem_flg = 0;\n" |
| 1548 |
"\\&\n" |
| 1549 |
" if (semop(semid, &sop, 1) == -1)\n" |
| 1550 |
" errExit(\"semop\");\n" |
| 1551 |
"\\&\n" |
| 1552 |
" exit(EXIT_SUCCESS);\n" |
| 1553 |
"}\n" |
| 1554 |
|
| 1555 |
#. type: TH |
| 1556 |
#: mageia-cauldron |
| 1557 |
#, no-wrap |
| 1558 |
msgid "Linux man-pages 6.17" |
| 1559 |
msgstr "صفحات دليل لينكس 6.17" |
| 1560 |
|
| 1561 |
#. type: TH |
| 1562 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1563 |
#, no-wrap |
| 1564 |
msgid "Linux man-pages (unreleased)" |
| 1565 |
msgstr "صفحات دليل لينكس (لم تصدر بعد)" |