posix
How to check Stack Usage when Calculating Ackermann
I\'m learning about my system\'s ability to calculate Ackermann\'s algorithm both the two and three parameter version. For very small values of m and n, my system will calculate and print results retu[详细]
2023-04-08 15:21 分类:问答What happens if printf is not handled
I\'m current supporting some legacy software written aeon ago, compiled in gcc 2.95.3. The program is ran in an SBC, occasionally I had to telnet into it to fix things. I notice that when the SBC is r[详细]
2023-04-08 02:50 分类:问答Using Memory Mapping or Unlocked Stream Operation?
I am working on a FUSE implementation for FAT32 under Linux (I know this is already available in the Linux Kernel, but this is a school assignment).[详细]
2023-04-07 14:39 分类:问答Properly running binaries on runtime with safety (seteuid etc)
So if I want to run a binary using exec() on a child process after fork, but want to restrict its file access to a certain directory only, how does one safely do that?[详细]
2023-04-07 11:14 分类:问答A confusion in APUE2(about symbolic link in UNIX)
The original text is below.It is in Section 4.22 The program in Figure 4.24 changes to a specific directory and then calls getcwd to print the working directory. If we run the program, we get[详细]
2023-04-07 09:43 分类:问答What Can I Use Besides usleep in a Modern POSIX Environment?
I\'m fairly new to C but writing a small multithreaded application.I want to introduce a delay to a thread.I\'d been using \'usleep\' and the behavior is what I desire - but it generates warnings in C[详细]
2023-04-07 03:02 分类:问答How and when are shared memory backing files removed in Linux?
I am using the combination of shm_open() and mmap() to create a shared memory segment for IPC. What I\'m wondering is how the backing files (in /dev/shm in my system, Linux kernel 2.6.31) are cleaned[详细]
2023-04-07 02:52 分类:问答Is this usage of condition variables ALWAYS subject to a lost-signal race?
Suppose a condition variable is used in a situation where the signaling thread modifies the state affecting the truth value of the predicate and calls pthread_cond_signal without holding the mutex ass[详细]
2023-04-06 22:01 分类:问答Using fork() in C
I\'m writing a program that uses the cpu power to process some information. The program depends on the CPU cores. If there are 2 cores, the program will fork() twice to create 2 instances of the work[详细]
2023-04-05 18:07 分类:问答How can I determine what stdout "points" to in C?
I want to be able to tell when my program\'s stdout is redirected to a file/device, and when it is left to print normally on the screen. How can this be done in C?[详细]
2023-04-04 17:30 分类:问答