Retrieve process ID from process name

2010-11-22 Thread T. Alex Chen
I am trying to retrieve the process ID from a process' name, optionally with its command parameters. I look up the man page of 'sysctl' and the use of this API seems to be discouraged. It points the /proc file system. The /proc does contains all the running processes, with their ID as the direc

Atomic operations

2010-11-19 Thread T. Alex Chen
I post the following message on debian-devel mailing list but someone says it is the wrong one so I post it here again. Please bear with me if you have already seen it. == I want to do atomic operation and find there is already such implementation in Linux, e.g. atomic_add, atomic_set, a