Re: regarding unix specific commands
- From: Barry Margolin <barmar@xxxxxxxxxxxx>
- Date: Sun, 01 Jan 2006 01:58:20 -0500
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 ***
.
- Follow-Ups:
- Re: regarding unix specific commands
- From: fidlee
- Re: regarding unix specific commands
- References:
- regarding unix specific commands
- From: fidlee
- regarding unix specific commands
- Prev by Date: regarding unix specific commands
- Next by Date: Re: regarding unix specific commands
- Previous by thread: regarding unix specific commands
- Next by thread: Re: regarding unix specific commands
- Index(es):
Relevant Pages
|