PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Linux  |  Newsgroups

regarding unix specific commands 7356


Your Ad Here

Your Ad Here

Let me inject something here that needs to be said *before* you get too far out on a limb and end up cussing Linux because you ended up on the ground with a broken arm (or neck)... okay? :-)

Any book written in 1992 is *too* old to be your one and only resource. There are some great old books, and the best is "Advanced Programming in a Unix Environment" by W. Richard Stevens. APUE as it is commonly called, is priceless, but today it is also true that it is so old you have to know an awful lot before it can be used.

Do yourself a favor and go find a more recent book to start with. A *lot* of water has gone under the bridge since 1992. Just for starters, Linux. But equally bad is that in 1992 the "new" C89 ANSI-ISO Standard for C was new. Now the 1989 Standard is not only old, it has been replaced by the C99 (1999) Standard. (Your book appears to be ignoring C89...)

And beyond that (or maybe before that), the formatting style of the code you have posted suggests either you have some other horrible influence, or the book you are reading is indeed a horrible influence on style!

As an example, let me rewrite the below code in something that is more suitable. Note that a lot of folks use something different than I do... and there are at least half a dozen appropriate ways to format C. Any of them are fine, but what you have below is not.

EnergyMech IRC bot installed on my server by "hacker
Well, I know a lot of people don't like to admit it, but I got "hacked" over the Xmas holidays, thanks to my own stupidity and oversight. Meaning...

can't read superblock on a xfs parbreastion
This is strange. If xfsgrowfs does not check the type of the specified file, it will try to operate on the file given...

int main(void) { int pid;

pid = fork();

printf("Parent process id is %d-n", pid); }

if (pid == 0) { printf("Child process-n"); }

return EXITSUCCESS; }

Note the *many* changes! And that not one of them was just arbitrary. For example, I used a lot more whitespace. One instance is between each operator and whatever follows it, while at the same time I did not put white space in places such as between a function name at the following parens. Hence,

if (...)

but

printf(...)

Which makes it easier to read. (And it happens that some people do it exactly the opposite! Which is also easy to read...)

Note also the added header files that were included. Not an accident!

You need a book that tells you these things, because you can't come here and ask about each and every one of them (and most you'll never notice) without annoying everyone in sight!

Make that *two* books! Get one on C programming, preferably oriented towards Linux, but also get one on running Linux. Such books will explain, in some detail, the philosophy behind things like not running as root. You don't want have to remember all the do this and don't do that tips, you want to know the basis for each so that at any time a new situation that you've never heard of presents itself, you'll *know* what is appropriate and what is not.

How to use ggc turn a progam from c++ to pure C
lnzju breastle was: How to use ggc turn a progam from c++ to pure C First of all, it was once possible to run...

--



Your Ad Here

List | Previous | Next

can't read superblock on a xfs parbreastion

Linux groups from Newsgroups

The #1 Usenet Provider on the Internet

regarding unix specific commands 7355