extra semicolons removed
extra explicit casting removed
use uid_t and pid_t instead of int
extra semicolon removed
use pid_t instead of int
do not assume that successful open() sets errno to 0