Re: regarding unix specific commands



In article <1136097799.976366.131620@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"fidlee" <fidlee@xxxxxxxxx> wrote:

> I dont know if this is the right place to ask this question.
>
>
> i got this book "The C Odyssey. Unix - The Open, Boundless C"
> It is a 1992 edition book
>
>
> The book speaks of all the unix specific functions
>
>
> Just quoting an example below:
>
>
> main()
> {
>
>
> int pid;
> pid=getpid();
> printf("Process id is \n",pid);
>
>
>
> }
>
>
> I would like to know if this should run on any linux flavour(since this
>
> book talks only on unix/) with gcc compiler installed on it.What I
> would like to know is if this book would prove useful to me if i would
> like to play around with Linux.

Yes, it should run fine in any flavor of Unix or Linux. The only
Unix-specific function in that example is getpid(), and this hasn't
changed significantly since the dawn of Unix. The only change that's
ever likely for it is the type of the result (to allow for larger
process IDs); to minimize the impact of this, POSIX specifies a typedef
pid_t rather than a specific type like int or long.

However, a 13-year-old book is pretty out of date, it will be missing
most information about POSIX and SUS, not to mention Linux. Why don't
you get yourself something more recent?

--
Barry Margolin, barmar@xxxxxxxxxxxx
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
.



Relevant Pages

  • ~~~~~~~~~~~~~~ UNIX COURSE ~~~~~~~~~~~~~~
    ... and aix unix course free administration ... and programming plan unix shell course ... course linux unix online administration system ...
    (sci.bio.ecology)
  • Re: The Problems With Linux
    ... > Here are the problems with Linux: ... programmers of UNIX, Open Source software, and Shareware. ... programs only available from BSD. ... BSD code is used by Microsoft in it's Windows NT/9x/2K/XP code. ...
    (comp.os.linux)
  • RE: [Full-Disclosure] CyberInsecurity: The cost of Monopoly
    ... I've used UNIX, ... I've used/use Linux, ... > inefficient operating system - if most other Windows ... This is why I don't run POS operating systems. ...
    (Full-Disclosure)
  • Re: hmm..
    ... I checked definitely do not have any UNIX history to them. ... (ie I think "real UNIX" has SIGBUS at 10, while Linux didn't originally ... the "ctype" name comes "character type", and the ... the "ctype" interfaces are defined by the C standard library. ...
    (Linux-Kernel)
  • Re: Newbie Experience
    ... I've only been around since FreeBSD 5.4 ... FreeBSD kernel too. ... always sunshine and linux is farts. ... in the hey day of AT&T Unix I'm ...
    (freebsd-questions)