Richard said:
If someone thinks its a C question, asks here it never hurts to mention
a possible solution at the same time as pointing them out to better
resources. I'm surprised anyone would think any different.
Here's the problem: Some of us here are experts on standard C. Fewer
of us are experts on Unix and POSIX. Worse, some of us might *think*
we're experts on Unix and POSIX even if we're not.
Suppose somebody asks a question that turns out to be Unix-specific.
I post a followup:
Sorry, standard C doesn't have that feature. Try
comp.unix.programmer -- but in the meantime, I think the
getfoobar() function will solve your problem.
Then somebody else posts a correction:
The getfoobar() function is Linux-specific; didn't the OP say he
was using Solaris?
and another:
Actually, getfoobar() is supported on Solaris 10.
And yet another:
The Solaris getfoobar() function is subtly different from the
Linux getfoobar() function. Here are the gory details. [...]
But on any POSIX system, you can achieve the same affect with
getfoo(getbar(getuid())). Oh, wait, you need to use getruid(),
unless it's after dark on a Tuesday
and it finally turns out that I misunderstood the OP's actual problem,
and the whole discussion has been off-topic *and* a waste of time.
Or, I post a followup to the original post:
Sorry, standard C doesn't have that feature.
Try comp.unix.programmer.
and the OP goes off to a forum filled with experts on Unix
programming, and gets a quick, useful, and correct solution to his
prpblem, and we can spend our time here talking about standard C.
See the difference?