Advanced Programming in the UNIX Environment: Second Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Advanced Programming in the UNIX Environment: Second Edition [Electronic resources] - نسخه متنی

W. Richard Stevens; Stephen A. Rago

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید



Exercises


12.1

Run the program in Figure 12.17 on a Linux system, but redirect the output into a file. Explain the results.

12.3

Can you make the program in Figure 12.13 async-signal safe by blocking signals at the beginning of the function and restoring the previous signal mask before returning? Explain.

12.4

Write a program to exercise the version of getenv from Figure 12.13. Compile and run the program on FreeBSD. What happens? Explain.

12.5

Given that you can create multiple threads to perform different tasks within a program, explain why you might still need to use fork.

12.6

Reimplement the program in Figure 10.29 to make it thread-safe without using nanosleep.

12.7

After calling fork, could we safely reinitialize a condition variable in the child process by first destroying the condition variable with pthread_cond_destroy and then initializing it with pthread_cond_init?


    / 369