Wrapping existing UNIX commands in C

R

Rui Maciel

Chicken said:
Because the "ls" command was an example. I really want to process the
output of things like "iostat", "/proc/loadavg", "sar" and "tcpdump".

It appears that /proc/loadavg is one of those "everything is a file" that
unix is known for. So, in this case instead of relying on wrapping unix
commands in C you only need to open the file, read it, parse the content,
and finally close it.


Rui Maciel
 
J

Joe keane

The thing to keep in mind is that the obsession with "What's in the
standard and only what's in the standard" is not divine truth.

If they're concerned with that, they're in the wrong newsgroup.

That is "comp.std.c".
 
R

Robert Miles

On 08/06/2012 03:28 PM, BartC wrote:
....

That begs the question - IMO it is almost never "sensible" to post the
first message of a thread using "OT" - if you need "OT", you've chosen
the wrong forum for your message. Thread drift often makes it
appropriate to add it to an existing thread's subject line, but that's a
different issue.

Where is it sensible to post the first message of your thread if it
is mainly a question about what the proper forum is, since you haven't
been able to find any forum that looks suitable?
 
K

Kaz Kylheku

Where is it sensible to post the first message of your thread if it
is mainly a question about what the proper forum is, since you haven't
been able to find any forum that looks suitable?

news.newusers.questions, perhaps.
 
K

Keith Thompson

Robert Miles said:
Where is it sensible to post the first message of your thread if it
is mainly a question about what the proper forum is, since you haven't
been able to find any forum that looks suitable?

By convention, discussions about topicality are considered topical.
 
Ö

Öö Tiib

Where is it sensible to post the first message of your thread if it
is mainly a question about what the proper forum is, since you haven't
been able to find any forum that looks suitable?

People in c.l.c are so friendly that you can ask whatever you want.
They have so broad minds that someone eventually knows correct
answer ... even if the question is about something really exotic
like UNIX or Windows. The people who do not know the answer
contribute by friendly humming and nudging each other and original
poster to pump the thread until someone answers. Traditional topic
in such humm-pump remarks is topicality.
 
J

James Kuyper

Where is it sensible to post the first message of your thread if it
is mainly a question about what the proper forum is, since you haven't
been able to find any forum that looks suitable?

I did say "almost" - reasonable accommodation should be made for
reasonable levels of uncertainty. Post such a message on one of the
forums (with a reasonable activity level) that comes closest to looking
suitable. In such a place you're more likely to find someone who knows
what an appropriate forum is for your question. Just don't go posting
such a question at random.
 
K

Kaz Kylheku

By convention, discussions about topicality are considered topical.

You didn't think this one through, Kiki.

"Where might it be topical to ask a question about hair spray for rats?"

What if that topicality being discussed has nothing even remotely to do with
the topicality of the newsgroup?

This new-fangled "topicality is topical" is not a convention, but only an
excuse for some regulars to feel they have "immunity" when engaging in extended
debates about why something or someone is off topic. This view is overdue
for being laid to rest.

I've been here longer than most regulars, and all I remember is that at
the height of the topicality policing, there had been kind of agreement that
it's okay to ask about where a question can be posted, if that question is
related to the use of some C dialect in some way (e.g. platform-specific
programming with some C based toolchain).

But I have come to believe that if the question is related to the use of some C
dialect, even to do something platform-specific, then it is actually just fine
in comp.lang.c. Part of why I think this now is the lessening of the traffic,
compared to the "heyday". Lower traffic newsgroups can tolerate more topic
diversity. (As an extreme example. if all of Usenet consisted of only five
people, they would best use only one newsgroup to discuss anything whatsoever,
rather than chasing each other across 10,000 newsgroups in order to maintain a
topicality charade.)

We have come full circle, because if you look at very old archives of
comp.lang.c (or net.lang.c), you will see that once upon a time it was also
more relaxed. The strict topic policing kicked in sometime around the mid to
late 1990's when the daily volume became quite high. (And, furthermore, C had
then been standardized for a number of years, giving some people the excuse
that only what is written up in ISO 9899:1990 is C and nothing else.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,078
Messages
2,570,570
Members
47,204
Latest member
MalorieSte

Latest Threads

Top