4
votes
3answers
315 views

How to check whether a process is daemon or not?

I have written a small daemon that starts at the boot time and does all the things perfectly like writing in the log file. But I want to know, how can we check whether that process is daemon or not? ...
3
votes
0answers
150 views

Fork vs. thread system time [closed]

I got the following logs: Program 1: Taken from a program executed 64 fork calls: real 0m0.023s user 0m0.068s sys 0m0.008s Program 2: Taken from a program executed 64 thread calls: real 0m0.613s ...
0
votes
1answer
347 views

Redirecting output of program reading from stdin

When I want to redirect an output of a.out program I will use ./a.out > output.txt This doesn't work when the program reads something from stdin. How would you redirect output in this case? I ...
4
votes
2answers
2k views

Implementing a Unix shell in C: Logging

I am currently working on implementing my own UNIX shell in C. The basis of the shell is working, you could find the source code here. Right now my next task is to implement a logging feature for the ...